[Mlir-commits] [mlir] [mlir][spirv] Deserialize OpConstantComposite of type Cooperative Matrix (PR #142786)

Igor Wodiany llvmlistbot at llvm.org
Tue Jun 10 06:04:15 PDT 2025


================
@@ -277,4 +277,11 @@ spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
     %signed_minus_one = spirv.Constant -1 : si16
     spirv.ReturnValue %signed_minus_one : si16
   }
+
+  // CHECK-LABEL: @coop_matrix_const
+  spirv.func @coop_matrix_const() -> (!spirv.coopmatrix<16x16xf32, Subgroup, MatrixAcc>) "None" {
+    // CHECK: {{%.*}} = spirv.Constant dense<0.000000e+00> : !spirv.coopmatrix<16x16xf32, Subgroup, MatrixAcc>
----------------
IgWod-IMG wrote:

Good shout! I added non-splat tests, and it uncovered some issues, so I made some changes. I added splat check in the constant verifier and added Dialect tests (both positive and negative). I also added a check in the serializer; however, the verifier should already pick it up. I added some extra Target tests, but not negative ones as verifier already deals with those. Anything else let me know.

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


More information about the Mlir-commits mailing list