[PATCH] D80181: [mlir][spirv] Add remaining cooperative matrix instructions.

Thomas Raoux via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 10:48:17 PDT 2020


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


================
Comment at: mlir/include/mlir/Dialect/SPIRV/SPIRVCooperativeMatrixOps.td:176
+                              sssa-use `,` ssa-use `,` ssa-use ` : `
+                              cooperative-matrix-type
+    ```
----------------
antiagainst wrote:
> ThomasRaoux wrote:
> > antiagainst wrote:
> > > One general rule in MLIR regarding assembly is that it should be parsable on its own. I think we need to give at least two types (for `$a` and `$b`) for this? Otherwise by only looking at this op, I'm not able to tell what the type is for `$a` and `$b`.
> > My bad I had wrongly assumed the type were matching. I added 2 types and a result type even though the result type could be deducted from the operand types.
> > I wasn't able to get the assemblyFormat tow work as I could find a way to make the type of c the same as type of result. (type($c, $result) doesn't work) I haven't look very deeply though I can investigate more if you want. Fow now I left the custom parsing/printing functions.
> > 
> > I also added a verify function for muladd and some tests along with it. I was planning to add those later to keep the patch small but it is better to add it now so that I don't forget.
> SGTM. The assembly format is a bit opaque; River added support for it so he knows all the nitty gritty. Feel free to ping him later if you have questions there. (But he is OOO ATM I think.)
Sounds good. I'll chat with him when I get a chance to see if this can be improved.


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

https://reviews.llvm.org/D80181





More information about the llvm-commits mailing list