From ade3b59474bfc79e52472724122de47198505650 Mon Sep 17 00:00:00 2001 From: "Javier E. Martinez" Date: Thu, 6 Feb 2025 16:27:54 -0800 Subject: [PATCH] Fix for C4267 warning --- .../core/providers/openvino/openvino_provider_factory.cc | 2 +- onnxruntime/core/providers/openvino/ov_interface.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/core/providers/openvino/openvino_provider_factory.cc b/onnxruntime/core/providers/openvino/openvino_provider_factory.cc index 1c2d857b6252d..2cf962c829afc 100644 --- a/onnxruntime/core/providers/openvino/openvino_provider_factory.cc +++ b/onnxruntime/core/providers/openvino/openvino_provider_factory.cc @@ -148,7 +148,7 @@ std::string ParsePrecision(const ProviderOptions& provider_options, std::string& << "Update the 'device_type' to specified types 'CPU', 'GPU', 'GPU.0', " << "'GPU.1', 'NPU' or from" << " HETERO/MULTI/AUTO options and set 'precision' separately. \n"; - int delimit = device_type.find("_"); + auto delimit = device_type.find("_"); device_type = device_type.substr(0, delimit); return device_type.substr(delimit + 1); } diff --git a/onnxruntime/core/providers/openvino/ov_interface.cc b/onnxruntime/core/providers/openvino/ov_interface.cc index 4c656bceff550..d8d0dbfec8c31 100644 --- a/onnxruntime/core/providers/openvino/ov_interface.cc +++ b/onnxruntime/core/providers/openvino/ov_interface.cc @@ -233,7 +233,7 @@ void OVInferRequest::SetTensor(const std::string& name, OVTensorPtr& blob) { } uint32_t OVInferRequest::GetNumInputs() { - return ovInfReq.get_compiled_model().inputs().size(); + return static_cast(ovInfReq.get_compiled_model().inputs().size()); } void OVInferRequest::StartAsync() {