summaryrefslogtreecommitdiff
path: root/mlir/test/Examples/transform/ChH
AgeCommit message (Collapse)Author
2025-02-06[mlir][LLVM] Switch `undef` for `poison` for uninitialized values (#125629)Krzysztof Drewniak
LLVM itself is generally moving away from using `undef` and towards using `poison`, to the point of having a lint that caches new uses of `undef` in tests. In order to not trip the lint on new patterns and to conform to the evolution of LLVM - Rename valious ::undef() methods on StructBuilder subclasses to ::poison() - Audit the uses of UndefOp in the MLIR libraries and replace almost all of them with PoisonOp The remaining uses of `undef` are initializing `uninitialized` memrefs, explicit conversions to undef from SPIR-V, and a few cases in AMDGPUToROCDL where usage like %v = insertelement <M x iN> undef, iN %v, i32 0 %arg = bitcast <M x iN> %v to i(M * N) is used to handle "i32" arguments that are are really packed vectors of smaller types that won't always be fully initialized.
2024-10-22Revert "[MLIR] Make `OneShotModuleBufferize` use `OpInterface` (#110322)" ↵Andrzej Warzyński
(#113124) This reverts commit 2026501cf107fcb3cbd51026ba25fda3af823941. Failing bot: * https://lab.llvm.org/staging/#/builders/125/builds/389
2024-10-01[MLIR] Make `OneShotModuleBufferize` use `OpInterface` (#110322)Tzung-Han Juang
**Description:** This PR replaces a part of `FuncOp` and `CallOp` with `FunctionOpInterface` and `CallOpInterface` in `OneShotModuleBufferize`. Also fix the error from an integration test in the a previous PR attempt. (https://github.com/llvm/llvm-project/pull/107295) The below fixes skip `CallOpInterface` so that the assertions are not triggered. https://github.com/llvm/llvm-project/blob/8d780007625108a7f34e40efb8604b858e04c60c/mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp#L254-L259 https://github.com/llvm/llvm-project/blob/8d780007625108a7f34e40efb8604b858e04c60c/mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp#L311-L315 **Related Discord Discussion:** [Link](https://discord.com/channels/636084430946959380/642426447167881246/1280556809911799900) --------- Co-authored-by: erick-xanadu <110487834+erick-xanadu@users.noreply.github.com>
2024-09-25Revert "[MLIR] Make `OneShotModuleBufferize` use `OpInterface`" (#109919)Matthias Springer
Reverts llvm/llvm-project#107295 This commit breaks an integration test: ``` build/bin/mlir-opt mlir/test/Integration/Dialect/Complex/CPU/correctness.mlir -one-shot-bufferize="bufferize-function-boundaries" ```
2024-09-25[MLIR] Make `OneShotModuleBufferize` use `OpInterface` (#107295)Tzung-Han Juang
**Description:** `OneShotModuleBufferize` deals with the bufferization of `FuncOp`, `CallOp` and `ReturnOp` but they are hard-coded. Any custom function-like operations will not be handled. The PR replaces a part of `FuncOp` and `CallOp` with `FunctionOpInterface` and `CallOpInterface` in `OneShotModuleBufferize` so that custom function ops and call ops can be bufferized. **Related Discord Discussion:** [Link](https://discord.com/channels/636084430946959380/642426447167881246/1280556809911799900) --------- Co-authored-by: erick-xanadu <110487834+erick-xanadu@users.noreply.github.com>
2024-05-30[mlir][llvm] Implement ConstantLike for ZeroOp, UndefOp, PoisonOp (#93690)Guy David
These act as constants and should be propagated whenever possible. It is safe to do so for mlir.undef and mlir.poison because they remain "dirty" through out their lifetime and can be duplicated, merged, etc. per the LangRef. Signed-off-by: Guy David <guy.david@nextsilicon.com>
2024-02-09[mlir] update transform dialect tutorials (#81199)Oleksandr "Alex" Zinenko
Use the "main" transform-interpreter pass instead of the test pass. This, along with the previously introduced debug extension, now allow tutorials to no longer depend on test passes and extensions.
2023-10-02[mlir] run buffer deallocation in transform tutorial (#67978)Oleksandr "Alex" Zinenko
Buffer deallocation pipeline previously was incorrect when applied to functions. It has since been fixed. Make sure it is exercised in the tutorial to avoid leaking allocations.
2023-09-26[mlir] cleanup of structured.tile* transform ops (#67320)Oleksandr "Alex" Zinenko
Rename and restructure tiling-related transform ops from the structured extension to be more homogeneous. In particular, all ops now follow a consistent naming scheme: - `transform.structured.tile_using_for`; - `transform.structured.tile_using_forall`; - `transform.structured.tile_reduction_using_for`; - `transform.structured.tile_reduction_using_forall`. This drops the "_op" naming artifact from `tile_to_forall_op` that shouldn't have been included in the first place, consistently specifies the name of the control flow op to be produced for loops (instead of `tile_reduction_using_scf` since `scf.forall` also belongs to `scf`), and opts for the `using` connector to avoid ambiguity. The loops produced by tiling are now systematically placed as *trailing* results of the transform op. While this required changing 3 out of 4 ops (except for `tile_using_for`), this is the only choice that makes sense when producing multiple `scf.for` ops that can be associated with a variadic number of handles. This choice is also most consistent with *other* transform ops from the structured extension, in particular with fusion ops, that produce the structured op as the leading result and the loop as the trailing result.
2023-09-25[mlir] add transform tutorial chapter for Halide conv mapping (#66386)Oleksandr "Alex" Zinenko
This chapter demonstrates how one can replicate Halide DSL transformations using transform dialect operations transforming payload expressed using Linalg. This was a part of the live tutorial presented at EuroLLVM 2023.