Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions onnxruntime/core/providers/openvino/backend_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "core/providers/openvino/backend_utils.h"
#include "core/providers/openvino/ov_interface.h"


using Exception = ov::Exception;

namespace onnxruntime {
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/openvino/contexts.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ struct SessionContext : ProviderInfo {
std::vector<bool> 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<uint32_t> 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);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class OpenVINOExecutionProvider : public IExecutionProvider {

std::vector<std::unique_ptr<ComputeCapability>>
GetCapability(const GraphViewer& graph_viewer,
const IKernelLookup& /*kernel_lookup*/) const override ;
const IKernelLookup& /*kernel_lookup*/) const override;

Status Compile(const std::vector<FusedNodeAndGraph>& fused_nodes,
std::vector<NodeComputeInfo>& node_compute_funcs) override;
Expand Down
6 changes: 2 additions & 4 deletions onnxruntime/core/providers/openvino/ov_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ namespace openvino_ep {
static const std::string log_tag = "[OpenVINO-EP] ";
static std::unique_ptr<ov::Core> g_core;

void OVCore::Initialize()
{
void OVCore::Initialize() {
g_core = std::make_unique<ov::Core>();
}

void OVCore::Teardown()
{
void OVCore::Teardown() {
g_core.reset();
}

Expand Down
7 changes: 3 additions & 4 deletions onnxruntime/core/providers/openvino/ov_versions/capability.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,14 @@ std::vector<std::unique_ptr<ComputeCapability>> 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;
}

Expand Down
Loading