From 970ace47153053f0fb5e714f5c73d2e8e1d17be3 Mon Sep 17 00:00:00 2001 From: Xavier Dupre Date: Wed, 22 Nov 2023 13:15:41 +0100 Subject: [PATCH] add static_cast --- .../test/testdata/custom_op_local_function/dummy_gemm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/test/testdata/custom_op_local_function/dummy_gemm.cc b/onnxruntime/test/testdata/custom_op_local_function/dummy_gemm.cc index 3e3cacdb0f607..51268005586f3 100644 --- a/onnxruntime/test/testdata/custom_op_local_function/dummy_gemm.cc +++ b/onnxruntime/test/testdata/custom_op_local_function/dummy_gemm.cc @@ -110,7 +110,7 @@ void CustomGemmKernel::Compute(OrtKernelContext* context) { std::vector dimensions{shape_A[0], shape_B[1]}; Ort::UnownedValue Y = ctx.GetOutput(0, dimensions); float* out = Y.GetTensorMutableData(); - size_t end = dimensions[0] * dimensions[1]; + size_t end = static_cast(dimensions[0] * dimensions[1]); for (size_t i = static_cast(0); i < end; ++i) { out[i] = static_cast(i); }