Skip to content

Commit c10bbaf

Browse files
committed
fix zeCommandListAppendMemoryFill bug
Signed-off-by: Mateusz P. Nowak <[email protected]>
1 parent 6872601 commit c10bbaf

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

unified-runtime/cmake/FetchLevelZero.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ if(NOT LEVEL_ZERO_LIB_NAME AND NOT LEVEL_ZERO_LIBRARY)
5050
set(UR_LEVEL_ZERO_LOADER_REPO "https://github.com/oneapi-src/level-zero.git")
5151
# Remember to update the pkg_check_modules minimum version above when updating the
5252
# clone tag
53-
set(UR_LEVEL_ZERO_LOADER_TAG v1.24.3)
53+
# set(UR_LEVEL_ZERO_LOADER_TAG v1.24.3)
54+
# commit of updated leak checker (PR#376)
55+
set(UR_LEVEL_ZERO_LOADER_TAG 5187acd1c0f34097658f6ed890f1e5a65bdc35b9)
5456

5557
# Disable due to a bug https://github.com/oneapi-src/level-zero/issues/104
5658
set(CMAKE_INCLUDE_CURRENT_DIR OFF)

unified-runtime/source/adapters/level_zero/v2/command_list_manager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ ur_result_t ur_command_list_manager::appendGenericFillUnlocked(
3838

3939
// PatternSize must be a power of two for zeCommandListAppendMemoryFill.
4040
// When it's not, the fill is emulated with zeCommandListAppendMemoryCopy.
41-
if (isPowerOf2(patternSize)) {
41+
// WORKAROUND: Level Zero driver rejects zeCommandListAppendMemoryFill when
42+
// patternSize == size, returning ZE_RESULT_ERROR_INVALID_SIZE (0x78000008).
43+
if (isPowerOf2(patternSize) && patternSize != size) {
4244
ZE2UR_CALL(zeCommandListAppendMemoryFill,
4345
(zeCommandList.get(), pDst, pPattern, patternSize, size,
4446
zeSignalEvent, waitListView.num, waitListView.handles));

0 commit comments

Comments
 (0)