diff --git a/cmake/onnxruntime_providers_openvino.cmake b/cmake/onnxruntime_providers_openvino.cmake index f5fae8d169..606ab1fe5b 100644 --- a/cmake/onnxruntime_providers_openvino.cmake +++ b/cmake/onnxruntime_providers_openvino.cmake @@ -53,7 +53,7 @@ target_compile_definitions(onnxruntime_providers_openvino PRIVATE FILE_NAME=\"onnxruntime_providers_openvino.dll\") if(MSVC) - target_compile_options(onnxruntime_providers_openvino PUBLIC /wd4099 /wd4275 /wd4100 /wd4005 /wd4244 /wd4267) + target_compile_options(onnxruntime_providers_openvino PRIVATE /wd4099 /wd4275 /wd4100 /wd4005) endif() # Needed for the provider interface, as it includes training headers when training is enabled diff --git a/onnxruntime/core/providers/openvino/backend_utils.cc b/onnxruntime/core/providers/openvino/backend_utils.cc index b97736f2e1..d6f408228f 100644 --- a/onnxruntime/core/providers/openvino/backend_utils.cc +++ b/onnxruntime/core/providers/openvino/backend_utils.cc @@ -110,7 +110,7 @@ GetOutputTensor(Ort::KernelContext& context, std::unordered_map output_names, std::shared_ptr node) { // Find position of '/' in the output_name - int pos = output_name.find("/"); + auto pos = output_name.find("/"); // Copy the substring from start to pos output_name = output_name.substr(0, pos); diff --git a/onnxruntime/core/providers/openvino/backends/basic_backend.cc b/onnxruntime/core/providers/openvino/backends/basic_backend.cc index 435ca83ff6..4563929334 100644 --- a/onnxruntime/core/providers/openvino/backends/basic_backend.cc +++ b/onnxruntime/core/providers/openvino/backends/basic_backend.cc @@ -129,7 +129,7 @@ BasicBackend::BasicBackend(std::unique_ptr& model_pr } catch (const char* msg) { ORT_THROW(msg); } - int num_infer_req = (global_context_.num_of_threads > 0) ? global_context_.num_of_threads : 1; + size_t num_infer_req = (global_context_.num_of_threads > 0) ? global_context_.num_of_threads : 1; inferRequestsQueue_ = std::unique_ptr(new InferRequestsQueue(exe_network_, num_infer_req)); } @@ -339,7 +339,7 @@ void BasicBackend::EnableStreams() { void BasicBackend::SetNumThreads(ov::AnyMap& device_config) { // inference_num_threads is applicable only for the CPU device if (global_context_.device_type.find("CPU") != std::string::npos) - device_config.emplace(ov::inference_num_threads(global_context_.num_of_threads)); + device_config.emplace(ov::inference_num_threads(static_cast(global_context_.num_of_threads))); } // Starts an asynchronous inference request for data in slice indexed by batch_slice_idx on diff --git a/onnxruntime/core/providers/openvino/openvino_provider_factory.cc b/onnxruntime/core/providers/openvino/openvino_provider_factory.cc index 5855cb594a..879d2399e6 100644 --- a/onnxruntime/core/providers/openvino/openvino_provider_factory.cc +++ b/onnxruntime/core/providers/openvino/openvino_provider_factory.cc @@ -148,7 +148,7 @@ struct OpenVINO_Provider : Provider { } if (deprecated_device_types.find(device_type) != deprecated_device_types.end()) { std::string deprecated_device = device_type; - int delimit = device_type.find("_"); + auto delimit = device_type.find("_"); device_type = deprecated_device.substr(0, delimit); precision = deprecated_device.substr(delimit + 1); LOGS_DEFAULT(WARNING) << "[OpenVINO] Selected 'device_type' " + deprecated_device + " is deprecated. \n" diff --git a/onnxruntime/core/providers/openvino/qdq_transformations/qdq_stripping.cc b/onnxruntime/core/providers/openvino/qdq_transformations/qdq_stripping.cc index 387aaf9985..e021edc878 100644 --- a/onnxruntime/core/providers/openvino/qdq_transformations/qdq_stripping.cc +++ b/onnxruntime/core/providers/openvino/qdq_transformations/qdq_stripping.cc @@ -391,7 +391,7 @@ static bool CheckQRuleSet(const NodeUnit& node_unit, static bool HandleDoubleQDQ(onnxruntime::Graph& dst_graph, const onnxruntime::GraphViewer& src_graph, const NodeUnit& node_unit, std::set& initializers_to_keep) { - int node_unit_input_edge_count = node_unit.InputEdgeCount(); + int node_unit_input_edge_count = static_cast(node_unit.InputEdgeCount()); int node_unit_output_edge_count = [&]() { int count = 0; for (auto it = node_unit.OutputEdgesBegin(); it != node_unit.OutputEdgesEnd(); ++it)