[Mlir-commits] [mlir] [mlir][AMDGPU] Add scaled wmma ops for gfx1250 (PR #169854)
Krzysztof Drewniak
llvmlistbot at llvm.org
Mon Dec 1 09:34:28 PST 2025
================
@@ -1218,6 +1227,56 @@ def AMDGPU_ScaledMFMAOp :
let hasCanonicalizer = 1;
}
+def AMDGPU_ScaledWMMAOp
+ : AMDGPU_Op<"scaled_wmma", [AllTypesMatch<["destC", "destD"]>, Pure]>,
+ Arguments<(ins ConfinedAttr<I32Attr, [IntIsOneOf<[16, 32]>]>:$m,
+ ConfinedAttr<I32Attr, [IntIsOneOf<[16]>]>:$n,
+ ConfinedAttr<I32Attr, [IntIsOneOf<[128]>]>:$k,
+ ScaledWMMAInTypes:$sourceA, ScaledWMMAInTypes:$sourceB,
+ ScaledWMMAOutTypes:$destC,
+ VectorOfLengthAndType<[4, 8], [F8E8M0FNU, F8E4M3FN]>:$scaleA,
+ ConfinedAttr<I32Attr, [IntIsOneOf<[0, 1]>]>:$scaleAIdx,
----------------
krzysz00 wrote:
If you go look at the conversion intrinsics, these scale indices have a much more non-trivial mapping. I think the name is fine, but I'd suggest we document the semantics of this attribute carefully.
Also, nit, `scale_a_idx` to make the generic pretty-print a bit nicer (but that's not uniform style, you're welcome to ignore it)
https://github.com/llvm/llvm-project/pull/169854
More information about the Mlir-commits
mailing list