mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:06:32 +08:00
fix: Unify logic calculating threads per work group part 4
- also use helper when checking that is simd1 to have same flow Related-To: NEO-8087 Signed-off-by: Cencelewska, Katarzyna <katarzyna.cencelewska@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dcd0bd4c30
commit
aa0beb8191
@@ -21,6 +21,7 @@
|
||||
#include "shared/source/helpers/per_thread_data.h"
|
||||
#include "shared/source/helpers/ray_tracing_helper.h"
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/source/helpers/simd_helper.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/helpers/surface_format_info.h"
|
||||
#include "shared/source/kernel/implicit_args.h"
|
||||
@@ -331,7 +332,7 @@ ze_result_t KernelImp::setGroupSize(uint32_t groupSizeX, uint32_t groupSizeY,
|
||||
auto remainderSimdLanes = itemsInGroup & (simdSize - 1u);
|
||||
threadExecutionMask = static_cast<uint32_t>(maxNBitValue(remainderSimdLanes));
|
||||
if (!threadExecutionMask) {
|
||||
threadExecutionMask = static_cast<uint32_t>(maxNBitValue((simdSize == 1) ? 32 : simdSize));
|
||||
threadExecutionMask = static_cast<uint32_t>(maxNBitValue((isSimd1(simdSize)) ? 32 : simdSize));
|
||||
}
|
||||
evaluateIfRequiresGenerationOfLocalIdsByRuntime(kernelDescriptor);
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/simd_helper.h"
|
||||
#include "shared/test/common/helpers/raii_gfx_core_helper.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_l0_debugger.h"
|
||||
@@ -82,7 +83,7 @@ TEST_F(KernelImpTest, givenExecutionMaskWithoutReminderWhenProgrammingItsValueTh
|
||||
descriptor.kernelAttributes.simdSize = simd;
|
||||
kernel.KernelImp::setGroupSize(simd, 1, 1);
|
||||
|
||||
if (simd == 1) {
|
||||
if (isSimd1(simd)) {
|
||||
EXPECT_EQ(maxNBitValue(32), kernel.KernelImp::getThreadExecutionMask());
|
||||
} else {
|
||||
EXPECT_EQ(maxNBitValue(simd), kernel.KernelImp::getThreadExecutionMask());
|
||||
|
||||
Reference in New Issue
Block a user