- May 05, 2021
-
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D101861
-
Aart Bik authored
This revision migrates more code from Linalg into the new permanent home of SparseTensor. It replaces the test passes with proper compiler passes. NOTE: the actual removal of the last glue and clutter in Linalg will follow Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D101811
-
- May 04, 2021
-
-
Tobias Gysi authored
Ensure the index operations are lowered on all linalg loop lowering paths. Differential Revision: https://reviews.llvm.org/D101827
-
Eugene Zhulenev authored
This fixes a performance regression in vec-mat vectorization Reviewed By: asaadaldien Differential Revision: https://reviews.llvm.org/D101795
-
- 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
-
thomasraoux authored
The current implementation had a bug as it was relying on the target vector dimension sizes to calculate where to insert broadcast. If several dimensions have the same size we may insert the broadcast on the wrong dimension. The correct broadcast cannot be inferred from the type of the source and destination vector. Instead when we want to extend transfer ops we calculate an "inverse" map to the projected permutation and insert broadcast in place of the projected dimensions. Differential Revision: https://reviews.llvm.org/D101738
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D101771
-
Frederik Gossen authored
Add dedicated pass `convert-linalg-tiled-loops-to-scf` to lower `linalg.tiled_loop`s. Differential Revision: https://reviews.llvm.org/D101768
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D101747
-
- Apr 30, 2021
-
-
Aart Bik authored
This is the very first step toward removing the glue and clutter from linalg and replace it with proper sparse tensor types. This revision migrates the LinalgSparseOps into SparseTensorOps of a sparse tensor dialect. This also provides a new home for sparse tensor related transformation. NOTE: the actual replacement with sparse tensor types (and removal of linalg glue/clutter) will follow but I am trying to keep the amount of changes per revision manageable. Differential Revision: https://reviews.llvm.org/D101573
-
- Apr 29, 2021
-
-
Mehdi Amini authored
This reverts commit a6d92a97. The build with -DBUILD_SHARED_LIBS=ON is broken.
-
Aart Bik authored
This is the very first step toward removing the glue and clutter from linalg and replace it with proper sparse tensor types. This revision migrates the LinalgSparseOps into SparseTensorOps of a sparse tensor dialect. This also provides a new home for sparse tensor related transformation. NOTE: the actual replacement with sparse tensor types (and removal of linalg glue/clutter) will follow but I am trying to keep the amount of changes per revision manageable. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D101488
-
Tres Popp authored
-
Tres Popp authored
FillOp allows complex ops, and filling a properly sized buffer with a default zero complex number is implemented. Differential Revision: https://reviews.llvm.org/D99939
-
Nicolas Vasilache authored
This revision adds support for vectorizing more general linalg operations with projected permutation maps. This is achieved by eagerly broadcasting the intermediate vector to the common size of the iteration domain of the linalg op. This allows a much more natural expression of generalized vectorization but may introduce additional computations until all the proper canonicalizations are implemented. This generalization modifies the vector.transfer_read/write permutation logic and exposes the fact that the logic employed in vector.contract was too ad-hoc. As a consequence, changes occur in the permutation / transposition logic for contraction. In turn this prompts supporting more cases in the lowering of contract to matrix intrinsics, which is required to make the corresponding tests pass. Differential revision: https://reviews.llvm.org/D101165
-
- Apr 27, 2021
-
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D101084
-
Frederik Gossen authored
Splat constant folding was limited to `std.constant` operations. Instead, use the constant matcher and apply splat constant folding to any constant-like operation that holds a splat attribute. Differential Revision: https://reviews.llvm.org/D101301
-
- Apr 22, 2021
-
-
Tobias Gysi authored
The interchange option attached to the linalg to loop lowering affects only the loops and does not update the memory accesses generated in to body of the operation. Instead of performing the interchange during the loop lowering use the interchange pattern. Differential Revision: https://reviews.llvm.org/D100758
-
thomasraoux authored
This help expose more fusion opportunities. Differential Revision: https://reviews.llvm.org/D100685
-
Eugene Zhulenev authored
Example: ``` %0 = linalg.init_tensor : tensor<...> %1 = linalg.generic ... outs(%0: tensor<...>) %2 = linalg.generic ... outs(%0: tensor<...>) ``` Memref allocated as a result of `init_tensor` bufferization can be incorrectly overwritten by the second linalg.generic operation Reviewed By: silvas Differential Revision: https://reviews.llvm.org/D100921
-
- 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
-
thomasraoux authored
Break up the dependency between SCF ops and substituteMin helper and make a more generic version of AffineMinSCFCanonicalization. This reduce dependencies between linalg and SCF and will allow the logic to be used with other kind of ops. (Like ID ops). Differential Revision: https://reviews.llvm.org/D100321
-
Tobias Gysi authored
Instead of always running the region builder check if the generalized op has a region attached. If yes inline the existing region instead of calling the region builder. This change circumvents a problem with named operations that have a region builder taking captures and the generalization pass not knowing about this captures. Differential Revision: https://reviews.llvm.org/D100880
-
- Apr 20, 2021
-
-
Tobias Gysi authored
The patch extends the vectorization pass to lower linalg index operations to vector code. It allocates constant 1d vectors that enumerate the indexes along the iteration dimensions and broadcasts/transposes these 1d vectors to the iteration space. Differential Revision: https://reviews.llvm.org/D100373
-
KareemErgawy-TomTom authored
This patch extends the control-flow cost-model for detensoring by implementing a forward-looking pass on block arguments that should be detensored. This makes sure that if a (to-be-detensored) block argument "escapes" its block through the terminator, then the successor arguments are also detensored. Reviewed By: silvas Differential Revision: https://reviews.llvm.org/D100457
-
Tobias Gysi authored
The patch replaces the index operations in the body of fused producers and linearizes the indices after expansion. Differential Revision: https://reviews.llvm.org/D100479
-
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 19, 2021
-
-
Tobias Gysi authored
Instead of interchanging loops during the loop lowering this pass performs the interchange by permuting the indexing maps. It also updates the iterator types and the index accesses in the body of the operation. Differential Revision: https://reviews.llvm.org/D100627
-
- Apr 16, 2021
-
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D100603
-
Ahmed Taei authored
Without this tile-and-pad will never terminate if pad-fails. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D97720
-
River Riddle authored
Differential Revision: https://reviews.llvm.org/D100436
-
- Apr 15, 2021
-
-
Aart Bik authored
Rationale: Now that vector<?xindex> is allowed, the restriction on vectorization of index types in the sparse compiler can be removed. Also needs generalization of scatter/gather index types. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D100522
-
- Apr 14, 2021
-
-
Tobias Gysi authored
The patch updates the linalg fusion pass to add the tile offsets to the indices. Differential Revision: https://reviews.llvm.org/D100456
-
- Apr 13, 2021
-
-
Tobias Gysi authored
The patch updates the tiling pass to add the tile offsets to the indices returned by the linalg operations. Differential Revision: https://reviews.llvm.org/D100379
-
Tobias Gysi authored
The patch extends the linalg to loop lowering pass to replace all linalg index operations by the induction variables of the generated loop nests. Differential Revision: https://reviews.llvm.org/D100364
-
KareemErgawy-TomTom authored
This patch introduces the neccessary infrastructure changes to implement cost-modelling for detensoring. In particular, it introduces the following changes: - An extension to the dialect conversion framework to selectively convert sub-set of non-entry BB arguments. - An extension to branch conversion pattern to selectively convert sub-set of a branche's operands. - An interface for detensoring cost-modelling. - 2 simple implementations of 2 different cost models. This sets the stage to explose cost-modelling for detessoring in an easier way. We still need to come up with better cost models. Reviewed By: silvas Differential Revision: https://reviews.llvm.org/D99945
-
- Apr 12, 2021
-
-
MaheshRavishankar authored
Fusing a constant with a linalg.generic operation can result in the fused operation being illegal since the loop bound computation fails. Avoid such fusions. Differential Revision: https://reviews.llvm.org/D100272
-
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
-