Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
e85411a
Updated Internal CI (#581)
jatinwadhwa921 Dec 18, 2024
0d42af9
Updated Internal CI OV version (#594)
jatinwadhwa921 Feb 25, 2025
3dc24ef
Updated ov version in pipeline (#595)
jatinwadhwa921 Feb 27, 2025
9c2fee5
[OVEP] Fix for deprecated OV element type (#597)
jatinwadhwa921 Feb 28, 2025
17f4bc7
Merge branch 'master' into sync_msft_29_2_25
n1harika Feb 28, 2025
4bb577a
Merge pull request #600 from intel/sync_msft_29_2_25
ankitm3k Feb 28, 2025
60ee27a
Sahar/session option develop (#601)
sfatimar Feb 28, 2025
ec62bf3
Use absolute paths for libraries loaded with LOAD_WITH_ALTERED_SEARCH…
jnagi-intel Mar 4, 2025
bd32f51
Remove unintended model copies during compilation (#584)
ericcraw Mar 4, 2025
a6cdf62
Rebasing with msft commits (#607)
jatinwadhwa921 Mar 10, 2025
cdc209c
Revert "Rebasing with msft commits (#607)"
ankitm3k Mar 10, 2025
920ed58
Merge pull request #607
ankitm3k Mar 10, 2025
788fc78
Revert "Merge pull request #607"
jatinwadhwa921 Mar 10, 2025
a046532
Merge pull request #609 from intel/jatin_revert_msft_changes
ankitm3k Mar 10, 2025
ec98cce
Merge branch 'master' into syncing_msft_commits_3_10_25
jatinwadhwa921 Mar 10, 2025
73e0fea
Merge pull request #611 from intel/syncing_msft_commits_3_10_25
jatinwadhwa921 Mar 10, 2025
61b36ef
[OVEP] Fix for precision accuracy
jatinwadhwa921 Mar 5, 2025
ea13a05
Merge pull request #603 from intel/jatin_fix_precison_acc_issue
sfatimar Mar 11, 2025
7683e37
Refactor OVRTAllocator to return base pointer of remote tensor (#613)
ericcraw Mar 17, 2025
1788576
Commit Lint Errors fix (#606)
sfatimar Mar 18, 2025
23e17e2
fix quantizedLinear layer feeds into grapg output (#615)
saurabhkale17 Mar 18, 2025
91e64fe
Merge branch 'master' into sync_msft_18_3_25
jatinwadhwa921 Mar 18, 2025
6083601
Merge pull request #621 from intel/sync_msft_18_3_25
jatinwadhwa921 Mar 18, 2025
8b4a6d2
[OVEP] Fix for dumping the model in correct format (#616)
jatinwadhwa921 Mar 19, 2025
7269615
[OVEP] Added Cast and Resize to operators that handle zero-valued dim…
jatinwadhwa921 Mar 19, 2025
9ee95d1
Merge branch 'master' into sync_msft_20_3_25
jatinwadhwa921 Mar 20, 2025
2a24806
Merge pull request #624 from intel/sync_msft_20_3_25
jatinwadhwa921 Mar 21, 2025
c7ac5c8
Merge branch 'master' into sync_msft_25_3_25
jatinwadhwa921 Mar 25, 2025
2c61a3a
Merge pull request #627 from intel/sync_msft_25_3_25
jatinwadhwa921 Mar 26, 2025
e240695
[OVEP] Fix for Dynamic backend creation for NPU. (#622)
gupta-pallavi Mar 27, 2025
322a7e1
Remove unnecessary device queries (#620)
nproshun Mar 28, 2025
25912f7
Add support for parsing AUTO, HETERO and MULTI from json config (#605)
preetha-intel Apr 2, 2025
fbf43a9
Revert "[OVEP] Fix for Dynamic backend creation for NPU. (#622)" (#635)
gupta-pallavi Apr 3, 2025
2313d11
[OVEP] Fix for building OVEP without vcpkg flag (#637)
jatinwadhwa921 Apr 3, 2025
a9a3d10
Merge branch 'master' into sync_msft_4_4_25
jatinwadhwa921 Apr 4, 2025
0636815
Merge pull request #638 from intel/sync_msft_4_4_25
jatinwadhwa921 Apr 4, 2025
1e85f1d
[OVEP] Updated Documentation for python wheels (#640)
jatinwadhwa921 Apr 4, 2025
80dfee9
Device type refactoring (#630)
preetha-intel Apr 4, 2025
2e4d541
Enable adaptive stripping and eliminate dependency of weight sharing …
saurabhkale17 Apr 7, 2025
c0c347c
Add Config for Release build
saurabhkale17 Apr 8, 2025
8517c64
Merge branch 'master' into syncing_msft_8_4_25
saurabhkale17 Apr 8, 2025
b999a1b
Merge pull request #643 from intel/syncing_msft_8_4_25
jatinwadhwa921 Apr 8, 2025
a8527b9
Bug fix in provider key verification (#644)
preetha-intel Apr 8, 2025
4e63ef6
Fix the LUID check (#647)
preetha-intel Apr 10, 2025
f0216fd
Merge branch 'master' into sync_msft_10_4_25
jatinwadhwa921 Apr 10, 2025
a5e6e05
Merge pull request #649 from intel/sync_msft_10_4_25
jatinwadhwa921 Apr 10, 2025
6fc0ed0
Update OV version for Intel Internal CI
jatinwadhwa921 Apr 11, 2025
9294c4c
Merge pull request #652 from intel/jatin_update_int_ci_2025_1
ankitm3k Apr 11, 2025
c2558f3
[OVEP] Update ov version in ort (#653)
jatinwadhwa921 Apr 11, 2025
ad5f824
Removing support for internal ci(Intel Internal) (#662)
jatinwadhwa921 Apr 17, 2025
254bda0
Merge branch 'master' into sync_msft_17_4_25
jatinwadhwa921 Apr 17, 2025
21c7ab3
Merge pull request #663 from intel/sync_msft_17_4_25
jatinwadhwa921 Apr 17, 2025
4c0acd8
Support for triggering Internal Ci(Intel Internal) (#665)
jatinwadhwa921 Apr 21, 2025
7401335
incorporate requested changes for PR:24394 (#661)
saurabhkale17 Apr 21, 2025
269f6fe
Add support for session option ep.stop_context_sharing (#655)
javier-intel Apr 23, 2025
7451884
Merge branch 'master' into sync_msft_24_4_25
jatinwadhwa921 Apr 24, 2025
e59c069
Merge pull request #675 from intel/sync_msft_24_4_25
ankitm3k Apr 24, 2025
9ee331a
Revert "Add support for session option ep.stop_context_sharing (#655)…
ankitm3k Apr 24, 2025
a077c79
Release model proto after we have the serialized string to reduce pea…
intbf Apr 29, 2025
9dd6a1a
Merge branch 'master' into sync_msft_2_5_25
jatinwadhwa921 May 2, 2025
e354009
Merge pull request #683 from intel/sync_msft_2_5_25
jatinwadhwa921 May 2, 2025
8d2f3c4
add channel wise quantization option for QDQ, and opt for intel NPU (…
bopeng1234 May 14, 2025
76d3122
Don't include initializers in compute capability (#686)
ericcraw May 15, 2025
e6dd15b
Merge branch 'master' into sync_msft_16_5_25
jatinwadhwa921 May 16, 2025
080f66b
Merge pull request #692 from intel/sync_msft_16_5_25
ankitm3k May 16, 2025
8d57482
[OVEP] Fixed coverity issues (#693)
jatinwadhwa921 May 19, 2025
599cd25
[GPU] Enable qdq_stripping path for GPU (#694)
intbf May 23, 2025
1a22a57
Optimize CPU time spent in inference path (#682)
ericcraw May 26, 2025
b602f47
Support workload type for dynamic shaped models (#690)
preetha-intel May 26, 2025
ad5413d
Merge branch 'master' into sync_msft_2_6_25
jatinwadhwa921 Jun 2, 2025
be8fded
Merge pull request #699 from intel/sync_msft_2_6_25
ankitm3k Jun 2, 2025
be8f8be
Sahar/tdr failure (#698)
sfatimar Jun 5, 2025
660adfc
feat: ORT GenAI Stateful Compilation changes (#676)
ankitm3k Jun 5, 2025
5ec3c7e
OVEP unittest (#685)
vthaniel Jun 10, 2025
81c5f59
Merge branch 'master' into ovep-develop
ankitm3k Jun 13, 2025
f86768b
Merge pull request #708 from intel/sync_msft_13_6_25
ankitm3k Jun 13, 2025
ca06b7a
Support for bounded dynamic model (#701)
preetha-intel Jun 14, 2025
9b245a4
[OVEP] Fix for appropriate device not selected (#696)
jatinwadhwa921 Jun 16, 2025
409b224
Improve the condition for device=GPU and qdq stripping enabled (#705)
intbf Jun 16, 2025
cbef617
Optimize CPU time spent in inference path (continued) (#695)
ericcraw Jun 19, 2025
6d04a2e
feat: Enable EpContext OVIR Encapsulation (#704)
ankitm3k Jun 24, 2025
278f6a7
Add operator hardSwish into OVEP (#709)
Kotomi-Du Jun 25, 2025
90869ff
[CVS-169168] Change name of metadata file and add filepath validation…
javier-intel Jun 25, 2025
e141e2f
fix: Fix logic in OnnxToOvNetworkBindings for stateful models (#719)
RyanMetcalfeInt8 Jun 25, 2025
7176c12
Merge branch 'master' into sync_msft_25_6_25
ankitm3k Jun 25, 2025
a95ed23
Merge pull request #721 from intel/sync_msft_25_6_25
ankitm3k Jun 25, 2025
7f86fad
[OVEP] Fix UnsupportedOpMode logic for Reshape
mdvoretc-intel Jun 10, 2025
dfc8ff0
Fix metadata name when ep.context_file_path is not provided (#722)
javier-intel Jun 27, 2025
0c1fcfd
EPCtx changes for dynamic model with reshape_input provider optional …
gupta-pallavi Jul 1, 2025
f3672df
Merge branch 'master' into ovep-develop
ankitm3k Jul 2, 2025
c3284bc
Merge pull request #724 from intel/sync_msft_2_7_27
ankitm3k Jul 2, 2025
13e7792
fix: enable test & lint fixes (#725)
ankitm3k Jul 2, 2025
80daa9b
Reduce the peak memory even with CPU fallback by moving the fallback …
preetha-intel Jul 2, 2025
e2ec2b3
Add QDQ scale propagation pass (#713)
javier-intel Jul 3, 2025
3238a90
Added to remove MAC CI Warnings (#726)
sfatimar Jul 3, 2025
1695972
fix: Undo perf_runner changes (#727)
ankitm3k Jul 3, 2025
3106e3b
Merge branch 'master' into sync_msft_4_7_25
ankitm3k Jul 4, 2025
aa1730c
Merge pull request #730 from intel/sync_msft_4_7_25
ankitm3k Jul 4, 2025
efd14d9
Merge branch 'master' into sync_msft_7_7_25
ankitm3k Jul 7, 2025
66eceb9
Merge pull request #731 from intel/sync_msft_7_7_25
ankitm3k Jul 7, 2025
c9a5348
Merge branch 'master' into sync_msft_8_7_25
ankitm3k Jul 8, 2025
8264e36
Merge pull request #733 from intel/sync_msft_8_7_25
jatinwadhwa921 Jul 8, 2025
54151b1
Enable dynamic path for NPU when enable_causallm is true (#732)
RyanMetcalfeInt8 Jul 8, 2025
b4b9492
Merge branch 'master' into sync_msft_9_7_25
ankitm3k Jul 9, 2025
f89f64e
Merge pull request #734 from intel/sync_msft_9_7_25
ankitm3k Jul 9, 2025
8d36ad2
Allow zero-element tensors to get set (#737)
RyanMetcalfeInt8 Jul 10, 2025
89ccd81
Cluster Change to avoid Dangling DQLinear (#739)
sfatimar Jul 11, 2025
05126ff
Fix the model copies and redefinitions for CPU fallback (#728)
preetha-intel Jul 16, 2025
776bedf
Revert "Cluster Change to avoid Dangling DQLinear (#739)" (#743)
sfatimar Jul 16, 2025
bc3dc45
Sync ORT main 16 07 25 (#744)
ankitm3k Jul 16, 2025
bda52f6
Merge branch 'master' into sync_msft_17_7_25
ankitm3k Jul 17, 2025
87a7ac0
Revert "Sync ORT main 16 07 25 (#744)" (#745)
ankitm3k Jul 17, 2025
acb29b6
Merge pull request #746 from intel/sync_msft_17_7_25
ankitm3k Jul 17, 2025
ea8cf21
Added support for 2025.2 and enabled SimplifiedLayerNormalization op …
n1harika Jul 17, 2025
8642e8b
Merge branch 'master' into sync_ort_main_19_7_25
ankitm3k Jul 19, 2025
a616aba
Merge pull request #749 from intel/sync_ort_main_19_7_25
ankitm3k Jul 19, 2025
217f285
[OVEP] Fix coverity issues (#753)
jatinwadhwa921 Jul 21, 2025
138c6e0
[OVEP] feat: Integrate new ABI with Legacy OVEP Plugin (#747)
ankitm3k Jul 21, 2025
dfdda93
Merge branch 'master' into sync_msft_22_7_25
ankitm3k Jul 21, 2025
a90ebe5
Merge pull request #756 from intel/sync_msft_22_7_25
sfatimar Jul 21, 2025
332b734
minor CI fixes
ankitm3k Jul 21, 2025
5f933aa
lint fixes
ankitm3k Jul 21, 2025
12acb28
ovep: Add const OrtLogger* /*default_logger*/ to CreateEpFactories
RyanMetcalfeInt8 Jul 21, 2025
5c0233c
ovep: remove openvino_plugin.cc gtests
RyanMetcalfeInt8 Jul 22, 2025
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
11 changes: 8 additions & 3 deletions onnxruntime/core/providers/openvino/backend_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,13 @@ BackendManager::BackendManager(SessionContext& session_context,
}
if (session_context_.so_context_enable &&
(subgraph_context_.is_ep_ctx_ovir_encapsulated || !subgraph_context_.is_ep_ctx_graph)) {
auto status = onnxruntime::openvino_ep::BackendManager::ExportCompiledBlobAsEPCtxNode(subgraph);
if (!status.IsOK()) {
ORT_THROW(status);
if (concrete_backend_) {
auto status = onnxruntime::openvino_ep::BackendManager::ExportCompiledBlobAsEPCtxNode(subgraph);
if (!status.IsOK()) {
ORT_THROW(status);
}
} else {
ORT_THROW("[OpenVINO-EP] Cannot export compiled blob as EPCtx Node: Backend not initialized.");
}
}
}
Expand Down Expand Up @@ -660,6 +664,7 @@ void BackendManager::Compute(OrtKernelContext* context) {
}

void BackendManager::ShutdownBackendManager() {
std::unique_lock<std::mutex> lock(mutex_);
backend_map_.clear();
concrete_backend_.reset();
}
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/openvino/backend_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
std::transform(ort_shape.begin(), ort_shape.end(), ov_shape.begin(), [](int64_t dim) {
return dim == -1 ? ov::Dimension::dynamic() : ov::Dimension(dim);
});
return ov::PartialShape(ov_shape);
return ov::PartialShape(std::move(ov_shape));

Check warning on line 40 in onnxruntime/core/providers/openvino/backend_utils.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <utility> for move [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/openvino/backend_utils.h:40: Add #include <utility> for move [build/include_what_you_use] [4]
}

static ort_shape_t ToOrtShape(const ov::PartialShape& ov_shape) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ BasicBackend::BasicBackend(std::unique_ptr<ONNX_NAMESPACE::ModelProto>& model_pr
// model_file_path will use so_context_file_path if the onnx_model_path_name is not available,
// especially in case of CreateSessionFormArray() where user must explicitly
// specify absolute path for so_context_file_path.
auto model_file_path = [this]() {
auto model_file_path = [this]() -> const std::filesystem::path& {
if (!session_context_.onnx_model_path_name.empty() &&
std::filesystem::exists(session_context_.onnx_model_path_name)) return session_context_.onnx_model_path_name;

Expand Down
2 changes: 2 additions & 0 deletions onnxruntime/core/providers/openvino/exported_symbols.lst
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
_GetProvider
_CreateEpFactories
_ReleaseEpFactory
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ common::Status OpenVINOExecutionProvider::Compile(
fs::path metadata_file_path = context_model_file_path.parent_path() / metadata_filename;
std::ifstream file(metadata_file_path, std::ios::binary);
ORT_RETURN_IF_NOT(file, "Metadata file was not found: " + metadata_file_path.string());
shared_context_->shared_weights.metadata_filepath = metadata_file_path;
shared_context_->shared_weights.metadata_filepath = std::move(metadata_file_path);
file >> metadata;
}

Expand Down
6 changes: 3 additions & 3 deletions onnxruntime/core/providers/openvino/openvino_parser_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
}

// Process each tensor definition e.g. "input_1[1..5, 2, 3..4],data[1,2,3]"
for (std::sregex_iterator i = tensor_begin; i != tensor_end; ++i) {
for (std::sregex_iterator i = std::move(tensor_begin); i != tensor_end; ++i) {
std::smatch tensor_match = *i;

// Extract tensor name and trim whitespace
Expand All @@ -165,7 +165,7 @@
auto dim_end = std::sregex_iterator();

// Process each dimension
for (std::sregex_iterator j = dim_begin; j != dim_end; ++j) {
for (std::sregex_iterator j = std::move(dim_begin); j != dim_end; ++j) {
std::smatch dim_match = *j;
std::string dim_value = dim_match[1].str();

Expand All @@ -190,7 +190,7 @@
}

// Store parsed shape in result map
parsed_shape_map[tensor_name] = ov::PartialShape(dimensions);
parsed_shape_map[tensor_name] = ov::PartialShape(std::move(dimensions));

Check warning on line 193 in onnxruntime/core/providers/openvino/openvino_parser_utils.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <utility> for move [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/openvino/openvino_parser_utils.cc:193: Add #include <utility> for move [build/include_what_you_use] [4]
}

return parsed_shape_map;
Expand Down
120 changes: 120 additions & 0 deletions onnxruntime/core/providers/openvino/openvino_provider_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,17 @@
return ov_ep;
}

// This is called during session creation when AppendExecutionProvider_V2 is used.
// This one is called because ParseProviderInfo / ParseConfigOptions, etc. are already
// performed in CreateIExecutionProvider, and so provider_info_ has already been populated.
std::unique_ptr<IExecutionProvider> CreateProvider_V2(const OrtSessionOptions& /*session_options*/,
const OrtLogger& session_logger) {
ProviderInfo provider_info = provider_info_;
auto ov_ep = std::make_unique<OpenVINOExecutionProvider>(provider_info, shared_context_);
ov_ep->SetLogger(reinterpret_cast<const logging::Logger*>(&session_logger));
return ov_ep;
}

private:
ProviderInfo provider_info_;
std::shared_ptr<SharedContext> shared_context_;
Expand Down Expand Up @@ -433,6 +444,115 @@
return std::make_shared<OpenVINOProviderFactory>(pi, SharedContext::Get());
}

Status CreateIExecutionProvider(const OrtHardwareDevice* const* /*devices*/,
const OrtKeyValuePairs* const* ep_metadata,
size_t num_devices,
ProviderOptions& provider_options,
const OrtSessionOptions& session_options,
const OrtLogger& logger,
std::unique_ptr<IExecutionProvider>& ep) override {
// Check if no devices are provided
if (num_devices == 0) {
return Status(common::ONNXRUNTIME, ORT_EP_FAIL, "No devices provided to CreateIExecutionProvider");
}

// For provider options that we don't support directly but are still supported through load_config,
// give some specific guidance & example about how to make use of the option through load_config.
const std::vector<std::pair<std::string, std::string>> block_and_advise_entries = {
{"cache_dir", "\"CACHE_DIR\": \"<filesystem_path>\""},
{"precision", "\"INFERENCE_PRECISION_HINT\": \"F32\""},
{"num_of_threads", "\"INFERENCE_NUM_THREADS\": \"1\""},
{"num_streams", "\"NUM_STREAMS\": \"1\""},
{"model_priority", "\"MODEL_PRIORITY\": \"LOW\""},
{"enable_opencl_throttling", "\"GPU\": {\"PLUGIN_THROTTLE\": \"1\"}"},
{"enable_qdq_optimizer", "\"NPU\": {\"NPU_QDQ_OPTIMIZATION\": \"YES\"}"}};

for (auto& block_and_advise_entry : block_and_advise_entries) {
if (provider_options.find(block_and_advise_entry.first) != provider_options.end()) {
std::string message = "OpenVINO EP: Option '" + block_and_advise_entry.first +
"' cannot be set when using AppendExecutionProvider_V2. " +
"It can instead be enabled by a load_config key / value pair. For example: " +
block_and_advise_entry.second;
return Status(common::ONNXRUNTIME, ORT_INVALID_ARGUMENT, message);
}
}

// For the rest of the disallowed provider options, give a generic error message.
const std::vector<std::string> blocked_provider_keys = {
"device_type", "device_id", "device_luid", "context", "disable_dynamic_shapes"};

for (const auto& key : blocked_provider_keys) {
if (provider_options.find(key) != provider_options.end()) {
return Status(common::ONNXRUNTIME, ORT_INVALID_ARGUMENT,
"OpenVINO EP: Option '" + key + "' cannot be set when using AppendExecutionProvider_V2.");
}
}

const char* ov_device_key = "ov_device";
const char* ov_meta_device_key = "ov_meta_device";

// Create a unique list of ov_devices that were passed in.
std::unordered_set<std::string_view> unique_ov_devices;

Check warning on line 495 in onnxruntime/core/providers/openvino/openvino_provider_factory.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <unordered_set> for unordered_set<> [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/openvino/openvino_provider_factory.cc:495: Add #include <unordered_set> for unordered_set<> [build/include_what_you_use] [4]
std::vector<std::string_view> ordered_unique_ov_devices;

Check warning on line 496 in onnxruntime/core/providers/openvino/openvino_provider_factory.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <vector> for vector<> [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/openvino/openvino_provider_factory.cc:496: Add #include <vector> for vector<> [build/include_what_you_use] [4]
for (size_t i = 0; i < num_devices; ++i) {
const auto& device_meta_data = ep_metadata[i];
auto ov_device_it = device_meta_data->Entries().find(ov_device_key);
if (ov_device_it == device_meta_data->Entries().end()) {
return Status(common::ONNXRUNTIME, ORT_INVALID_ARGUMENT, "OpenVINO EP device metadata not found.");
}
auto& ov_device = ov_device_it->second;

// Add to ordered_unique only if not already present
if (unique_ov_devices.insert(ov_device).second) {
ordered_unique_ov_devices.push_back(ov_device);
}
}

std::string ov_meta_device_type = "NONE";
{
auto ov_meta_device_it = ep_metadata[0]->Entries().find(ov_meta_device_key);
if (ov_meta_device_it != ep_metadata[0]->Entries().end()) {
ov_meta_device_type = ov_meta_device_it->second;
}
}

bool is_meta_device_factory = (ov_meta_device_type != "NONE");

if (ordered_unique_ov_devices.size() > 1 && !is_meta_device_factory) {
LOGS_DEFAULT(WARNING) << "[OpenVINO EP] Multiple devices were specified that are not OpenVINO meta devices. Using first ov_device only: " << ordered_unique_ov_devices.at(0);
ordered_unique_ov_devices.resize(1); // Use only the first device if not a meta device factory
}

std::string ov_device_string;

Check warning on line 526 in onnxruntime/core/providers/openvino/openvino_provider_factory.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <string> for string [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/openvino/openvino_provider_factory.cc:526: Add #include <string> for string [build/include_what_you_use] [4]
if (is_meta_device_factory) {
// Build up a meta device string based on the devices that are passed in. E.g. AUTO:NPU,GPU.0,CPU
ov_device_string = ov_meta_device_type;
ov_device_string += ":";
}

bool prepend_comma = false;
for (const auto& ov_device : ordered_unique_ov_devices) {
if (prepend_comma) {
ov_device_string += ",";
}
ov_device_string += ov_device;
prepend_comma = true;
}

provider_options["device_type"] = ov_device_string;

// Parse provider info with the device type
ProviderInfo pi;
const auto& config_options = session_options.GetConfigOptions();
ParseProviderInfo(provider_options, &config_options, pi);
ParseConfigOptions(pi);

// Create and return the execution provider
auto factory = std::make_unique<OpenVINOProviderFactory>(pi, SharedContext::Get());

Check warning on line 551 in onnxruntime/core/providers/openvino/openvino_provider_factory.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <memory> for make_unique<> [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/openvino/openvino_provider_factory.cc:551: Add #include <memory> for make_unique<> [build/include_what_you_use] [4]
ep = factory->CreateProvider_V2(session_options, logger);
return Status::OK();
}

void Initialize() override {
}

Expand Down
Loading
Loading