[llvm] [NVPTX] Add sparse MMA intrinsics (PR #150950)

Kirill Vedernikov via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 30 08:03:44 PDT 2025


================
@@ -2001,6 +2183,29 @@ foreach layout_a = ["row", "col"] in {
   } // layout_b
 } // layout_a
 
+// MMA.SP
+class NVVM_MMA_SP<WMMA_REGS A, WMMA_REGS B, WMMA_REGS C, WMMA_REGS D>
+  : Intrinsic<D.regs,
+              !listconcat(A.regs, B.regs, C.regs, [llvm_i32_ty], [llvm_i32_ty])> {
+    int pos = !size(!listconcat(A.regs, B.regs, C.regs, [llvm_i32_ty]));
+    let IntrProperties = [IntrNoMem, IntrNoCallback, ImmArg<ArgIndex<pos>>,
+                          Range<ArgIndex<pos>, 0, 4>];
----------------
kvederni wrote:

It is updated in e9c32c0. The sparsity selector depends on the shape and the type.

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


More information about the llvm-commits mailing list