- 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 12, 2021
-
-
Tobias Gysi authored
after introducing the IndexedGenericOp to GenericOp canonicalization (https://reviews.llvm.org/D101612). Differential Revision: https://reviews.llvm.org/D102245
-
Tobias Gysi authored
after introducing the IndexedGenericOp to GenericOp canonicalization (https://reviews.llvm.org/D101612). Differential Revision: https://reviews.llvm.org/D102308
-
- May 11, 2021
-
-
Tobias Gysi authored
after introducing the IndexedGenericOp to GenericOp canonicalization (https://reviews.llvm.org/D101612). Differential Revision: https://reviews.llvm.org/D102187
-
Tobias Gysi authored
after introducing the IndexedGenericOp to GenericOp canonicalization (https://reviews.llvm.org/D101612). Differential Revision: https://reviews.llvm.org/D102174
-
Tobias Gysi authored
after introducing the IndexedGenericOp to GenericOp canonicalization (https://reviews.llvm.org/D101612). Differential Revision: https://reviews.llvm.org/D102176
-
Aart Bik authored
All glue and clutter in the linalg ops has been replaced by proper sparse tensor type encoding. This code is no longer needed. Thanks to ntv@ for giving us a temporary home in linalg. So long, and thanks for all the fish. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D102098
-
- May 08, 2021
-
-
River Riddle authored
The current design uses a unique entry for each argument/result attribute, with the name of the entry being something like "arg0". This provides for a somewhat sparse design, but ends up being much more expensive (from a runtime perspective) in-practice. The design requires building a string every time we lookup the dictionary for a specific arg/result, and also requires N attribute lookups when collecting all of the arg/result attribute dictionaries. This revision restructures the design to instead have an ArrayAttr that contains all of the attribute dictionaries for arguments and another for results. This design reduces the number of attribute name lookups to 1, and allows for O(1) lookup for individual element dictionaries. The major downside is that we can end up with larger memory usage, as the ArrayAttr contains an entry for each element even if that element has no attributes. If the memory usage becomes too problematic, we can experiment with a more sparse structure that still provides a lot of the wins in this revision. This dropped the compilation time of a somewhat large TensorFlow model from ~650 seconds to ~400 seconds. Differential Revision: https://reviews.llvm.org/D102035
-
- May 07, 2021
-
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D102089
-
Tobias Gysi authored
Remove the builder signature taking a signed dimension identifier. Reviewed By: ergawy Differential Revision: https://reviews.llvm.org/D102055
-
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 06, 2021
-
-
thomasraoux authored
This expose a lambda control instead of just a boolean to control unit dimension folding. This however gives more control to user to pick a good heuristic. Folding reshapes helps fusion opportunities but may generate sub-optimal generic ops. Differential Revision: https://reviews.llvm.org/D101917
-
MaheshRavishankar authored
Fixing a minor bug which lead to element type of the output being modified when folding reshapes with generic op. Differential Revision: https://reviews.llvm.org/D101942
-
- May 05, 2021
-
-
Tobias Gysi authored
The old index op handling let the new index operations point back to the producer block. As a result, after fusion some index operations in the fused block had back references to the old producer block resulting in illegal IR. The patch now relies on a block and value mapping to avoid such back references. Differential Revision: https://reviews.llvm.org/D101887
-
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
-