Skip to content

Commit

Permalink
Make last_dim size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
adityagoel4512 committed Jan 11, 2024
1 parent 0acf472 commit f269f77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onnxruntime/core/providers/cpu/text/string_split.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ Status StringSplit::Compute(OpKernelContext* context) const {

InlinedVector<InlinedVector<std::string_view>> input_slices;
input_slices.reserve(input_data.size());
int64_t last_dim = 0;
size_t last_dim = 0;

for (const auto& s : input_data) {
auto& substrs = input_slices.emplace_back();
ComputeSubstrings(s, delimiter_, maxsplit_, substrs);
auto substr_count = static_cast<int64_t>(substrs.size());
auto substr_count = substrs.size();
last_dim = std::max(last_dim, substr_count);
*num_tokens_iter = substr_count;
*num_tokens_iter = static_cast<int64_t>(substr_count);
++num_tokens_iter;
}

Expand Down

0 comments on commit f269f77

Please sign in to comment.