[Mlir-commits] [mlir] [mlir][amdgpu] Define an amdgpu.scaling_mfma wrapper (PR #137498)

Krzysztof Drewniak llvmlistbot at llvm.org
Wed Apr 30 13:27:12 PDT 2025


================
@@ -51,3 +51,52 @@ func.func @mfma_to_rocdl(%arg0 : vector<8xf16>, %arg1 : vector<16xf32>,
 
   func.return
 }
+
+func.func @scaled_mfma_to_rocdl(%arg0 : vector<16xf32>,
+                    %arg1 : vector<4xf32>, %arg2 : vector<32xf8E4M3FN>,
+                    %arg3 : vector<32xf8E5M2>, %arg4 : vector<32xf6E2M3FN>,
+                    %arg5 : vector<32xf6E3M2FN>, %arg6 : vector<32xf4E2M1FN>, 
+                    %arg7 : vector<4xi8>, %arg8 : i8) {
+  
+  // CHECK: %[[c0:.+]] = llvm.mlir.constant(0 : i32) : i32
+  // CHECK: %[[c1:.+]] = llvm.mlir.constant(1 : i32) : i32
+  // CHECK: %[[c2:.+]] = llvm.bitcast{{.*}} : vector<4xi8> to i32
----------------
krzysz00 wrote:

`cN` is for constants

Also, you could `CHECK-SAME` after the `CHECK-LABEL` to actually match the arguments if you'd like to tighten up the test

... Actually, yeah, this test is missing a `CHECK-LABEL` above


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


More information about the Mlir-commits mailing list