[llvm] [Offload][OMPX] Add the runtime support for multi-dim grid and block (PR #118042)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 29 08:18:01 PST 2024
================
@@ -616,38 +622,36 @@ KernelLaunchParamsTy GenericKernelTy::prepareArgs(
return KernelLaunchParamsTy{sizeof(void *) * NumArgs, &Args[0], &Ptrs[0]};
}
-uint32_t GenericKernelTy::getNumThreads(GenericDeviceTy &GenericDevice,
- uint32_t ThreadLimitClause[3]) const {
- assert(ThreadLimitClause[1] == 0 && ThreadLimitClause[2] == 0 &&
- "Multi dimensional launch not supported yet.");
-
- if (IsBareKernel && ThreadLimitClause[0] > 0)
- return ThreadLimitClause[0];
+void GenericKernelTy::getNumThreads(GenericDeviceTy &GenericDevice,
+ uint32_t ThreadLimitClause[3]) const {
+ if (IsBareKernel)
----------------
jhuber6 wrote:
This should take a dimension argument and work on all targets, I'm not a fan of splitting logic so cleanly against a language's semantics.
https://github.com/llvm/llvm-project/pull/118042
More information about the llvm-commits
mailing list