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

Thomas Raoux via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 16:00:56 PDT 2020


ThomasRaoux marked 3 inline comments as done.
ThomasRaoux added inline comments.


================
Comment at: mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h:143
+  /// implementation dependent.
+  bool hasDynamicNumElements() const;
+
----------------
antiagainst wrote:
> Could you add a comment to `getNumElements` to mention that this method being false is a pre-condition? (With that actually it would be nice to rename this as `hasCompileTimeKnownNumElements` or something so that we don't always use it as the negate form. But a minor issue.)
Added a comment about getNumElements and change the function name.


================
Comment at: mlir/test/Dialect/SPIRV/composite-ops.mlir:25
+  // CHECK: spv.CompositeConstruct {{%.*}}, {{%.*}}, {{%.*}}, {{%.*}} : !spv.coopmatrix<8x16xf32, Subgroup>
+  %0 = spv.CompositeConstruct %arg0, %arg1, %arg2, %arg3 : !spv.coopmatrix<8x16xf32, Subgroup>
+  return %0: !spv.coopmatrix<8x16xf32, Subgroup>
----------------
antiagainst wrote:
> I think this should only take one operand.
Thanks for catching that, changed it and added a negative test.


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

https://reviews.llvm.org/D80321





More information about the llvm-commits mailing list