[PATCH] D78464: [mlir][Linalg] Add support for fusing linalg.tensor_reshape with linalg.generic operations.
Lei Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 09:11:21 PDT 2020
antiagainst accepted this revision.
antiagainst added a comment.
Cool stuff!
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp:580
+/// Linearize the expressions in `sourceMap` based on the `reassociationMaps`
+/// provided, given the shape of the source tensor that corresponds to the
----------------
Linearizes
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp:592
+/// %1 = linalg.tensor_reshape %0 [affine_map<(i, j, k, l) -> (i)>,
+/// affine_map<(i, j, k, l) -> (j, k, l)>] :
+/// tensor<?x?x4x5xf32> into tensor<?x?xf32>
----------------
Neat: alignment :)
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp:661
+ if (d.isa<AffineSymbolExpr>())
+ hasSymbol = true;
+ });
----------------
Can return WalkResult::interrupt() after this to avoid further walking.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78464/new/
https://reviews.llvm.org/D78464
More information about the llvm-commits
mailing list