[all-commits] [llvm/llvm-project] a6e093: [mlir][Linalg] Add a utility method to get reassoc...
MaheshRavishankar via All-commits
all-commits at lists.llvm.org
Mon May 3 14:40:40 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a6e09391bbe7cb42d591f2a8c169cf4e8980e121
https://github.com/llvm/llvm-project/commit/a6e09391bbe7cb42d591f2a8c169cf4e8980e121
Author: MaheshRavishankar <ravishankarm at google.com>
Date: 2021-05-03 (Mon, 03 May 2021)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
M mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
M mlir/test/Dialect/Linalg/canonicalize.mlir
M mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
Log Message:
-----------
[mlir][Linalg] Add a utility method to get reassociations maps for reshape.
Given the source and destination shapes, if they are static, or if the
expanded/collapsed dimensions are unit-extent, it is possible to
compute the reassociation maps that can be used to reshape one type
into another. Add a utility method to return the reassociation maps
when possible.
This utility function can be used to fuse a sequence of reshape ops,
given the type of the source of the producer and the final result
type. This pattern supercedes a more constrained folding pattern added
to DropUnitDims pass.
Differential Revision: https://reviews.llvm.org/D101343
More information about the All-commits
mailing list