[all-commits] [llvm/llvm-project] 94058c: [mlir][GPU] Allow specifying alignment of memory a...
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Wed May 3 14:51:28 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 94058c41d43a4aae0e0914b151c166f2729affbe
https://github.com/llvm/llvm-project/commit/94058c41d43a4aae0e0914b151c166f2729affbe
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2023-05-03 (Wed, 03 May 2023)
Changed paths:
M mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
M mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
M mlir/test/Conversion/GPUCommon/memory-attrbution.mlir
Log Message:
-----------
[mlir][GPU] Allow specifying alignment of memory attributions
Add support for argument attributes on workgroup and private
attributions for GPU functions. These arguments are outside the range
of getNumArguments() and get printed separately, so the default
mechanism for function argument attributes can't be used on them.
Having done this, check for the `llvm.align` attribute on workgroup or
private attributions in a `gpu.func` and pass it through to the
relevant allocation op (creating a global or alloca). This allows
people creating kernels that use multiple workgroup buffers to set an
alignment.
(This could, in the future, be a GPU dialect `alignment` attribute,
but I've taken the simpler route of using the LLVM version instead for
simplicity and because I don't know how this might impact backends
like Vulkan)
Reviewed By: nirvedhmeshram
Differential Revision: https://reviews.llvm.org/D148965
More information about the All-commits
mailing list