[Mlir-commits] [mlir] [mlir][amdgpu] implement amdgpu.sparse_mfma wrapper for smfmac instructions (PR #171968)

Jakub Kuderski llvmlistbot at llvm.org
Fri Dec 12 07:21:27 PST 2025


================
@@ -1136,6 +1160,104 @@ static std::optional<StringRef> wmmaOpToIntrinsicGfx1250(Type elemSourceType,
   return std::nullopt;
 }
 
+/// Returns the `rocdl` intrinsic corresponding to a SparseMFMA (smfmac)
+/// operation if one exists. This includes checking to ensure the intrinsic is
+/// supported on the architecture you are compiling for.
+static std::optional<StringRef> smfmacOpToIntrinsic(SparseMFMAOp op,
+                                                    bool isGfx950) {
+  using fp8 = Float8E4M3FNType;
+  using bf8 = Float8E5M2Type;
----------------
kuhar wrote:

CDNA3 uses different fp8 types from CDNA4, no?

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


More information about the Mlir-commits mailing list