mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
fix: correct thread/eu ratio for scratch to Xe2
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
ae6c6a3625
commit
a3b6c1fa6d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -184,7 +184,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverHwTestXeHPAndLater, givenScrat
|
||||
kernel.kernelInfo.kernelDescriptor.kernelAttributes.perThreadScratchSize[0] = 0x1000;
|
||||
auto &gfxCoreHelper = pDevice->getRootDeviceEnvironment().getHelper<GfxCoreHelper>();
|
||||
uint32_t computeUnits = gfxCoreHelper.getComputeUnitsUsedForScratch(pDevice->getRootDeviceEnvironment());
|
||||
size_t scratchSpaceSize = kernel.kernelInfo.kernelDescriptor.kernelAttributes.perThreadScratchSize[0] * computeUnits;
|
||||
auto perThreadScratchSize = kernel.kernelInfo.kernelDescriptor.kernelAttributes.perThreadScratchSize[0];
|
||||
|
||||
auto &productHelper = pDevice->getProductHelper();
|
||||
productHelper.adjustPerThreadScratchSize(perThreadScratchSize);
|
||||
|
||||
auto scratchSpaceSize = perThreadScratchSize * computeUnits;
|
||||
|
||||
commandQueue.enqueueKernel(kernel, 1, nullptr, &gws, nullptr, 0, nullptr, nullptr);
|
||||
commandQueue.flush();
|
||||
@ -208,8 +213,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverHwTestXeHPAndLater, givenScrat
|
||||
EXPECT_EQ(length.surfaceState.depth + 1u, scratchState->getDepth());
|
||||
EXPECT_EQ(length.surfaceState.width + 1u, scratchState->getWidth());
|
||||
EXPECT_EQ(length.surfaceState.height + 1u, scratchState->getHeight());
|
||||
auto &productHelper = pDevice->getProductHelper();
|
||||
EXPECT_EQ(kernel.kernelInfo.kernelDescriptor.kernelAttributes.perThreadScratchSize[0], EncodeSurfaceState<FamilyType>::getPitchForScratchInBytes(scratchState, productHelper));
|
||||
|
||||
EXPECT_EQ(perThreadScratchSize, EncodeSurfaceState<FamilyType>::getPitchForScratchInBytes(scratchState, productHelper));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverHwTestXeHPAndLater, givenScratchSpaceSurfaceStateEnabledWhenNewSshProvidedAndNoScratchAllocationExistThenNoDirtyBitSet) {
|
||||
|
Reference in New Issue
Block a user