From f2f46b5dc1633b441e5504b9684ca07cffd1ffc8 Mon Sep 17 00:00:00 2001 From: Aditya Goel Date: Thu, 11 Jan 2024 02:38:12 +0000 Subject: [PATCH] Make last_dim ptrdiff_t --- onnxruntime/core/providers/cpu/text/string_split.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/core/providers/cpu/text/string_split.cc b/onnxruntime/core/providers/cpu/text/string_split.cc index 8aa63036a6f85..47ac95b041d8f 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; + 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(substrs.size()); + auto substr_count = static_cast(substrs.size()); last_dim = std::max(last_dim, substr_count); *num_tokens_iter = substr_count; ++num_tokens_iter;