[Mlir-commits] [mlir] [mlir] Add optional layout attribute to VectorType (PR #71916)

Thomas Raoux llvmlistbot at llvm.org
Fri Nov 10 09:40:50 PST 2023


================
@@ -242,6 +243,11 @@ LogicalResult VectorType::verify(function_ref<InFlightDiagnostic()> emitError,
     return emitError() << "number of dims must match, got "
                        << scalableDims.size() << " and " << shape.size();
 
+  if (layout) {
+    if (failed(layout.verifyLayout(shape, elementType, emitError)))
+      return emitError() << "layout does not match underlying vector shape";
----------------
ThomasRaoux wrote:

the error message should be more generic as the mismatch may be in the shape or somewhere else.

https://github.com/llvm/llvm-project/pull/71916


More information about the Mlir-commits mailing list