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
6 changes: 5 additions & 1 deletion onnxruntime/core/platform/windows/device_discovery.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,12 @@ std::unordered_map<uint64_t, DeviceInfo> GetDeviceInfoD3D12(bool have_remote_dis
continue;
}

// Microsoft Remote Display Adapter and Microsoft Hyper-V Video display adapters use the basic render driver
// but don't set the DXGI_ADAPTER_FLAG_SOFTWARE flag. Filter them out by checking the vendor and device IDs.
const bool is_microsoft_basic_render_driver = desc.VendorId == 0x1414 && desc.DeviceId == 0x008c;
if ((desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) != 0 ||
(desc.Flags & DXGI_ADAPTER_FLAG_REMOTE) != 0) {
(desc.Flags & DXGI_ADAPTER_FLAG_REMOTE) != 0 ||
is_microsoft_basic_render_driver) {
// software or remote. skip
continue;
}
Expand Down
10 changes: 10 additions & 0 deletions onnxruntime/test/platform/device_discovery_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,15 @@ TEST(DeviceDiscoveryTest, GpuDevicesHaveValidProperties) {
}
}

#ifdef _WIN32
TEST(DeviceDiscoveryTest, ExcludesMicrosoftBasicRenderDriver) {
const auto gpu_devices = GetDevicesByType(OrtHardwareDeviceType_GPU);

for (const auto& gpu_device : gpu_devices) {
EXPECT_FALSE(gpu_device.vendor_id == 0x1414 && gpu_device.device_id == 0x008c);
Comment thread
skottmckay marked this conversation as resolved.
}
}
#endif

} // namespace onnxruntime::test
#endif // !defined(ORT_MINIMAL_BUILD) && !defined(_GAMING_XBOX)
Loading