diff --git a/onnxruntime/core/providers/cpu/reduction/reduction_ops.cc b/onnxruntime/core/providers/cpu/reduction/reduction_ops.cc index d8426c3f78..e8e689508f 100644 --- a/onnxruntime/core/providers/cpu/reduction/reduction_ops.cc +++ b/onnxruntime/core/providers/cpu/reduction/reduction_ops.cc @@ -657,8 +657,8 @@ bool CommonFastReduceCopy(OpKernelContext* ctx, std::vector& input_axes if (input_axes.empty() && noop_with_empty_axes) { const Tensor* input = ctx->Input(0); auto* output = ctx->Output(0, input->Shape()); - memcpy(reinterpret_cast(output->template MutableData()), - reinterpret_cast(input->template Data()), + memcpy(output->MutableDataRaw(), + input->DataRaw(), input->SizeInBytes()); return true; }