[Mlir-commits] [mlir] [OpenMP][MLIR] Add num_teams mlir to llvm lowering (PR #179418)

Sergio Afonso llvmlistbot at llvm.org
Thu Apr 9 04:00:37 PDT 2026


================

----------------
skatrak wrote:

Nit: We should probably just do `minTeamsVal = maxTeamsVals[0]` after the loop rather than having it done like this.

The draft spec I got which includes the `dims` modifier for this clause says "If _lower-bound_ is not specified, the effect is as if _lower-bound_ is specified as equal to the upper bound in that dimension", and also "_lower-bound_ may not be specified when the _dims-modifier_ is specified".

So, in this implementation where the lower bound is represented with a single value (i.e. `minTeamsVal`), this is only supposed to be used in the unidimensional case. The multidimensional case would have to use `maxTeamsVals` as both lower and upper bounds for each dimension. This should be documented, because it's not clear by context that it's ok to have one single value for the lower bound holding a copy of the first upper bound when there might be multiple of those.

https://github.com/llvm/llvm-project/pull/179418


More information about the Mlir-commits mailing list