[all-commits] [llvm/llvm-project] c2fc8d: [mlir][GPU] Allow bare pointer memrefs when callin...
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Tue Aug 2 13:58:48 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c2fc8d9b95bd98acb52a3174ed677c2a85aafe4d
https://github.com/llvm/llvm-project/commit/c2fc8d9b95bd98acb52a3174ed677c2a85aafe4d
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2022-08-02 (Tue, 02 Aug 2022)
Changed paths:
M mlir/include/mlir/Conversion/GPUCommon/GPUCommonPass.h
M mlir/include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h
M mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
M mlir/include/mlir/Conversion/Passes.td
M mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
M mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
A mlir/test/Conversion/GPUToROCDL/memref.mlir
M mlir/test/Integration/GPU/ROCM/vecadd.mlir
Log Message:
-----------
[mlir][GPU] Allow bare pointer memrefs when calling GPU kernels
In the ROCm runtime (and probably CUDA as well), all kernel arguments
are aligned. Therefore, enable using bare pointers for memref
arguments to kernels when these memrefs have static shape and a
trivial layout.
This is a substantial optimization to launching kernels that use
memrefs with known, static sizes, since it causes the kernel launch
packet to no longer include information already known to the kernel,
which can enable packing the kernel launch arguments into launch
packets instead of having to allocate an entire separate structure to
hold unneeded memref information.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D130716
More information about the All-commits
mailing list