diff --git a/onnxruntime/core/providers/cpu/text/string_split.cc b/onnxruntime/core/providers/cpu/text/string_split.cc index 8aa63036a6f85..9d5758371d259 100644 --- a/onnxruntime/core/providers/cpu/text/string_split.cc +++ b/onnxruntime/core/providers/cpu/text/string_split.cc @@ -71,12 +71,12 @@ Status StringSplit::Compute(OpKernelContext* context) const { InlinedVector> 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(substrs.size()); + auto substr_count = substrs.size(); last_dim = std::max(last_dim, substr_count); *num_tokens_iter = substr_count; ++num_tokens_iter;