From 03ee001445886c8af4dfe4d2e29d0a8ccc31507f Mon Sep 17 00:00:00 2001 From: Bartosz Dunajski Date: Mon, 23 Mar 2020 15:18:41 +0100 Subject: [PATCH] Set valid number of bits in execution mask Change-Id: I65c3f8cab2f7f86ce36fe476a221242ba5e73b68 Signed-off-by: Bartosz Dunajski --- level_zero/core/source/kernel_imp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/level_zero/core/source/kernel_imp.cpp b/level_zero/core/source/kernel_imp.cpp index 689c4fbc78..2b3ace017c 100644 --- a/level_zero/core/source/kernel_imp.cpp +++ b/level_zero/core/source/kernel_imp.cpp @@ -274,7 +274,7 @@ ze_result_t KernelImp::setGroupSize(uint32_t groupSizeX, uint32_t groupSizeY, auto remainderSimdLanes = itemsInGroup & (simdSize - 1u); threadExecutionMask = static_cast(maxNBitValue(remainderSimdLanes)); if (!threadExecutionMask) { - threadExecutionMask = ~threadExecutionMask; + threadExecutionMask = static_cast(maxNBitValue(simdSize)); } return ZE_RESULT_SUCCESS;