We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eda1536 commit 75b1f87Copy full SHA for 75b1f87
src/plugins/intel_gpu/src/plugin/plugin.cpp
@@ -83,6 +83,14 @@ std::string Plugin::get_device_id(const ov::AnyMap& config) const {
83
std::string id = m_default_device_id;
84
if (config.find(ov::device::id.name()) != config.end()) {
85
id = config.at(ov::device::id.name()).as<std::string>();
86
+ } else {
87
+ for (const auto& [dev_id, dev_context] : get_default_contexts()) {
88
+ const auto& dev_info = dev_context->get_device().get_info();
89
+ // prefer the first available Intel dGPU over iGPU
90
+ if (dev_info.dev_type == cldnn::device_type::discrete_gpu && dev_info.arch != cldnn::gpu_arch::unknown) {
91
+ return dev_id;
92
+ }
93
94
}
95
return id;
96
0 commit comments