[all-commits] [llvm/llvm-project] 34a1b8: [acc] acc.loop verifier now requires parallelism d...
Razvan Lupusoru via All-commits
all-commits at lists.llvm.org
Wed Jun 11 12:37:29 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 34a1b8ce2518d7868c080519a05892cd3b197192
https://github.com/llvm/llvm-project/commit/34a1b8ce2518d7868c080519a05892cd3b197192
Author: Razvan Lupusoru <razvan.lupusoru at gmail.com>
Date: 2025-06-11 (Wed, 11 Jun 2025)
Changed paths:
M mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
M mlir/test/Dialect/OpenACC/canonicalize.mlir
M mlir/test/Dialect/OpenACC/invalid.mlir
M mlir/test/Dialect/OpenACC/legalize-data.mlir
M mlir/test/Dialect/OpenACC/ops.mlir
Log Message:
-----------
[acc] acc.loop verifier now requires parallelism determination flag (#143720)
The OpenACC specification for `acc loop` describe that a loop's
parallelism determination mode is either auto, independent, or seq. The
rules are as follows.
- As per OpenACC 3.3 standard section 2.9.6 independent clause: A loop
construct with no auto or seq clause is treated as if it has the
independent clause when it is an orphaned loop construct or its parent
compute construct is a parallel construct.
- As per OpenACC 3.3 standard section 2.9.7 auto clause: When the parent
compute construct is a kernels construct, a loop construct with no
independent or seq clause is treated as if it has the auto clause.
- Additionally, loops marked with gang, worker, or vector are not
guaranteed to be parallel. Specifically noted in 2.9.7 auto clause: If
not, or if it is unable to make a determination, it must treat the auto
clause as if it is a seq clause, and it must ignore any gang, worker, or
vector clauses on the loop construct.
The verifier for `acc.loop` was updated to enforce this marking because
the context in which a loop appears is not trivially determined once IR
transformations begin. For example, orphaned loops are implicitly
`independent`, but after inlining into an `acc.kernels` region they
would be implicitly considered `auto`. Thus now the verifier requires
that a frontend specifically generates acc dialect with this marking
since it knows the context.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list