From c6707015bd64f34528d2a2481d43e0e52e1dbb5c Mon Sep 17 00:00:00 2001 From: "Neil R. Spruit" Date: Thu, 6 Mar 2025 09:24:50 -0800 Subject: [PATCH] [UR][L0] Disable Immediate Command List DG2 Windows Signed-off-by: Neil R. Spruit --- CMakeLists.txt | 2 +- source/adapters/level_zero/device.cpp | 13 ++++++++++++- source/adapters/level_zero/device.hpp | 5 +++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b725f90485..deabfae6b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception cmake_minimum_required(VERSION 3.20.0 FATAL_ERROR) -project(unified-runtime VERSION 0.11.8) +project(unified-runtime VERSION 0.11.9) # Check if unified runtime is built as a standalone project. if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR UR_STANDALONE_BUILD) diff --git a/source/adapters/level_zero/device.cpp b/source/adapters/level_zero/device.cpp index 6705c4c659..f5f767ea81 100644 --- a/source/adapters/level_zero/device.cpp +++ b/source/adapters/level_zero/device.cpp @@ -1490,12 +1490,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; diff --git a/source/adapters/level_zero/device.hpp b/source/adapters/level_zero/device.hpp index fb4c519c34..d8f9082af0 100644 --- a/source/adapters/level_zero/device.hpp +++ b/source/adapters/level_zero/device.hpp @@ -196,6 +196,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); }