[Mlir-commits] [mlir] [mlir][amdgpu] Add lowering for make_dma_descriptor (PR #169955)

Erick Ochoa Lopez llvmlistbot at llvm.org
Wed Dec 3 12:57:13 PST 2025


================
@@ -1341,14 +1345,58 @@ def AMDGPU_MakeDmaDescriptorOp :
     `globalSize` custom<DynamicIndexList>($global_dynamic_sizes, $global_static_sizes)
     `globalStride` custom<DynamicIndexList>($global_dynamic_strides, $global_static_strides)
     `sharedSize` custom<DynamicIndexList>($shared_dynamic_sizes, $shared_static_sizes)
-    ( `padShared` `(` $pad^ `every` $pad_every `)` )?
+    ( `padShared` `(` $pad_amount^ `every` $pad_interval `)` )?
     ( `atomicBarrier` `(` $atomic_barrier_address^ `[` $atomic_barrier_indices `]`
                       `:` type($atomic_barrier_address) `)`)?
     ( `iterate` $global_increment^ `,` $lds_increment `,` $iteration_count )?
     attr-dict `:` qualified(type($base)) `->` type(results)
   }];
 
+  let extraClassDeclaration = [{
+    int getRank() {
+      return getGlobalStaticSizes().size();
+    }
+
+    int getElementTypeWidth() {
+      Type elementType = getBase().getType().getElementType();
+      unsigned width;
+      if (elementType.isIntOrFloat()) {
+        width = elementType.getIntOrFloatBitWidth();
+      } else {
+        llvm_unreachable("element type must have getWidth interface");
+      }
+      return width;
+    }
+
+    SmallVector<OpFoldResult> getMixedList(SmallVector<Value> dynamics, ArrayRef<int64_t> statics) {
----------------
amd-eochoalo wrote:

Thanks! I didn't know about this one https://github.com/llvm/llvm-project/pull/169955/commits/c04e41a0c02b59e79310842c616d578502d92a4d

https://github.com/llvm/llvm-project/pull/169955


More information about the Mlir-commits mailing list