fix: don't adjust programmed per thread scratch size

when adjusting scratch space size then adjust only allocation size

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-01-10 09:58:21 +00:00
committed by Compute-Runtime-Automation
parent ec5477e3ee
commit 112abeeeef
15 changed files with 52 additions and 66 deletions

View File

@ -186,10 +186,10 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverHwTestXeHPAndLater, givenScrat
uint32_t computeUnits = gfxCoreHelper.getComputeUnitsUsedForScratch(pDevice->getRootDeviceEnvironment());
auto perThreadScratchSize = kernel.kernelInfo.kernelDescriptor.kernelAttributes.perThreadScratchSize[0];
auto &productHelper = pDevice->getProductHelper();
productHelper.adjustPerThreadScratchSize(perThreadScratchSize);
size_t scratchSpaceSize = perThreadScratchSize * computeUnits;
auto scratchSpaceSize = perThreadScratchSize * computeUnits;
auto &productHelper = pDevice->getProductHelper();
productHelper.adjustScratchSize(scratchSpaceSize);
commandQueue.enqueueKernel(kernel, 1, nullptr, &gws, nullptr, 0, nullptr, nullptr);
commandQueue.flush();