We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82e46f2 commit 2e21f59Copy full SHA for 2e21f59
unified-runtime/source/adapters/level_zero/device.cpp
@@ -155,8 +155,13 @@ ur_result_t urDeviceGet(
155
bool isComposite =
156
isCombinedMode && (D->ZeDeviceProperties->flags &
157
ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE) == 0;
158
- if (!isComposite)
+ if (!isComposite) {
159
MatchedDevices.push_back(D.get());
160
+ // For UR_DEVICE_TYPE_DEFAULT only a single device should be returned,
161
+ // so exit the loop after first proper match.
162
+ if (DeviceType == UR_DEVICE_TYPE_DEFAULT)
163
+ break;
164
+ }
165
}
166
167
0 commit comments