[llvm-branch-commits] [mlir] [MLIR][OpenMP] Clause-based OpenMP operation definition (PR #92523)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 6 08:29:21 PDT 2024


skatrak wrote:

@tblah thanks for giving this a look. Basically the issue here with the reduction clause is that its description is currently different for each operation that accepts it. They are generally quite similar, just not the same. I think the clause is already consistent in terms of how it's represented but what it means is slightly different depending on the operation, hence the variations in their way of describing it. If you look at the `OpenMP_ReductionClause` definition in OpenMPClauses.td, you'll see that I added a comment to it saying basically that no description is defined for it because it's different on each operation (same thing I did for the `if` and `in_reduction` clauses).

It would be great to agree on a generic description for that clause that would work for all ops, so that it makes sense while reading the generated documentation while being able to centralize this into the clause definition rather than each operation. I created a gist [here](https://gist.github.com/skatrak/ee6e1829980867f8119f91f84cb284b1) with the whole list of descriptions that currently exist for `reduction`, in case that helps with figuring out a shared description. Another option would be to provide a generic description for that clause used by most operations and then override it for one or two if they need to be more specific about something.

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


More information about the llvm-branch-commits mailing list