[Mlir-commits] [mlir] [mlir][spirv] Deserialize OpConstantComposite of type Cooperative Matrix (PR #142786)
Igor Wodiany
llvmlistbot at llvm.org
Mon Jun 9 10:16:55 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 point, I've added a non-zero test.
> Also, are non-splats supported?
I don't think so. I think this is the only part of spec that is relevant: [3.42.7 Constant-Creation Instructions](https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_cooperative_matrix.asciidoc#3427-constant-creation-instructions) and it only talks about creating a constant matrix from a single constituent.
https://github.com/llvm/llvm-project/pull/142786
More information about the Mlir-commits
mailing list