[PATCH] D80321: [mlir][spirv] Enable composite instructions for cooperative matrix type.

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 05:22:14 PDT 2020


antiagainst accepted this revision.
antiagainst added a comment.
This revision is now accepted and ready to land.

Nice, thanks! Just one more nit.



================
Comment at: mlir/test/Dialect/SPIRV/Serialization/cooperative-matrix.mlir:96
+  // CHECK-LABEL: @cooperative_matrix_access_chain
+  spv.func @cooperative_matrix_access_chain(%a : !spv.ptr<!spv.coopmatrix<8x16xf32, Subgroup>, StorageBuffer>) -> !spv.ptr<f32, StorageBuffer> "None" {
+    %0 = spv.constant 0: i32
----------------
Note that according to the spec: "Cooperative matrix types (or types containing them) can only be allocated in Function or Private storage classes." So here we cannot have a pointer pointing to a coop matrix in a StorageBuffer. We should use Function/Private here. Although this is test; still would be nice to be valid. So later when we enforce this rule these tests can still pass as-is. :)


================
Comment at: mlir/test/Dialect/SPIRV/cooperative-matrix.mlir:98
+// CHECK-LABEL: @cooperative_matrix_access_chain
+spv.func @cooperative_matrix_access_chain(%a : !spv.ptr<!spv.coopmatrix<8x16xf32, Subgroup>, StorageBuffer>) -> !spv.ptr<f32, StorageBuffer> "None" {
+  %0 = spv.constant 0: i32
----------------
Same here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80321/new/

https://reviews.llvm.org/D80321





More information about the llvm-commits mailing list