Skip to content

Commit 68cacbf

Browse files
authored
[UR][L0] Disable Immediate Command List DG2 Windows (#17334)
Signed-off-by: Neil R. Spruit <[email protected]>
1 parent acfbc00 commit 68cacbf

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

unified-runtime/source/adapters/level_zero/device.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,12 +1512,23 @@ ur_device_handle_t_::useImmediateCommandLists() {
15121512
bool isDG2OrNewer = this->isIntelDG2OrNewer();
15131513
bool isDG2SupportedDriver =
15141514
this->Platform->isDriverVersionNewerOrSimilar(1, 5, 30820);
1515-
if ((isDG2SupportedDriver && isDG2OrNewer) || isPVC()) {
1515+
// Disable immediate command lists for DG2 devices on Windows due to driver
1516+
// limitations.
1517+
bool isLinux = true;
1518+
#ifdef _WIN32
1519+
isLinux = false;
1520+
#endif
1521+
if ((isDG2SupportedDriver && isDG2OrNewer && isLinux) || isPVC() ||
1522+
isNewerThanIntelDG2()) {
15161523
return PerQueue;
15171524
} else {
15181525
return NotUsed;
15191526
}
15201527
}
1528+
1529+
logger::info("NOTE: L0 Immediate CommandList Setting: {}",
1530+
ImmediateCommandlistsSetting);
1531+
15211532
switch (ImmediateCommandlistsSetting) {
15221533
case 0:
15231534
return NotUsed;

unified-runtime/source/adapters/level_zero/device.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ struct ur_device_handle_t_ : _ur_object {
195195
ZeDeviceIpVersionExt->ipVersion >= 0x030dc000);
196196
}
197197

198+
bool isNewerThanIntelDG2() {
199+
return (ZeDeviceProperties->vendorId == 0x8086 &&
200+
ZeDeviceIpVersionExt->ipVersion >= 0x030f0000);
201+
}
202+
198203
bool isIntegrated() {
199204
return (ZeDeviceProperties->flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED);
200205
}

0 commit comments

Comments
 (0)