- 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
-
MaheshRavishankar authored
Differential Revision: https://reviews.llvm.org/D93086
-
MaheshRavishankar authored
representing dependence from producer result to consumer. With Linalg on tensors the dependence between operations can be from the result of the producer to the consumer. This change just does a NFC refactoring of the LinalgDependenceGraphElem to allow representing both OpResult and OpOperand*. Differential Revision: https://reviews.llvm.org/D95208
-
- Jan 20, 2021
-
-
Nicolas Vasilache authored
This may simplify the composition of patterns but is otherwise NFC.
-
Nicolas Vasilache authored
-
Aart Bik authored
Use cases with 16- or even 8-bit pointer/index structures have been identified. Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D95015
-
- Jan 19, 2021
-
-
Mehdi Amini authored
-
- Jan 16, 2021
-
-
Thomas Raoux authored
-
Thomas Raoux authored
This allow using this helper outside of the linalg canonicalization. Differential Revision: https://reviews.llvm.org/D94826
-
- Jan 15, 2021
-
-
Aart Bik authored
This is a very minor improvement during iteration graph construction. If the first attempt considering the dimension order of all tensors fails, a second attempt is made using the constraints of sparse tensors only. Dense tensors prefer dimension order (locality) but provide random access if needed, enabling the compilation of more sparse kernels. Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D94709
-
MaheshRavishankar authored
With the recent changes to linalg on tensor semantics, the tiling operations works out-of-the-box for generic operations. Add a test to verify that and some minor refactoring. Differential Revision: https://reviews.llvm.org/D93077
-
- Jan 13, 2021
-
-
Aart Bik authored
Similar to the parallelization strategies, the vectorization strategies provide control on what loops should be vectorize. Unlike the parallel strategies, only innermost loops are considered, but including reductions, with the control of vectorizing dense loops only or dense and sparse loops. The vectorized loops are always controlled by a vector mask to avoid overrunning the iterations, but subsequent vector operation folding removes redundant masks and replaces the operations with more efficient counterparts. Similarly, we will rely on subsequent loop optimizations to further optimize masking, e.g. using an unconditional full vector loop and scalar cleanup loop. The current strategy already demonstrates a nice interaction between the sparse compiler and all prior optimizations that went into the vector dialect. Ongoing discussion at: https://llvm.discourse.group/t/mlir-support-for-sparse-tensors/2020/10 Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D94551
-
David Blaikie authored
-
- Jan 12, 2021
-
-
Nicolas Vasilache authored
This revision uniformizes fusion APIs to allow passing OpOperand, OpResult and adds a finer level of control fusion. Differential Revision: https://reviews.llvm.org/D94493
-
Rob Suderman authored
getDynOperands behavior is commonly used in a number of passes. Refactored to use a helper function and avoid code reuse. Differential Revision: https://reviews.llvm.org/D94340
-
- Jan 11, 2021
-
-
MaheshRavishankar authored
When fusing tensor_reshape ops with generic/indexed_Generic op, new linalg.init_tensor operations were created for the `outs` of the fused op. While correct (technically) it is better to just reshape the original `outs` operands and rely on canonicalization of init_tensor -> tensor_reshape to achieve the same effect. Differential Revision: https://reviews.llvm.org/D93774
-
Lei Zhang authored
Linalg ops are perfect loop nests. When materializing the concrete loop nest, the default order specified by the Linalg op's iterators may not be the best for further CodeGen: targets frequently need to plan the loop order in order to gain better data access. And different targets can have different preferences. So there should exist a way to control the order. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D91795
-
- Jan 08, 2021
-
-
MaheshRavishankar authored
Change the implementation of LinalgOp with TensorReshapeOp by expansion to be more modular and easier to follow. Differential Revision: https://reviews.llvm.org/D93748
-
- Jan 07, 2021
-
-
Kazuaki Ishizaki authored
fix typo under include and lib directories Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D94220
-
- Jan 06, 2021
-
-
Thomas Raoux authored
Add same hoisting transformation existing for transfer ops on buffers for transfer_ops on tensor. The logic is significantly different so this is done as a separate transformation and it is expect that user would know which transformation to use based on the flow. Differential Revision: https://reviews.llvm.org/D94115
-
Aart Bik authored
Nicolas changed the tensor abstraction so that every output has its own shape definition. This simplifies the "inference" that was used in the sparse compiler. Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D94119
-
- Dec 29, 2020
-
-
Thomas Raoux authored
Support vectorization of linalg ops using tensor inputs/outputs. Differential Revision: https://reviews.llvm.org/D93890
-
- Dec 21, 2020
-
-
Aart Bik authored
Fixes a merge conflict with previous two CLs. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D93664
-
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
-
Thomas Raoux authored
Transfer_ops can now work on both buffers and tensor. Right now, lowering of the tensor case is not supported yet. Differential Revision: https://reviews.llvm.org/D93500
-
- Dec 18, 2020
-
-
Aart Bik authored
Reductions in innermost loops become harder for the backend to disambiguate after bufferization into memrefs, resulting in less efficient load-update-store cycles. By scalarizing innermost reductions, the backend is more likely to assign a register to perform the reduction (also prepares vectorization). Even though we could scalarize reductions for more outer loops and while-loops as well, currently scalarization is only done for chains of innermost for-loops, where it matters most, to avoid complicating codegen unnecessary (viz. adding lots of yield instructions). This CL also refactors condition simplification into the merger class, where it belongs, so that conditions are simplified only once per loop nest and not repeatedly as was currently done. This CL also fixes a few minor bugs, some layout issues, and comments. Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D93143
-
Sean Silva authored
This is almost entirely mechanical. Differential Revision: https://reviews.llvm.org/D93357
-
- Dec 17, 2020
-
-
River Riddle authored
[mlir][IR][NFC] Move context/location parameters of builtin Type::get methods to the start of the parameter list This better matches the rest of the infrastructure, is much simpler, and makes it easier to move these types to being declaratively specified. Differential Revision: https://reviews.llvm.org/D93432
-
- Dec 15, 2020
-
-
Tres Popp authored
This is useful for scalar code that uses for/while loops. This has also been confirmed to work for representing std.pow as an scf.for loop on gpus. Differential Revision: https://reviews.llvm.org/D93308
-
- Dec 14, 2020
-
-
Thomas Raoux authored
Fix a bug causing to pick the wrong vector size to broadcast to when the source vectors have different ranks. Differential Revision: https://reviews.llvm.org/D93118
-
- Dec 13, 2020
-
-
Christian Sigg authored
This is a preparation step to remove those methods from OpState. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D93098
-
- Dec 09, 2020
-
-
Christian Sigg authored
[mlir] Use mlir::OpState::operator->() to get to methods of mlir::Operation. This is a preparation step to remove the corresponding methods from OpState. Reviewed By: silvas, rriddle Differential Revision: https://reviews.llvm.org/D92878
-
- Dec 07, 2020
-
-
Aart Bik authored
After bufferization, the backend has much more trouble hoisting loop invariant loads from the loops generated by the sparse compiler. Therefore, this is done during sparse code generation. Note that we don't bother hoisting derived invariant expressions on SSA values, since the backend does that very well. Still TBD: scalarize reductions to avoid load-add-store cycles Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D92534
-
- Dec 04, 2020
-
-
Nicolas Vasilache authored
-
Nicolas Vasilache authored
Let tiling to scf.for actually use the distribution method. For now only Cyclic is supported. Differential Revision: https://reviews.llvm.org/D92653
-
Hanhan Wang authored
In the past, the reshape op can be folded only if the indexing map is permutation in consumer's usage. We can relax to condition to be projected permutation. This patch still limits the fusion for scalar cases. Scalar case is a corner case, because we need to decide where to put extra dims. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D92466
-
Thomas Raoux authored
Add support for vectorization for linalg.generic representing element-wise ops. Those are converted to transfer_read + vector ops + transfer_write. Also re-organize the vectorization tests to be together. Implementation derived from the work of @burmako, @agrue and @fedelebron. Differential Revision: https://reviews.llvm.org/D92540
-
- 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 26, 2020
-
-
Aart Bik authored
This change gives sparse compiler clients more control over selecting individual types for the pointers and indices in the sparse storage schemes. Narrower width obviously results in smaller memory footprints, but the range should always suffice for the maximum number of entries or index value. Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D92126
-
Sean Silva authored
It still had the old name from before ElementwiseMappable was added.
-