From f398b6435a339a9b21f44c7854dac38b146fe596 Mon Sep 17 00:00:00 2001 From: Alex Marin Date: Mon, 30 Sep 2024 12:44:07 -0700 Subject: [PATCH] fix warning --- onnxruntime/core/providers/cpu/nn/layer_norm_impl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/onnxruntime/core/providers/cpu/nn/layer_norm_impl.cc b/onnxruntime/core/providers/cpu/nn/layer_norm_impl.cc index 33e631152ffcf..00cc0900e9577 100644 --- a/onnxruntime/core/providers/cpu/nn/layer_norm_impl.cc +++ b/onnxruntime/core/providers/cpu/nn/layer_norm_impl.cc @@ -15,15 +15,15 @@ namespace onnxruntime { namespace { -ORT_FORCEINLINE double* OnlyCreateBufferIfMLFloat16(double* p_output, int num_elems) { +ORT_FORCEINLINE double* OnlyCreateBufferIfMLFloat16(double* p_output, int64_t num_elems) { return p_output; } -ORT_FORCEINLINE float* OnlyCreateBufferIfMLFloat16(float* p_output, int num_elems) { +ORT_FORCEINLINE float* OnlyCreateBufferIfMLFloat16(float* p_output, int64_t num_elems) { return p_output; } -ORT_FORCEINLINE float* OnlyCreateBufferIfMLFloat16(MLFloat16* p_output, int num_elems) { +ORT_FORCEINLINE float* OnlyCreateBufferIfMLFloat16(MLFloat16* p_output, int64_t num_elems) { return p_output == nullptr ? nullptr : new float[num_elems]; }