From f269f77148ac26eae9cbdc64fcc255a14c8585f8 Mon Sep 17 00:00:00 2001 From: Aditya Goel Date: Thu, 11 Jan 2024 02:38:12 +0000 Subject: [PATCH] Make last_dim size_t --- onnxruntime/core/providers/cpu/text/string_split.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/onnxruntime/core/providers/cpu/text/string_split.cc b/onnxruntime/core/providers/cpu/text/string_split.cc index 8aa63036a6f85..2b82309838464 100644 --- a/onnxruntime/core/providers/cpu/text/string_split.cc +++ b/onnxruntime/core/providers/cpu/text/string_split.cc @@ -71,14 +71,14 @@ 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 = static_cast(substr_count); ++num_tokens_iter; }