Previously only the input type was printed, and the parser applied it to
both input and output, creating an invalid transpose. Print and parse
both types, and verify that they match.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp | ||
---|---|---|
860 | Please extract this piece into a function that can be reused in both the builder and the verifier. MemRefType inferTransposeResultType(sourceType, permutationMap); | |
929 | I'd make the verifier check dstType == inferTransposeResultType(...). | |
mlir/test/Dialect/Linalg/roundtrip.mlir | ||
129 | does this allow memref<?x?x?xf32, offset: ?, strides: [1, ?, ?]>> ? |
mlir/test/Dialect/Linalg/roundtrip.mlir | ||
---|---|---|
129 | No, that's not the same type. I don't know if there's a way of expressing the transposition in this syntax. |
Please extract this piece into a function that can be reused in both the builder and the verifier.
E.g.