[Mlir-commits] [mlir] [AMDGPU] Added support for Sparse WMMA ops (PR #183360)
Jakub Kuderski
llvmlistbot at llvm.org
Tue Mar 10 10:48:51 PDT 2026
================
@@ -1339,6 +1342,162 @@ static std::optional<StringRef> wmmaOpToIntrinsic(WMMAOp wmma,
return std::nullopt;
}
+/// Returns the `rocdl` intrinsic corresponding to a SparseWMMA operation
+/// `swmmac` if one exists. This includes checking to ensure the intrinsic is
+/// supported on the architecture you are compiling for.
+struct SparseWMMAOpInfo {
+ StringRef name;
+ bool useSign;
+ bool useReuse;
+ bool useClamp;
+};
+
+static std::optional<SparseWMMAOpInfo>
+sparseWMMAOpToIntrinsic(SparseWMMAOp swmmac, Chipset chipset) {
+
+ Type sourceAElem = getElementTypeOrSelf(swmmac.getSourceA().getType());
----------------
kuhar wrote:
```suggestion
sparseWMMAOpToIntrinsic(SparseWMMAOp swmmac, Chipset chipset) {
Type sourceAElem = getElementTypeOrSelf(swmmac.getSourceA().getType());
```
https://github.com/llvm/llvm-project/pull/183360
More information about the Mlir-commits
mailing list