From 521fffaee17456a7775af913fd557b1a2dbaf629 Mon Sep 17 00:00:00 2001 From: Kevin Chen Date: Tue, 18 Jun 2024 16:06:54 -0700 Subject: [PATCH] Fix warning Signed-off-by: Kevin Chen --- .../core/providers/tensorrt/tensorrt_execution_provider.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc index ac9f96fc0ed69..2bf3d27928a72 100644 --- a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc +++ b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc @@ -113,8 +113,10 @@ bool SetDynamicRange(nvinfer1::INetworkDefinition& network, std::unordered_map= 10 case nvinfer1::DataType::kINT64: - weight = static_cast(trt_weights.values)[k]; + { + weight = static_cast(static_cast(trt_weights.values)[k]); break; + } #endif // NV_TENSORRT_MAJOR >= 10 default: LOGS_DEFAULT(ERROR) << "Found unsupported datatype for layer " << const_layer_name;