[PATCH] D77360: [mlir][Linalg] Extend linalg,reshape to operate on tensors
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 22:45:48 PDT 2020
bondhugula requested changes to this revision.
bondhugula added inline comments.
This revision now requires changes to proceed.
================
Comment at: mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td:79-81
+ In the strided memref case, depending on whether or not the reassociated
+ MemRefType is contiguous, the resulting memref may require explicit alloc
+ and copies.
----------------
This looks problematic. Why add auto in-placing / other arg dependent in-place/out-of-place semantics? Instead, always make it out of place (other passes/utilities can in-place) or have separate ops for in-place and out-of-place?
================
Comment at: mlir/test/Dialect/Linalg/invalid.mlir:512
+func @reshape(%arg0: tensor<?x?x?xf32>) {
+ // expected-error @+1 {{expected source and result of same shaped type}}
+ %0 = linalg.reshape %arg0 [affine_map<(i, j, k) -> (i, j)>, affine_map<(i, j, k) -> (k)>] :
----------------
The error message could be confusing - they don't have to be of the same shaped type - instead 'expected source and result to both be either tensor or memref'?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77360/new/
https://reviews.llvm.org/D77360
More information about the llvm-commits
mailing list