[llvm] [offload] record-replay: only check user-provided grid sizes (PR #195190)
Kevin Sala Penades via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 14:52:27 PDT 2026
================
@@ -211,11 +211,14 @@ Error replayKernel() {
if (TeamsLimits.size() != 2 || ThreadsLimits.size() != 2)
return createErr("TeamsLimits and ThreadsLimits must have a min and max");
- // If the limits were specified, verify the selected values are valid.
- if (TeamsLimits[0] > 0 &&
+ // If the limits were specified and the user is overriding the recorded
+ // launch geometry, verify the selected values are within bounds. When no
+ // override is given we replay with the values that have been actually used by
+ // runtime, which may have chosen to clamp or round teams or threads.
+ if (NumTeamsOpt > 0 && TeamsLimits[0] > 0 &&
----------------
kevinsala wrote:
Looks like this change is removing the symptom instead of fixing the actual issue. It disables the check when `--num-teams` or `--num-threads` are not provided. However, when not provided, the check should always succeed as they hold the values used at the record stage, and these should be within the limits.
If you're seeing that error even after applying #200639, it's likely that, somehow, (1) the thread/team limits exported are wong or (2) the effective number of threads/teams is wrong.
https://github.com/llvm/llvm-project/pull/195190
More information about the llvm-commits
mailing list