[all-commits] [llvm/llvm-project] f7907b: [mlir] Add map_nested_foreach_thread_to_gpu_blocks...
Guray Ozen via All-commits
all-commits at lists.llvm.org
Fri Sep 23 07:27:32 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f7907bc536892e7ab1d5656a49ec708750d790f9
https://github.com/llvm/llvm-project/commit/f7907bc536892e7ab1d5656a49ec708750d790f9
Author: Guray Ozen <guray.ozen at gmail.com>
Date: 2022-09-23 (Fri, 23 Sep 2022)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
M mlir/test/Dialect/Linalg/transform-gpu.mlir
Log Message:
-----------
[mlir] Add map_nested_foreach_thread_to_gpu_blocks op to transform dialect
This revision adds a new op `map_nested_foreach_thread_to_gpu_blocks` to transform dialect.
If `generate_gpu_launch` argument is given, the op first generates `gpu_launch`. Otherwise, `target` must be `gpu_launch`. The op searches top level `scf.foreach_threads` inside the `gpu_launch` and distributes them with gpu.block_id attribute.
Loop mapping is explicit and given by the map_nested_foreach_thread_to_gpu_blocks op. Mapping is done one-to-one, therefore the loops disappear.
It also adds `gpu dialect` as dependent since the new op can create `gpu::LaunchOp` for given `scf::ForeachThreadOp`.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D134190
More information about the All-commits
mailing list