[PATCH] D80594: [MLIR][SPIRV] Adding new data type and decorators to SPIRV Dialect

HazemAbdelhafez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 08:05:46 PDT 2020


Hazem marked 4 inline comments as done.
Hazem added inline comments.


================
Comment at: mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp:208
+  if (auto t = type.dyn_cast<VectorType>()) {
+    if (t.getRank() != 1) {
+      parser.emitError(typeLoc, "only 1-D vector allowed but found ") << t;
----------------
antiagainst wrote:
> I think we can use `CompositeType::isValid(t)` to check the vector rank and num elements.
CompositeType::isValid(t) will return true for IntegerTypes as well, Matrix need to have Float types, unless you meant to use it then re-check that the vector elements are Float and not Integer in the parseAndVerifyMatrixType. Please let me know which one you had in mind. Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80594





More information about the llvm-commits mailing list