[Mlir-commits] [mlir] [mlir][amdgpu] Lower make_gather_dma_descriptor. (PR #172083)
Erick Ochoa Lopez
llvmlistbot at llvm.org
Mon Dec 15 08:15:01 PST 2025
================
@@ -1378,9 +1379,63 @@ def AMDGPU_MakeDmaDescriptorOp :
Variadic<Index>: $atomic_barrier_indices,
Optional<Index>: $global_increment,
Optional<I32>: $lds_increment,
- Optional<Index>: $iteration_count)>,
- Results<(outs AMDGPU_TDMDescriptorType: $desc)> {
+ Optional<Index>: $iteration_count);
+
+ let extraClassDeclaration = [{
+ int64_t getRank() {
+ return getGlobalStaticSizes().size();
+ }
+
+ unsigned getElementTypeWidth() {
+ return getBase().getType().getElementType().getIntOrFloatBitWidth();
+ }
+
+ SmallVector<OpFoldResult> getMixedGlobalSizes() {
+ return getMixedValues(getGlobalStaticSizes(), getGlobalDynamicSizes(), getContext());
+ }
+
+ SmallVector<OpFoldResult> getMixedGlobalStrides() {
+ return getMixedValues(getGlobalStaticStrides(), getGlobalDynamicStrides(), getContext());
+ }
+
+ SmallVector<OpFoldResult> getMixedSharedSizes() {
+ return getMixedValues(getSharedStaticSizes(), getSharedDynamicSizes(), getContext());
+ }
+
+ constexpr bool isGather() {
----------------
amd-eochoalo wrote:
This should also do the trick: https://github.com/llvm/llvm-project/pull/172083/commits/9c7ed861846575ac0a0bdb88a78c6fd0bfdbeebf .
https://github.com/llvm/llvm-project/pull/172083
More information about the Mlir-commits
mailing list