diff --git a/onnxruntime/core/providers/openvino/backend_utils.cc b/onnxruntime/core/providers/openvino/backend_utils.cc index 5322008905c0d..2a3dde4e0c7a2 100644 --- a/onnxruntime/core/providers/openvino/backend_utils.cc +++ b/onnxruntime/core/providers/openvino/backend_utils.cc @@ -15,7 +15,6 @@ #include "core/providers/openvino/backend_utils.h" #include "core/providers/openvino/ov_interface.h" - using Exception = ov::Exception; namespace onnxruntime { @@ -384,7 +383,7 @@ ov::element::Type GetOpenVINOElementType(ONNX_NAMESPACE::TensorProto_DataType dt // Function to handle tensor creation from external data void CreateOVTensors(const std::string& device_name, SharedContext::SharedWeights::Metadata::Map& metadata_map, - SharedContext::SharedWeights::WeightsFile &weights) { + SharedContext::SharedWeights::WeightsFile& weights) { for (auto& [key, value] : metadata_map) { if (value.tensor) continue; diff --git a/onnxruntime/core/providers/openvino/contexts.h b/onnxruntime/core/providers/openvino/contexts.h index 3b9da726822d5..66fcb8025ad8d 100644 --- a/onnxruntime/core/providers/openvino/contexts.h +++ b/onnxruntime/core/providers/openvino/contexts.h @@ -104,8 +104,8 @@ struct SessionContext : ProviderInfo { std::vector deviceAvailableList = {true, true, true, true, true, true, true, true}; std::filesystem::path onnx_model_path_name; uint32_t onnx_opset_version{0}; - mutable bool is_wholly_supported_graph = false; //Value is set to mutable to modify from capability - mutable bool has_external_weights = false; //Value is set to mutable to modify from capability + mutable bool is_wholly_supported_graph = false; // Value is set to mutable to modify from capability + mutable bool has_external_weights = false; // Value is set to mutable to modify from capability const std::vector OpenVINO_Version = {OPENVINO_VERSION_MAJOR, OPENVINO_VERSION_MINOR}; const std::string openvino_sdk_version = std::to_string(OPENVINO_VERSION_MAJOR) + "." + std::to_string(OPENVINO_VERSION_MINOR); }; diff --git a/onnxruntime/core/providers/openvino/openvino_execution_provider.h b/onnxruntime/core/providers/openvino/openvino_execution_provider.h index 1ce9f83fd78a8..75f4ef9f8ecc8 100644 --- a/onnxruntime/core/providers/openvino/openvino_execution_provider.h +++ b/onnxruntime/core/providers/openvino/openvino_execution_provider.h @@ -50,7 +50,7 @@ class OpenVINOExecutionProvider : public IExecutionProvider { std::vector> GetCapability(const GraphViewer& graph_viewer, - const IKernelLookup& /*kernel_lookup*/) const override ; + const IKernelLookup& /*kernel_lookup*/) const override; Status Compile(const std::vector& fused_nodes, std::vector& node_compute_funcs) override; diff --git a/onnxruntime/core/providers/openvino/ov_interface.cc b/onnxruntime/core/providers/openvino/ov_interface.cc index e12a560809519..4c656bceff550 100644 --- a/onnxruntime/core/providers/openvino/ov_interface.cc +++ b/onnxruntime/core/providers/openvino/ov_interface.cc @@ -16,13 +16,11 @@ namespace openvino_ep { static const std::string log_tag = "[OpenVINO-EP] "; static std::unique_ptr g_core; -void OVCore::Initialize() -{ +void OVCore::Initialize() { g_core = std::make_unique(); } -void OVCore::Teardown() -{ +void OVCore::Teardown() { g_core.reset(); } diff --git a/onnxruntime/core/providers/openvino/ov_versions/capability.cc b/onnxruntime/core/providers/openvino/ov_versions/capability.cc index 23cd7de6e84ba..3b9704d4a65ed 100644 --- a/onnxruntime/core/providers/openvino/ov_versions/capability.cc +++ b/onnxruntime/core/providers/openvino/ov_versions/capability.cc @@ -170,15 +170,14 @@ std::vector> GetCapability::Execute() { int no_of_clusters = 0; for (auto this_cluster : connected_clusters) { - // If subgraph has less then three, graph is considered trivial unless its an epctx cluster if (this_cluster.size() < 3) { bool is_epctx_node = false; - for(auto node_idx:this_cluster){ - if(graph_viewer_.GetNode(node_idx)->OpType() == "EPContext") + for (auto node_idx : this_cluster) { + if (graph_viewer_.GetNode(node_idx)->OpType() == "EPContext") is_epctx_node = true; } - if(!is_epctx_node) + if (!is_epctx_node) continue; }