[mlir][spirv] Add MatrixTimesScalar operation
authorHazemAbdelhafez <23439402+HazemAbdelhafez@users.noreply.github.com>
Tue, 16 Jun 2020 01:50:18 +0000 (21:50 -0400)
committerHazemAbdelhafez <23439402+HazemAbdelhafez@users.noreply.github.com>
Wed, 17 Jun 2020 22:33:47 +0000 (18:33 -0400)
commit55d53d4f5448db87ab0bec903be94b696c8ed3e8
tree3138d2995ac04707a5eb689b2050f14825828f2f
parentac20150e299a41ade860f432741c1b8557ac8058
[mlir][spirv] Add MatrixTimesScalar operation

Summary:
- Define the MatrixTimesScalar operation and add roundtrip tests.
- Added a new base class for matrix-specific operations to avoid invalid operands type mismatch check.
- Created a separate Matrix arithmetic operations td file to add more operations in the future.
- Augmented the automatically generated verify method to print more fine-grained error messages.
- Made minor Updates to the matrix type tests.

Reviewers: antiagainst, rriddle, mravishankar

Reviewed By: antiagainst

Subscribers: mehdi_amini, jpienaar, shauheen, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, bader, grosul1, frgossen, Kayjukh, jurahul, msifontes

Tags: #mlir

Differential Revision: https://reviews.llvm.org/D81677
mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
mlir/include/mlir/Dialect/SPIRV/SPIRVMatrixOps.td [new file with mode: 0644]
mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
mlir/test/Dialect/SPIRV/Serialization/matrix.mlir
mlir/test/Dialect/SPIRV/matrix-ops.mlir [new file with mode: 0644]