Skip to content

Commit 7f416b7

Browse files
[UR][L0] Disable Immediate Command Lists by default on MTL/ARL Linux (intel#20167)
This is a cherry-pick of intel#19950 - disable using immediate command lists by default on MTL/ARL Linux to achieve the best performance without user environment changes Patch-by: Neil R. Spruit <[email protected]>
1 parent 2976c7e commit 7f416b7

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,12 +1790,19 @@ ur_device_handle_t_::useImmediateCommandLists() {
17901790
bool isDG2OrNewer = this->isIntelDG2OrNewer();
17911791
bool isDG2SupportedDriver =
17921792
this->Platform->isDriverVersionNewerOrSimilar(1, 5, 30820);
1793+
bool isIntelMTLDevice = this->isIntelMTL();
1794+
bool isIntelARLDevice = this->isIntelARL();
17931795
// Disable immediate command lists for DG2 devices on Windows due to driver
17941796
// limitations.
17951797
bool isLinux = true;
17961798
#ifdef _WIN32
17971799
isLinux = false;
17981800
#endif
1801+
// Disable immediate command lists for Intel MTL/ARL devices on Linux by
1802+
// default due to driver limitations.
1803+
if ((isIntelMTLDevice || isIntelARLDevice) && isLinux) {
1804+
return NotUsed;
1805+
}
17991806
if ((isDG2SupportedDriver && isDG2OrNewer && isLinux) || isPVC() ||
18001807
isNewerThanIntelDG2()) {
18011808
return PerQueue;

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,18 @@ struct ur_device_handle_t_ : ur_object {
188188
// Checks if this GPU is an Intel Flex GPU or Intel Arc Alchemist
189189
bool isDG2() { return (ZeDeviceProperties->deviceId & 0xff00) == 0x5600; }
190190

191+
bool isIntelMTL() {
192+
return (ZeDeviceProperties->vendorId == 0x8086 &&
193+
ZeDeviceIpVersionExt->ipVersion >= 0x03118000 &&
194+
ZeDeviceIpVersionExt->ipVersion <= 0x0311c004);
195+
}
196+
197+
bool isIntelARL() {
198+
return (ZeDeviceProperties->vendorId == 0x8086 &&
199+
ZeDeviceIpVersionExt->ipVersion >= 0x03128000 &&
200+
ZeDeviceIpVersionExt->ipVersion <= 0x03128004);
201+
}
202+
191203
bool isIntelDG2OrNewer() {
192204
return (ZeDeviceProperties->vendorId == 0x8086 &&
193205
ZeDeviceIpVersionExt->ipVersion >= 0x030dc000);

0 commit comments

Comments
 (0)