[Mlir-commits] [mlir] [mlir][amdgpu] Lower amdgpu.make_dma_base (PR #169817)
Erick Ochoa Lopez
llvmlistbot at llvm.org
Thu Nov 27 06:53:30 PST 2025
================
@@ -1222,14 +1231,12 @@ def AMDGPU_MakeDmaBaseOp :
AMDGPU_Op<"make_dma_base", [Pure, AttrSizedOperandSegments]>,
Arguments<(ins
Arg<AnyMemRef, "buffer to read from">:$src,
- Variadic<Index>:$srcIndices,
+ Variadic<Index>:$src_indices,
Arg<AnyMemRef, "buffer to write to">:$dst,
- Variadic<Index>:$dstIndices)>,
+ Variadic<Index>:$dst_indices)>,
Results<(outs AMDGPU_TDMBaseType: $base)> {
----------------
amd-eochoalo wrote:
@krzysz00 thinking about this, maybe it would be best to instead of having src, dst memrefs here, just have lds and global memrefs. As you mentioned, the descriptor is intended to be reused across store and load operations. Then it would be easier to fold a pair of instructions:
```
%base0 = amdgpu.make_dma_base %lds[...], %global[...]
%base1 = amdgpu.make_dma_base %lds[...], %global[...]
```
Rather than
```
// src , dst
%base0 = amdgpu.make_dma_base %lds[...], %global[...]
%base1 = amdgpu.make_dma_base %global[...], %lds[...]
```
https://github.com/llvm/llvm-project/pull/169817
More information about the Mlir-commits
mailing list