SWDEV-459758 - Pass workgroup size explicitly (#185)

It's easier for compiler to move explicit kernel arguments into user SGPRs

[ROCm/clr commit: 3fd7650fe3]
This commit is contained in:
Andryeyev, German
2025-04-15 15:22:15 -04:00
committed by GitHub
parent 7257b705ce
commit a9df586812
3 changed files with 18 additions and 5 deletions
@@ -2023,6 +2023,8 @@ bool KernelBlitManager::fillBuffer1D(device::Memory& memory, const void* pattern
setArgument(kernels_[kFillType], 4, sizeof(kfill_size), &kfill_size);
uint32_t next_chunk = globalWorkSize * kpattern_size;
setArgument(kernels_[kFillType], 5, sizeof(uint32_t), &next_chunk);
uint32_t lws = localWorkSize;
setArgument(kernels_[kFillType], 6, sizeof(lws), &lws);
// Create ND range object for the kernel's execution
amd::NDRangeContainer ndrange(1, globalWorkOffset, &globalWorkSize, &localWorkSize);
@@ -2188,6 +2190,8 @@ bool KernelBlitManager::shaderCopyBuffer(address dst, address src,
uint32_t next_chunk = globalWorkSize;
setArgument(kernels_[kBlitType], 6, sizeof(next_chunk), &next_chunk);
uint32_t lws = localWorkSize;
setArgument(kernels_[kBlitType], 7, sizeof(lws), &lws);
// Create ND range object for the kernel's execution
amd::NDRangeContainer ndrange(1, nullptr, &globalWorkSize, &localWorkSize);