- Jun 03, 2021
-
-
Tobias Gysi authored
Replace the uses of deprecated Structured Op Interface methods in DropUnitDims.cpp. This patch is based on https://reviews.llvm.org/D103394. Differential Revision: https://reviews.llvm.org/D103448
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D103548
-
- May 21, 2021
-
-
Nicolas Vasilache authored
Drop the remaining EDSC subdirectories and update all uses. Differential Revision: https://reviews.llvm.org/D102911
-
- May 13, 2021
-
-
Tobias Gysi authored
after introducing the IndexedGenericOp to GenericOp canonicalization (https://reviews.llvm.org/D101612). Differential Revision: https://reviews.llvm.org/D102235
-
- May 07, 2021
-
-
MaheshRavishankar authored
The pattern to convert subtensor ops to their rank-reduced versions (by dropping unit-dims in the result) can also convert to a zero-rank tensor. Handle that case. This also fixes a OOB access bug in the existing pattern for such cases. Differential Revision: https://reviews.llvm.org/D101949
-
- May 05, 2021
-
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D101861
-
- May 03, 2021
-
-
MaheshRavishankar authored
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
-
MaheshRavishankar authored
Convert subtensor and subtensor_insert operations to use their rank-reduced versions to drop unit dimensions. Differential Revision: https://reviews.llvm.org/D101495
-
- Apr 21, 2021
-
-
Ahmed Taei authored
This will prevent fusion that spains all dims and generates (d0, d1, ...) -> () reshape that isn't legal Differential Revision: https://reviews.llvm.org/D100805
-
- Apr 20, 2021
-
-
Tobias Gysi authored
Update the dimensions of the index operations to account for dropped dimensions and replace the index operations of dropped dimensions by zero. Differential Revision: https://reviews.llvm.org/D100395
-
- Apr 12, 2021
-
-
Tobias Gysi authored
The `linalg.index` operation provides access to the iteration indexes of immediately enclosing linalg operations. It takes a dimension `dim` attribute and returns the iteration index in the given dimension. Having `linalg.index` allows us to unify `linalg.generic` and `linalg.indexed_generic` and also enables index access in named operations. Differential Revision: https://reviews.llvm.org/D100292
-
- Apr 09, 2021
-
-
MaheshRavishankar authored
Recent change enable dropping unit-trip loops of "reduction" iterator type as well. This is fine as long as there is one other "reduction" iterator in the operation. Without this the initialized value (value of `out`) is not read which leads to a correctness issue. Also fix a bug in the `fill` -> `tensor_reshape` folding. The `out` operand of the `fill` needs to be reshaped to get the `out` operand of the generated `fill` operation. Differential Revision: https://reviews.llvm.org/D100145
-
- Apr 05, 2021
-
-
MaheshRavishankar authored
The moved `populate` methods are only relevant to Linalg operations. So they are better of in `linalg` namespace. Also rename `populateLinalgTensorOpsFusionPatterns` to `populateElementwiseOpsFusionPatterns`. This makes the scope of these patterns explicit and disambiguates it with fusion on tensors using tile + fuse. Differential Revision: https://reviews.llvm.org/D99819
-
- Mar 29, 2021
-
-
MaheshRavishankar authored
Subtensor operations that are taking a slice out of a tensor that is unit-extent along a dimension can be rewritten to drop that dimension. Differential Revision: https://reviews.llvm.org/D99226
-
- Mar 24, 2021
-
-
Lei Zhang authored
init tensor operands also has indexing map and generally follow the same constraints we expect for non-init-tensor operands. Differential Revision: https://reviews.llvm.org/D99115
-
- Mar 23, 2021
-
-
Chris Lattner authored
[PatternMatch] Big mechanical rename OwningRewritePatternList -> RewritePatternSet and insert -> add. NFC This doesn't change APIs, this just cleans up the many in-tree uses of these names to use the new preferred names. We'll keep the old names around for a couple weeks to help transitions. Differential Revision: https://reviews.llvm.org/D99127
-
- Mar 21, 2021
-
-
Chris Lattner authored
This updates the codebase to pass the context when creating an instance of OwningRewritePatternList, and starts removing extraneous MLIRContext parameters. There are many many more to be removed. Differential Revision: https://reviews.llvm.org/D99028
-
- Feb 08, 2021
-
-
Tres Popp authored
This reverts commit 511dd4f4 along with a couple fixes. Original message: Now the context is the first, rather than the last input. This better matches the rest of the infrastructure and makes it easier to move these types to being declaratively specified. Phabricator: https://reviews.llvm.org/D96111
-
Tres Popp authored
Now the context is the first, rather than the last input. This better matches the rest of the infrastructure and makes it easier to move these types to being declaratively specified. Differential Revision: https://reviews.llvm.org/D96111
-
- Feb 05, 2021
-
-
River Riddle authored
This makes ignoring a result explicit by the user, and helps to prevent accidental errors with dropped results. Marking LogicalResult as no discard was always the intention from the beginning, but got lost along the way. Differential Revision: https://reviews.llvm.org/D95841
-
- Jan 22, 2021
-
-
MaheshRavishankar authored
Fusion of generic/indexed_generic operations with tensor_reshape by expansion when the latter just adds/removes unit-dimensions is disabled since it just adds unit-trip count loops. Differential Revision: https://reviews.llvm.org/D94626
-
- Dec 21, 2020
-
-
nicolasvasilache authored
This revision drops init_tensor arguments from Linalg on tensors and instead uniformizes the output buffers and output tensors to be consistent. This significantly simplifies the usage of Linalg on tensors and is a stepping stone for its evolution towards a mixed tensor and shape abstraction discussed in https://llvm.discourse.group/t/linalg-and-shapes/2421/19. Differential Revision: https://reviews.llvm.org/D93469
-
- Dec 02, 2020
-
-
Christian Sigg authored
Given that OpState already implicit converts to Operator*, this seems reasonable. The alternative would be to add more functions to OpState which forward to Operation. Reviewed By: rriddle, ftynse Differential Revision: https://reviews.llvm.org/D92266
-
- Nov 04, 2020
-
-
mikeurbach authored
Previously, they were only defined for `FuncOp`. To support this, `FunctionLike` needs a way to get an updated type from the concrete operation. This adds a new hook for that purpose, called `getTypeWithoutArgsAndResults`. For now, `FunctionLike` continues to assume the type is `FunctionType`, and concrete operations that use another type can hide the `getType`, `setType`, and `getTypeWithoutArgsAndResults` methods. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D90363
-
- Oct 27, 2020
-
-
River Riddle authored
This class represents a rewrite pattern list that has been frozen, and thus immutable. This replaces the uses of OwningRewritePatternList in pattern driver related API, such as dialect conversion. When PDL becomes more prevalent, this API will allow for optimizing a set of patterns once without the need to do this per run of a pass. Differential Revision: https://reviews.llvm.org/D89104
-
River Riddle authored
There are several pieces of pattern rewriting infra in IR/ that really shouldn't be there. This revision moves those pieces to a better location such that they are easier to evolve in the future(e.g. with PDL). More concretely this revision does the following: * Create a Transforms/GreedyPatternRewriteDriver.h and move the apply*andFold methods there. The definitions for these methods are already in Transforms/ so it doesn't make sense for the declarations to be in IR. * Create a new lib/Rewrite library and move PatternApplicator there. This new library will be focused on applying rewrites, and will also include compiling rewrites with PDL. Differential Revision: https://reviews.llvm.org/D89103
-
MaheshRavishankar authored
Adds support for - Dropping unit dimension loops for indexed_generic ops. - Folding consecutive folding (or expanding) reshapes when the result (or src) is a scalar. - Fixes to indexed_generic -> generic fusion when zero-dim tensors are involved. Differential Revision: https://reviews.llvm.org/D90118
-
- Sep 30, 2020
-
-
Mahesh Ravishankar authored
while folding tensor_reshape op. While folding reshapes that introduce unit extent dims, the logic to compute the reassociation maps can be generalized to handle some corner cases, for example, when the folded shape still has unit-extent dims but corresponds to folded unit extent dims of the expanded shape. Differential Revision: https://reviews.llvm.org/D88521
-
- Sep 23, 2020
-
-
MaheshRavishankar authored
A sequence of two reshapes such that one of them is just adding unit extent dims can be folded to a single reshape. Differential Revision: https://reviews.llvm.org/D88057
-
- Sep 22, 2020
-
-
Nicolas Vasilache authored
This revision allows representing a reduction at the level of linalg on tensors for generic ops by uniformizing with the named ops approach.
-
- Jul 20, 2020
-
-
Jakub Lichman authored
This commit adds functionality needed for implementation of convolutions with linalg.generic op. Since linalg.generic right now expects indexing maps to be just permutations, offset indexing needed in convolutions is not possible. Therefore in this commit we address the issue by adding support for symbols inside indexing maps which enables more advanced indexing. The upcoming commit will solve the problem of computing loop bounds from such maps. Differential Revision: https://reviews.llvm.org/D83158
-
- May 28, 2020
-
-
MaheshRavishankar authored
operands of Generic ops. Unit-extent dimensions are typically used for achieving broadcasting behavior. The pattern added (along with canonicalization patterns added previously) removes the use of unit-extent dimensions, and instead uses a more canonical representation of the computation. This new pattern is not added as a canonicalization for now since it entails adding additional reshape operations. A pass is added to exercise these patterns, along with an API entry to populate a patterns list with these patterns. Differential Revision: https://reviews.llvm.org/D79766
-