Skip to content

Commit

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

InlinedVector<InlinedVector<std::string_view>> input_slices;
input_slices.reserve(input_data.size());
int64_t last_dim = 0;
ptrdiff_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 = static_cast<ptrdiff_t>(substrs.size());
last_dim = std::max(last_dim, substr_count);
*num_tokens_iter = substr_count;
++num_tokens_iter;
Expand Down

0 comments on commit f2f46b5

Please sign in to comment.