- 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.
-
Fangrui Song authored
-
Diego Caballero authored
This patch adds a utility based on SuperVectorizer to vectorize an affine loop nest using a given vectorization strategy. This strategy allows targeting specific loops for vectorization instead of relying of the SuperVectorizer analysis to choose the right loops to vectorize. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D85869
-
- Sep 21, 2020
-
-
Benjamin Kramer authored
LLVM can deal with any integer or float type, don't arbitrarily restrict it to f32/f64/i32/i64. Differential Revision: https://reviews.llvm.org/D88010
-
Tres Popp authored
This adds support for the interface and provides unambigious information on the control flow as it is unconditional on any runtime values. The code is tested through confirming that buffer-placement behaves as expected. Differential Revision: https://reviews.llvm.org/D87894
-
- Sep 18, 2020
-
-
Lei Zhang authored
Vendor/device information are not resource limits. Moving to target environment directly for better organization. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D87911
-
ergawy authored
Roundtripping SPIR-V modules used the same MLIRContext object for both ways of the trip. This resulted in deserialization using a context object already containing Types constructed during serialization. This commit rectifies that by creating a new MLIRContext during deserialization. Reviewed By: mravishankar, antiagainst Differential Revision: https://reviews.llvm.org/D87692
-
Valentin Clement authored
Add missing operands to represent copyin with readonly modifier, copyout with zero modifier and create with zero modifier. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D87874
-
Valentin Clement authored
Following patch D87712, this patch switch AnyInteger for operands gangNum, gangStatic, workerNum, vectoreLength and tileOperands to Index and AnyInteger. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D87848
-
Nicolas Vasilache authored
This revision allows representing a reduction at the level of linalg on tensors for named ops. When a structured op has a reduction and returns tensor(s), new conventions are added and documented. As an illustration, the syntax for a `linalg.matmul` writing into a buffer is: ``` linalg.matmul ins(%a, %b : memref<?x?xf32>, tensor<?x?xf32>) outs(%c : memref<?x?xf32>) ``` , whereas the syntax for a `linalg.matmul` returning a new tensor is: ``` %d = linalg.matmul ins(%a, %b : tensor<?x?xf32>, memref<?x?xf32>) init(%c : memref<?x?xf32>) -> tensor<?x?xf32> ``` Other parts of linalg will be extended accordingly to allow mixed buffer/tensor semantics in the presence of reductions.
-
Sean Silva authored
This op is a catch-all for creating witnesses from various random kinds of constraints. In particular, I when dealing with extents directly, which are of `index` type, one can directly use std ops for calculating the predicates, and then use cstr_require for the final conversion to a witness. Differential Revision: https://reviews.llvm.org/D87871
-
- Sep 17, 2020
-
-
Navdeep Kumar authored
Add support to tile affine.for ops with parametric sizes (i.e., SSA values). Currently supports hyper-rectangular loop nests with constant lower bounds only. Move methods - moveLoopBody(*) - getTileableBands(*) - checkTilingLegality(*) - tilePerfectlyNested(*) - constructTiledIndexSetHyperRect(*) to allow reuse with constant tile size API. Add a test pass -test-affine -parametric-tile to test parametric tiling. Differential Revision: https://reviews.llvm.org/D87353
-
Abhishek Varma authored
Add support for return values in affine.for yield along the same lines as scf.for and affine.parallel. Signed-off-by:
Abhishek Varma <abhishek.varma@polymagelabs.com> Differential Revision: https://reviews.llvm.org/D87437
-
Hanhan Wang authored
Fold the operation if the source is a scalar constant or splat constant. Update transform-patterns-matmul-to-vector.mlir because the broadcast ops are folded in the conversion. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D87703
-
Valentin Clement authored
This patch change the type of operands async, wait, numGangs, numWorkers and vectorLength from index to AnyInteger to fit with acc.loop and the OpenACC specification. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D87712
-
Stephan Herhut authored
Adds a pattern that replaces a chain of two tensor_cast operations by a single tensor_cast operation if doing so will not remove constraints on the shapes.
-
Jakub Lichman authored
ConvOp vectorization supports now only convolutions of static shapes with dimensions of size either 3(vectorized) or 1(not) as underlying vectors have to be of static shape as well. In this commit we add support for convolutions of any size as well as dynamic shapes by leveraging existing matmul infrastructure for tiling of both input and kernel to sizes accepted by the previous version of ConvOp vectorization. In the future this pass can be extended to take "tiling mask" as a user input which will enable vectorization of user specified dimensions. Differential Revision: https://reviews.llvm.org/D87676
-
Tres Popp authored
These canonicalizations are already handled by folding which will occur in a superset of situations, so they are being removed. Differential Revision: https://reviews.llvm.org/D87706
-
Artur Bialas authored
Added GroupNonUniformBroadcastOp to spirv dialect. Differential Revision: https://reviews.llvm.org/D87688
-
- Sep 16, 2020
-
-
Valentin Clement authored
Add missing operands to represent copin with readonly modifier, copyout with zero modifier, create with zero modifier and default clause. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D87733
-
Eugene Zhulenev authored
Enable inlining for Linalg dialect. Differential Revision: https://reviews.llvm.org/D87567
-
- Sep 15, 2020
-
-
Diego Caballero authored
Rename 'setInsertionPointAfter(Value)' API to avoid ambiguity with 'setInsertionPointAfter(Operation *)' for SingleResult operations which implicitly convert to Value (see D86756). Differential Revision: https://reviews.llvm.org/D87155
-
Valentin Clement authored
Add a verifier for the loop op in the OpenACC dialect. Check basic restriction from 2.9 Loop construct from the OpenACC 3.0 specs. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D87546
-
Valentin Clement authored
This patch adds the missing print for the vector_length in the parallel operation. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D87630
-
Stephan Herhut authored
This add canonicalizer for - extracting an element from a dynamic_tensor_from_elements - propagating constant operands to the type of dynamic_tensor_from_elements Differential Revision: https://reviews.llvm.org/D87525
-
- Sep 14, 2020
-
-
Federico Lebrón authored
Now backends spell out which namespace they want to be in, instead of relying on clients #including them inside already-opened namespaces. This also means that cppNamespaces should be fully qualified, and there's no implicit "::mlir::" prepended to them anymore. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D86811
-
Lubomir Litchev authored
Added support to the Std dialect cast operations to do casts in vector types when feasible. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D87410
-
- Sep 11, 2020
-
-
Sean Silva authored
This introduces a builder for the more general case that supports zero elements (where the element type can't be inferred from the ValueRange, since it might be empty). Also, fix up some cases in ShapeToStandard lowering that hit this. It happens very easily when dealing with shapes of 0-D tensors. The SameOperandsAndResultElementType is redundant with the new TypesMatchWith and prevented having zero elements. Differential Revision: https://reviews.llvm.org/D87492
-
Xin Wang authored
close SameBitWidth check in verifier. Differential Revision: https://reviews.llvm.org/D87265
-
Lubomir Litchev authored
Addressed some CR issues pointed out in D87111. Formatting and other nits. The original Diff D87111 - Add an option for unrolling loops up to a factor. Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D87313
-
Nicolas Vasilache authored
This revision refactors and cleans up a bunch of things to simplify StructuredOpInterface before work can proceed on Linalg on tensors: - break out pieces of the StructuredOps trait that are part of the StructuredOpInterface, - drop referenceIterators and referenceIndexingMaps that end up being more confusing than useful, - drop NamedStructuredOpTrait
-
Benjamin Kramer authored
Previously only the input type was printed, and the parser applied it to both input and output, creating an invalid transpose. Print and parse both types, and verify that they match. Differential Revision: https://reviews.llvm.org/D87462
-
MaheshRavishankar authored
The LinalgTilingPattern class dervied from the base deletes the original operation. This allows for the use case where the more transformations are necessary on the original operation after tiling. In such cases the pattern can derive from LinalgBaseTilingPattern instead of LinalgTilingPattern. Differential Revision: https://reviews.llvm.org/D87308
-
- Sep 10, 2020
-
-
Eugene Burmako authored
This patch adds a new named structured op to accompany linalg.matmul and linalg.matvec. We needed it for our codegen, so I figured it would be useful to add it to Linalg. Reviewed By: nicolasvasilache, mravishankar Differential Revision: https://reviews.llvm.org/D87292
-
Frederik Gossen authored
Define assembly format and add required traits. Differential Revision: https://reviews.llvm.org/D87366
-
Jakub Lichman authored
This commit addresses comments that were requested on D86619 after it was landed. Differential Revision: https://reviews.llvm.org/D87354
-
MaheshRavishankar authored
Also refactor the getViewSizes method to work on LinalgOp instead of being a templated version. Keeping the templated version for compatibility. Differential Revision: https://reviews.llvm.org/D87303
-
- Sep 09, 2020
-
-
Frederik Gossen authored
Take advantage of the new `dynamic_tensor_from_elements` operation in `std`. Instead of stack-allocated memory, we can now lower directly to a single `std` operation. Differential Revision: https://reviews.llvm.org/D86935
-
Frederik Gossen authored
Remove the redundant parenthesis that are used for none of the other operation formats. Differential Revision: https://reviews.llvm.org/D86287
-
- Sep 08, 2020
-
-
Lubomir Litchev authored
Currently, there is no option to allow for unrolling a loop up to a specific factor (specified by the user). The code for doing that is there and there are benefits when unrolling is done to smaller loops (smaller than the factor specified). Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D87111
-