Skip to content

Commit c48a73c

Browse files
committed
[UR][L0] Disable Immediate Command Lists by default on MTL Linux
- disable using immediate command lists by default on MTL Linux to acheive the best performance without user environment changes Signed-off-by: Neil R. Spruit <[email protected]>
1 parent 45cf443 commit c48a73c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,12 +1795,18 @@ ur_device_handle_t_::useImmediateCommandLists() {
17951795
bool isDG2OrNewer = this->isIntelDG2OrNewer();
17961796
bool isDG2SupportedDriver =
17971797
this->Platform->isDriverVersionNewerOrSimilar(1, 5, 30820);
1798+
bool isIntelMTLDevice = this->isIntelMTL();
17981799
// Disable immediate command lists for DG2 devices on Windows due to driver
17991800
// limitations.
18001801
bool isLinux = true;
18011802
#ifdef _WIN32
18021803
isLinux = false;
18031804
#endif
1805+
// Disable immediate command lists for Intel MTL devices on Linux by default
1806+
// due to driver limitations.
1807+
if (isIntelMTLDevice && isLinux) {
1808+
return NotUsed;
1809+
}
18041810
if ((isDG2SupportedDriver && isDG2OrNewer && isLinux) || isPVC() ||
18051811
isNewerThanIntelDG2()) {
18061812
return PerQueue;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ 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+
191197
bool isIntelDG2OrNewer() {
192198
return (ZeDeviceProperties->vendorId == 0x8086 &&
193199
ZeDeviceIpVersionExt->ipVersion >= 0x030dc000);

0 commit comments

Comments
 (0)