- 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
-
Tobias Gysi authored
The patch fixes hard-coded variable names in the vector-to-loops test.
-
- Apr 09, 2021
-
-
Nicolas Vasilache authored
This revision adds 2 helperr functions that help tie OpOperands and BlockArguments in scf.ForOp without having to use the internal implementation details.
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D100198
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D100105
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D100104
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D100042
-
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
-
Rob Suderman authored
Lowerings tosa.max_pool2d to linalg equivalent operations. Includes adding max pooling operations for linalg, with corresponding tests. Differential Revision: https://reviews.llvm.org/D99824
-
Weiwei Li authored
This patch doesn't support the optional operands of ImageDrefGather. The support of optional operands will be implemented later. co-authered-by:
Alan Liu <alanliu.yf@gmail.com> Differential Revision: https://reviews.llvm.org/D100128
-
Mehdi Amini authored
Dialects can be translated to LLVM IR when they have the LLVMTranslationDialectInterface interface registered. In case the interface isn't explicitly registered, even the LLVM dialect can't be exported to LLVM IR. This make the error message more explicit on this. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D96729
-
- Apr 08, 2021
-
-
Hanhan Wang authored
This patch unconditionally converts i1 types to i8 types on memrefs. If the extensions or capabilities are not met, they will be converted to i32. Hence the logic in IntLoadPattern and IntStorePattern are also updated. Also added the implementation of SPIRVTypeConverter::getOptions(). Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D99724
-
Lei Zhang authored
Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D100112
-
Arjun P authored
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D100114
-
Lei Zhang authored
Non-32-bit scalar types require special hardware support that may not exist on all GPUs. This is reflected in SPIR-V as that non-32-bit scalar types require special capabilities or extensions. Previously when there is a non-32-bit type and no native support, we unconditionally emulate it with 32-bit ones. This isn't good given that it can have implications over ABI and data layout consistency. This commit introduces an option to control whether to use 32-bit types to emulate. Differential Revision: https://reviews.llvm.org/D100059
-
Lei Zhang authored
Per the TypeConverter API contract, returning `llvm:None` means other conversion rules should be tried. But we only have one rule per input type. So there is no need to try others and we can just directly fail, which should return `nullptr`. This avoids unnecessary checks. Differential Revision: https://reviews.llvm.org/D100058
-
Tobias Gysi authored
The patch enables the use of index type in vectors. It is a prerequisite to support vectorization for indexed Linalg operations. This refactoring became possible due to the newly introduced data layout infrastructure. The data layout of a module defines the bitwidth of the index type needed to verify bitcasts and similar vector operations. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D99948
-
Mehdi Amini authored
This option has been deprecated for 6 months, change the default setting for now before future removal. While clients can set the option to true for now, they should start updating their passes to define the right `dependentDialects` in preparation of the removal of this option. See the FAQ for more info: https://mlir.llvm.org/getting_started/Faq/ Reviewed By: rriddle, jpienaar Differential Revision: https://reviews.llvm.org/D99025
-
- Apr 07, 2021
-
-
Haruki Imai authored
When allocLikeOp is updated in alloc constant folding, alighnment attribute was ignored. This patch fixes it. Signed-off-by:
Haruki Imai <imaihal@jp.ibm.com> Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D99882
-
Aart Bik authored
Some sparse matrices operate on integral values (in contrast with the common f32 and f64 values). This CL expands the compiler and runtime support to deal with several common type combinations. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D99999
-
Nicolas Vasilache authored
This allows downstream projects to build python extensions using the same macros as MLIR. Differential Revision: https://reviews.llvm.org/D100040
-
Jacques Pienaar authored
-
Matthias Springer authored
Also factors out out-of-bounds mask generation from vector.transfer_read/write into a new MaterializeTransferMask pattern. Differential Revision: https://reviews.llvm.org/D100001
-
Jacques Pienaar authored
When both arguments are the same for these ops, propagate this argument.
-
Jacques Pienaar authored
These are element-wise operations that operates on shapes with equal ranks. Also add missing printer/parser for join operator. Differential Revision: https://reviews.llvm.org/D99986
-
- Apr 06, 2021
-
-
John Demme authored
Add the `getCapsule()` and `createFromCapsule()` methods to the PyOperation class. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D99927
-
Rob Suderman authored
Table op lowering to linalg.generic for both i8 (behaves like a gather) and a pair of gathers with a quantized interpolation. Differential Revision: https://reviews.llvm.org/D99756
-
Jacques Pienaar authored
Enables performing the same filtering in the op doc definition as in the op definition generator. Differential Revision: https://reviews.llvm.org/D99793
-
Christian Sigg authored
Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D99954
-
Thomas Preud'homme authored
MLIR test Dialect/Linalg/transform-patterns.mlir tries to check for the absence of a sequence of instructions with several CHECK-NOT with one of those directives using a variable defined in another. However CHECK-NOT are checked independently so that is using a variable defined in a pattern that should not occur in the input. This commit removes the dependency between those CHECK-NOT by replacing occurences of variables by the regex that were used to define them. Note to reviewers: please pay attention to whether the remaining reference to l0 is correct. There was a l0 defined in those CHECK-NOT and one defined before. I'm not sure what was the intent there. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D99957
-
Nicolas Vasilache authored
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D99968
-
Thomas Preud'homme authored
MLIR test Transforms/canonicalize.mlir tries to check for the absence of a sequence of instructions with several CHECK-NOT with one of those directives using a variable defined in another. However CHECK-NOT are checked independently so that is using a variable defined in a pattern that should not occur in the input. This commit removes the dependency between those CHECK-NOT by replacing occurences of variables by the regex that were used to define them. Reviewed By: pifon2a Differential Revision: https://reviews.llvm.org/D99958
-
Nicolas Vasilache authored
Linalg fusion on tensors has mismatching assumptions on the operand side than on the region bbArg side. Relax the behavior on the operand/indexing map side so that we better support output operands that may also be read from. Differential revision: https://reviews.llvm.org/D99499
-
Thomas Preud'homme authored
MLIR test Dialect/Linalg/tile-indexed-generic.mlir has a CHECK-NOT directive referring to a variable only defined in a CHECK directive with a different prefix, and thus undefined in the CHECK-NOT. This commit removes the variable reference altogether to error on any content it might have. Reviewed By: pifon2a Differential Revision: https://reviews.llvm.org/D99956
-
Alex Zinenko authored
The existing implementation was always creating 32-bit constants for floating-point and integer reductions regardless of the actual type, which resulted in invalid IR being generated for any types other than f32 and i32 when lowering affine.parallel to SCF. Use the actual type instead. Reviewed By: chelini Differential Revision: https://reviews.llvm.org/D99942
-
Geoffrey Martin-Noble authored
Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D99922
-
MaheshRavishankar authored
Right now Elementwise operations fusion in Linalg fuses everything it can. This can run up against resource limits of the target hardware without some checks. This patch adds a callback function that clients can use to implement a cost function. When two elementwise operations are deemed structurally fusable, the callback can be used to control if the fusion applies. Differential Revision: https://reviews.llvm.org/D99820
-
- Apr 05, 2021
-
-
Aart Bik authored
Differential Revision: https://reviews.llvm.org/D99899
-
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
-