Skip to content

Commit 2db52dd

Browse files
nazanin-beheshtiankitm3kMayureshV1
authored
Fix incorrect device selection(NPU) with python app running OVEP GPU … (#1046)
* Fix incorrect device selection(NPU) with python app running OVEP GPU backend * apply reviwer comment * apply new change * remove last change and extra space * remove space * cleaning * fix the name * Revert "cleaning" This reverts commit c58f3d6. * Revert "remove space" This reverts commit ba1939b. * Revert "remove last change and extra space" This reverts commit 0cc2294. * Revert "apply new change" This reverts commit bddb18b. * Revert "fix the name" This reverts commit c800fdc. * revert back new changes --------- Co-authored-by: Ankit Maheshkar <ankit.maheshkar@intel.com> Co-authored-by: MayureshV1 <47039074+MayureshV1@users.noreply.github.com>
1 parent 9ab8a5d commit 2db52dd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

onnxruntime/core/providers/openvino/openvino_provider_factory.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,12 @@ struct OpenVINOProviderFactory : IExecutionProviderFactory {
422422
}
423423
}
424424

425+
if (provider_options.find("device_type") == provider_options.end()) {
426+
// Preserve the device selected during factory creation unless the session-level
427+
// OpenVINO provider options explicitly override it.
428+
provider_options["device_type"] = provider_info_.device_type;
429+
}
430+
425431
ProviderInfo provider_info = provider_info_;
426432
ParseProviderInfo(provider_options, &config_options, provider_info);
427433
ParseConfigOptions(provider_info);

0 commit comments

Comments
 (0)