Skip to content

Commit 75b1f87

Browse files
committed
Select Intel dGPU as a default device
1 parent eda1536 commit 75b1f87

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/plugins/intel_gpu/src/plugin/plugin.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ std::string Plugin::get_device_id(const ov::AnyMap& config) const {
8383
std::string id = m_default_device_id;
8484
if (config.find(ov::device::id.name()) != config.end()) {
8585
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+
}
8694
}
8795
return id;
8896
}

0 commit comments

Comments
 (0)