[llvm] [OpenMP][Offload] Add SPMD-No-Loop mode to OpenMP offload runtime (PR #154105)
Dhruva Chakrabarti via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 25 09:47:40 PDT 2025
================
@@ -640,6 +640,18 @@ uint32_t GenericKernelTy::getNumThreads(GenericDeviceTy &GenericDevice,
if (ThreadLimitClause[0] > 0 && isGenericMode())
ThreadLimitClause[0] += GenericDevice.getWarpSize();
+ // Honor OMP_TEAMS_THREAD_LIMIT environment variable and
----------------
dhruvachak wrote:
Taking a step back, what is the reason for special-casing getNumThreads handling for No-Loop kernels? I believe the existing logic (involving MaxNumThreads and PreferredNumThreads) handles both thread-related envars and OpenMP clauses. Is there a test case for No-Loop that does not work with the existing logic?
The primary change required for No-Loop kernels is making sure that the grid size is appropriate and that is ensured by the change in getNumBlocks. I am wondering whether this special handling in getNumThreads can be removed altogether.
https://github.com/llvm/llvm-project/pull/154105
More information about the llvm-commits
mailing list