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
13 changes: 12 additions & 1 deletion unified-runtime/source/adapters/level_zero/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1512,12 +1512,23 @@ ur_device_handle_t_::useImmediateCommandLists() {
bool isDG2OrNewer = this->isIntelDG2OrNewer();
bool isDG2SupportedDriver =
this->Platform->isDriverVersionNewerOrSimilar(1, 5, 30820);
if ((isDG2SupportedDriver && isDG2OrNewer) || isPVC()) {
// Disable immediate command lists for DG2 devices on Windows due to driver
// limitations.
bool isLinux = true;
#ifdef _WIN32
isLinux = false;
#endif
if ((isDG2SupportedDriver && isDG2OrNewer && isLinux) || isPVC() ||
isNewerThanIntelDG2()) {
return PerQueue;
} else {
return NotUsed;
}
}

logger::info("NOTE: L0 Immediate CommandList Setting: {}",
ImmediateCommandlistsSetting);

switch (ImmediateCommandlistsSetting) {
case 0:
return NotUsed;
Expand Down
5 changes: 5 additions & 0 deletions unified-runtime/source/adapters/level_zero/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ struct ur_device_handle_t_ : _ur_object {
ZeDeviceIpVersionExt->ipVersion >= 0x030dc000);
}

bool isNewerThanIntelDG2() {
return (ZeDeviceProperties->vendorId == 0x8086 &&
ZeDeviceIpVersionExt->ipVersion >= 0x030f0000);
}

bool isIntegrated() {
return (ZeDeviceProperties->flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED);
}
Expand Down