[all-commits] [llvm/llvm-project] 08778d: [mlir][GPU] introduce utilities for promotion to w...
ftynse via All-commits
all-commits at lists.llvm.org
Thu Jan 9 01:06:24 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 08778d8c4fd8a6519c7f27bfa6b09c47262cb844
https://github.com/llvm/llvm-project/commit/08778d8c4fd8a6519c7f27bfa6b09c47262cb844
Author: Alex Zinenko <zinenko at google.com>
Date: 2020-01-09 (Thu, 09 Jan 2020)
Changed paths:
M mlir/include/mlir/Dialect/GPU/GPUDialect.h
M mlir/include/mlir/Dialect/GPU/GPUOps.td
A mlir/include/mlir/Dialect/GPU/MemoryPromotion.h
M mlir/include/mlir/IR/Block.h
M mlir/lib/Dialect/GPU/CMakeLists.txt
M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
A mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp
M mlir/lib/IR/Block.cpp
A mlir/test/Dialect/GPU/promotion.mlir
M mlir/test/lib/Transforms/CMakeLists.txt
A mlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp
Log Message:
-----------
[mlir][GPU] introduce utilities for promotion to workgroup memory
Introduce a set of function that promote a memref argument of a `gpu.func` to
workgroup memory using memory attribution. The promotion boils down to
additional loops performing the copy from the original argument to the
attributed memory in the beginning of the function, and back at the end of the
function using all available threads. The loop bounds are specified so as to
adapt to any size of the workgroup. These utilities are intended to compose
with other existing utilities (loop coalescing and tiling) in cases where the
distribution of work across threads is uneven, e.g. copying a 2D memref with
only the threads along the "x" dimension. Similarly, specialization of the
kernel to specific launch sizes should be implemented as a separate pass
combining constant propagation and canonicalization.
Introduce a simple attribute-driven pass to test the promotion transformation
since we don't have a heuristic at the moment.
Differential revision: https://reviews.llvm.org/D71904
More information about the All-commits
mailing list