- Apr 05, 2021
-
-
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
-
- Apr 03, 2021
-
-
David Blaikie authored
-
David Blaikie authored
-
Christian Sigg authored
NDEBUG builds currently warn because it's only used inside an assert. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D99721
-
- Apr 02, 2021
-
-
Rob Suderman authored
Added lowerings for Tosa's reduce boolean operations. This includes a fix to maintain the output rank of reduce operations. Reviewed By: silvas Differential Revision: https://reviews.llvm.org/D99228
-
Sean Silva authored
`ConversionPatternRewriter::applySignatureConversion` did not have a way to apply a signature conversion that involved materializations. Differential Revision: https://reviews.llvm.org/D99782
-
River Riddle authored
This was missed when verification for creating unregistered operations was added. Differential Revision: https://reviews.llvm.org/D99684
-
Lei Zhang authored
This commit add utility functions for creating push constant storage variable and loading values from it. Along the way, performs some clean up: * Deleted `setABIAttrs`, which is just a 4-liner function with one user. * Moved `SPIRVConverstionTarget` into `mlir` namespace, to be consistent with `SPIRVTypeConverter` and `LLVMConversionTarget`. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D99725
-
Aart Bik authored
Rationale: Small indices and values, when allowed by the required range of the input tensors, can reduce the memory footprint of sparse tensors even more. Note, however, that we must be careful zero extending the values (since sparse tensors never use negatives for indexing), but LLVM treats the index type as signed in most memory operations (like the scatter and gather). This CL dots all the i's in this regard. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D99777
-
Mehdi Amini authored
Setting the builder from a block is looking up for a parent operation to get a context, instead by setting up the builder with an explicit context we can support invoking this helper in absence of a parent operation.
-
- Apr 01, 2021
-
-
Aden Grue authored
Differential Revision: https://reviews.llvm.org/D99229
-
Vinayaka Bandishti authored
Fixes a bug in affine fusion pipeline where an incorrect slice is computed. After the slice computation is done, original domain of the the source is compared with the new domain that will result if the fusion succeeds. If the new domain must be a subset of the original domain for the slice to be valid. If the slice computed is incorrect, fusion based on such a slice is avoided. Relevant test cases are added/edited. Fixes https://bugs.llvm.org/show_bug.cgi?id=49203 Differential Revision: https://reviews.llvm.org/D98239
-
Nicolas Vasilache authored
This revision tightens up the handling of attributes for both named and generic linalg ops. To demonstrate the IR validity, a working e2e Linalg example is added. Differential Revision: https://reviews.llvm.org/D99430
-
- Mar 31, 2021
-
-
natashaknk authored
Lowering reciprocal and sigmoid elementwise operations to linalg dialect. Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D99676
-
Andrew Young authored
If an operation has been inserted as a key in to the known values hashtable, then it can not be modified in a way which changes its hash. This change avoids modifying the operands of any previously recorded operation, which prevents their hash from changing. In an SSACFG region, it is impossible to visit an operation before visiting its operands, so this is not a problem. This situation can only happen in regions without strict dominance, such as graph regions. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D99486
-
Matthias Springer authored
This is in preparation for adding a new "mask" operand. The existing "masked" attribute was used to specify dimensions that may be out-of-bounds. Such transfers can be lowered to masked load/stores. The new "in_bounds" attribute is used to specify dimensions that are guaranteed to be within bounds. (Semantics is inverted.) Differential Revision: https://reviews.llvm.org/D99639
-
Nicolas Vasilache authored
This revision adds support to properly add the body of registered builtin named linalg ops. At this time, indexing_map and iterator_type support is still missing so the op is not executable yet. Differential Revision: https://reviews.llvm.org/D99578
-
Alexander Belyaev authored
This reverts commit 883912ab.
-
Stella Laurenzo authored
* Suggested to be broken out of D99578 Differential Revision: https://reviews.llvm.org/D99638
-
Mehdi Amini authored
This allows for the conversion to match `A(B()) -> C()` with a pattern matching `A` and marking `B` for deletion. Also add better assertions when an operation is erased while still having uses. Differential Revision: https://reviews.llvm.org/D99442
-
- Mar 30, 2021
-
-
Mehdi Amini authored
Add a "register_runtime" method to the mlir.execution_engine and show calling back from MLIR into Python This exposes the ability to register Python functions with the JIT and exposes them to the MLIR jitted code. The provided test case illustrates the mechanism. Differential Revision: https://reviews.llvm.org/D99562
-
Inho Seo authored
This verification is to check if the indices for static shaped operands on linalgOps access out of bound memory or not. For dynamic shaped operands, we would be able to check it on runtime stage. Found several invalid Linalg ops testcases, and fixed them. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D98390
-
- Mar 29, 2021
-
-
MaheshRavishankar authored
Differential Revision: https://reviews.llvm.org/D99533
-
MaheshRavishankar authored
A new `InterfaceMethod` is added to `InferShapedTypeOpInterface` that allows an operation to return the `Value`s for each dim of its results. It is intended for the case where the `Value` returned for each dim is computed using the operands and operation attributes. This interface method is for cases where the result dim of an operation can be computed independently, and it avoids the need to aggregate all dims of a result into a single shape value. This also implies that this is not suitable for cases where the result type is unranked (for which the existing interface methods is to be used). Also added is a canonicalization pattern that uses this interface and resolves the shapes of the output in terms of the shapes of the inputs. Moving Linalg ops to use this interface, so that many canonicalization patterns implemented for individual linalg ops to achieve the same result can be removed in favor of the added canonicalization pattern. Differential Revision: https://reviews.llvm.org/D97887
-
Stella Laurenzo authored
* Also adds some verbiage about upgrading `pip` itself, since this is a common source of issues. Differential Revision: https://reviews.llvm.org/D99522
-
MaheshRavishankar authored
Subtensor operations that are taking a slice out of a tensor that is unit-extent along a dimension can be rewritten to drop that dimension. Differential Revision: https://reviews.llvm.org/D99226
-
MaheshRavishankar authored
Drop usage of `emitRemark` and use `notifyMatchFailure` instead to avoid unnecessary spew during compilation. Differential Revision: https://reviews.llvm.org/D99485
-
thomasraoux authored
Convert transfer_read ops with permutation maps into simpler transfer_read with minority map + vector.braodcast and vector.transpose. And transfer_read with leading dimensions broacast into transfer_read of lower rank. Differential Revision: https://reviews.llvm.org/D99019
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D99419
-
Frederik Gossen authored
Differential Revision: https://reviews.llvm.org/D99161
-
Alexander Belyaev authored
This reverts commit 06b03800. Until some kind of support for region args is added.
-
Julian Gross authored
Add a new clone operation to the memref dialect. This operation implicitly copies data from a source buffer to a new buffer. In contrast to the linalg.copy operation, this operation does not accept a target buffer as an argument. Instead, this operation performs a conceptual allocation which does not need to be performed manually. Furthermore, this operation resolves the dependency from the linalg-dialect in the BufferDeallocation pass. In addition, we also extended the canonicalization patterns to fold clone operations. The copy removal pass has been removed. Differential Revision: https://reviews.llvm.org/D99172
-
KareemErgawy-TomTom authored
This patch folds the following pattern: ``` %arg0 = ... %0 = sexti %arg0 : i1 to i8 %1 = trunci %0 : i8 to i1 ``` into just `%arg0`. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D99464
-
- Mar 27, 2021
-
-
KareemErgawy-TomTom authored
This patch folds the following pattern: ``` %arg0 = ... %0 = zexti %arg0 : i1 to i8 %1 = trunci %0 : i8 to i1 ``` into just `%arg0`. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D99453
-
Alex Zinenko authored
Provide a registration mechanism for Linalg dialect-specific passes in C API and Python bindings. These are being built into the dialect library but exposed in separate headers (C) or modules (Python). Differential Revision: https://reviews.llvm.org/D99431
-
Jacques Pienaar authored
Now that NoTerminator is possible this op can be removed/it was only needed structurally before. NFC.
-
- Mar 26, 2021
-
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D99345
-
- Mar 25, 2021
-
-
Stella Laurenzo authored
* This has the API I want but I am not thrilled with the implementation. There are various things that could be improved both about the way that Python builders are mapped and the way the Linalg ops are factored to increase code sharing between C++/Python. * Landing this as-is since it at least makes the InitTensorOp usable with the right API. Will refactor underneath in follow-ons. Differential Revision: https://reviews.llvm.org/D99000
-
Mehdi Amini authored
The `mayNotHaveTerminator` was initially on Block but moved to the verifier before landing and wasn't removed from its original place where it is unused.
-
Alexander Belyaev authored
Folds away TiledLoopOp output tensors when the following conditions are met: * result of `linalg.tiled_loop` has no uses * output tensor is the argument of `linalg.yield` Example: ``` %0 = linalg.tiled_loop ... outs (%out, %out_buf:tensor<...>, memref<...>) { ... linalg.yield %out : tensor ... } ``` Becomes ``` linalg.tiled_loop ... outs (%out_buf:memref<...>) { ... linalg.yield } ``` Differential Revision: https://reviews.llvm.org/D99333
-