[all-commits] [llvm/llvm-project] e45668: [mlir][flang][openacc] Support device_type on loop...
Valentin Clement (バレンタイン クレメン) via All-commits
all-commits at lists.llvm.org
Thu Jan 4 16:33:47 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e456689fb3d6dd785202cd25f89e9443e5ad7d1a
https://github.com/llvm/llvm-project/commit/e456689fb3d6dd785202cd25f89e9443e5ad7d1a
Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
Date: 2024-01-04 (Thu, 04 Jan 2024)
Changed paths:
M flang/lib/Lower/OpenACC.cpp
M flang/test/Lower/OpenACC/acc-kernels-loop.f90
M flang/test/Lower/OpenACC/acc-loop.f90
M flang/test/Lower/OpenACC/acc-parallel-loop.f90
M flang/test/Lower/OpenACC/acc-reduction.f90
M flang/test/Lower/OpenACC/acc-serial-loop.f90
M mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
M mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
M mlir/test/Dialect/OpenACC/invalid.mlir
M mlir/test/Dialect/OpenACC/ops.mlir
Log Message:
-----------
[mlir][flang][openacc] Support device_type on loop construct (#76892)
This is adding support for `device_type` clause representation in the
OpenACC MLIR dialect on the acc.loop operation and adjust flang to lower
correctly to the new representation.
Each "value" that can be impacted by a `device_type` clause is now
associated with an array attribute that carry this information. This
includes:
- `worker` clause information
- `gang` clause information
- `vector` clause information
- `collapse` clause information
- `tile` clause information
The representation of the `gang` clause information has been updated and
all values are now carried in a single operand segment. This segment is
then subdivided by `device_type`. Each value in a segment is also
associated with a `GangArgType` so it can be differentiated
(num/dim/static). This simplify the handling of gang values an limit the
number of new attributes needed.
When the clause can be associated with the operation without any value
(`gang`, `vector`, `worker`). These are represented by a dedicated
attributes with device_type information.
Extra getter functions are provided to make it easier to retrieve a
value based on a device_type.
More information about the All-commits
mailing list