[llvm] [Offload][OMPX] Add the runtime support for multi-dim grid and block (PR #118042)
Dhruva Chakrabarti via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 7 23:19:40 PST 2024
================
@@ -566,10 +567,16 @@ Error GenericKernelTy::launch(GenericDeviceTy &GenericDevice, void **ArgPtrs,
Args, Ptrs, *KernelLaunchEnvOrErr);
}
- uint32_t NumThreads = getNumThreads(GenericDevice, KernelArgs.ThreadLimit);
- uint64_t NumBlocks =
- getNumBlocks(GenericDevice, KernelArgs.NumTeams, KernelArgs.Tripcount,
- NumThreads, KernelArgs.ThreadLimit[0] > 0);
+ uint32_t NumThreads[3] = {KernelArgs.ThreadLimit[0],
+ KernelArgs.ThreadLimit[1],
+ KernelArgs.ThreadLimit[2]};
+ uint32_t NumBlocks[3] = {KernelArgs.NumTeams[0], KernelArgs.NumTeams[1],
+ KernelArgs.NumTeams[2]};
+ if (!IsBareKernel) {
----------------
dhruvachak wrote:
Before this patch, IsBareKernel was not checked. Is this change required for the multi-dim support? Or is it unrelated change? Same question for other new uses of IsBareKernel.
https://github.com/llvm/llvm-project/pull/118042
More information about the llvm-commits
mailing list