summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/MLProgram/Transforms
AgeCommit message (Collapse)Author
2025-07-22[mlir][NFC] update `mlir/Dialect` create APIs (19/n) (#149926)Maksim Levental
See https://github.com/llvm/llvm-project/pull/147168 for more info.
2025-07-13[mlir] Remove unused includes (NFC) (#148535)Kazu Hirata
2025-05-28[MLIR] Add bufferization state to `getBufferType` and `resolveConflicts` ↵Michele Scuttari
interface methods (#141466) The PR continues the work started in #141019 by adding the `BufferizationState` class also to the `getBufferType` and `resolveConflicts` interface methods, together with the additional support functions that are used throughout the bufferization infrastructure.
2025-05-23[MLIR] Add missing library in MLIRMLProgramTransforms target (#141210)Michele Scuttari
Add the `MLIRBufferizationTransforms` library in the list libraries linked by the `MLIRMLProgramTransforms` one. The problem was not catched before the merge of #141019.
2025-05-23[MLIR] Add bufferization state class to OneShotBufferization pass (#141019)Michele Scuttari
Follow-up on #138143, which was reverted due to a missing update a method signature (more specifically, the bufferization interface for `tensor::ConcatOp`) that was not catched before merging. The old PR description is reported in the next lines. This PR is a follow-up on https://github.com/llvm/llvm-project/pull/138125, and adds a bufferization state class providing information about the IR. The information currently consists of a cached list of symbol tables, which aims to solve the quadratic scaling of the bufferization task with respect to the number of symbols. The PR breaks API compatibility: the bufferize method of the BufferizableOpInterface has been enriched with a reference to a BufferizationState object. The bufferization state must be kept in a valid state by the interface implementations. For example, if an operation with the Symbol trait is inserted or replaced, its parent SymbolTable must be updated accordingly (see, for example, the bufferization of arith::ConstantOp, where the symbol table of the module gets the new global symbol inserted). Similarly, the invalidation of a symbol table must be performed if an operation with the SymbolTable trait is removed (this can be performed using the invalidateSymbolTable method, introduced in https://github.com/llvm/llvm-project/pull/138014).
2025-05-22Revert "[MLIR] Add bufferization state class to OneShotBufferization pass" ↵Michele Scuttari
(#141012) Reverts llvm/llvm-project#138143 The PR for the BufferizationState is temporarily reverted due to API incompatibilities that have been initially missed during the update and were not catched by PR checks.
2025-05-22[MLIR] Add bufferization state class to OneShotBufferization pass (#138143)Michele Scuttari
This PR is a follow-up on #138125, and adds a bufferization state class providing information about the IR. The information currently consists of a cached list of symbol tables, which aims to solve the quadratic scaling of the bufferization task with respect to the number of symbols. The PR breaks API compatibility: the `bufferize` method of the `BufferizableOpInterface` has been enriched with a reference to a `BufferizationState` object. The bufferization state must be kept in a valid state by the interface implementations. For example, if an operation with the `Symbol` trait is inserted or replaced, its parent `SymbolTable` must be updated accordingly (see, for example, the bufferization of `arith::ConstantOp`, where the symbol table of the module gets the new global symbol inserted). Similarly, the invalidation of a symbol table must be performed if an operation with the `SymbolTable` trait is removed (this can be performed using the `invalidateSymbolTable` method, introduced in #138014).
2025-03-26[mlir] Use *Set::insert_range (NFC) (#133043)Kazu Hirata
We can use *Set::insert_range to collapse: for (auto Elem : Range) Set.insert(E); down to: Set.insert_range(Range); In some cases, we can further fold that into the set declaration.
2025-02-27[MLIR][NFC] Retire `let constructor` for Shape and MLProgram (#128869)lorenzo chelini
`let constructor` is legacy (do not use in tree!) since the table gen backend emits most of the glue logic to build a pass. This PR retires the td method for Shape and MLProgram
2024-10-16[mlir] Avoid repeated hash lookups (NFC) (#112472)Kazu Hirata
2024-09-17[MLProgram] Avoid repeated hash lookups (NFC) (#108928)Kazu Hirata
2024-01-30[mlir] Fix after #75103Joel Wee
2024-01-30[mlir] Fix build after #75103Matthias Springer
After #75103, `MLPrgramTransforms` depends on `BufferizationDialect`. Also fix an unrelated compile error in `GreedyPatternRewriteDriver.cpp`. (This was not failing on CI. I may be running an old compiler locally.)
2024-01-30[mlir][MLProgram] Add MLProgram to MemRef bufferization pass (#75103)Ryan Holt
There is currently no lowering out of `ml_program` in the LLVM repository. This change adds a lowering to `memref` so that it can be lowered all the way to LLVM. This lowering was taken from the [reference backend in torch-mlir](https://github.com/llvm/torch-mlir/commit/f41695360019bde71d52ca7548944d5488779e12 ). I had tried implementing the `BufferizableOpInterface` for `ml_program` instead of adding a new pass but that did not work because `OneShotBufferize` does not visit module-level ops like `ml_program.global`.
2024-01-25Apply clang-tidy fixes for readability-identifier-naming in ↵Mehdi Amini
PipelineGlobalOps.cpp (NFC)
2024-01-25Apply clang-tidy fixes for llvm-qualified-auto in PipelineGlobalOps.cpp (NFC)Mehdi Amini
2023-09-18[mlir][mlprogram] Add `mlprogram-pipeline-globals` optimization passRob Suderman
Added pass optimizes MLProgram global operations by reducing to only the minimal load/store operations for global tensors. This avoids unnecessary global operations throughout a program and potentially improves operation gusion. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D159228