[MLIR] Add bufferization state class to OneShotBufferization pass by mscuttari · Pull Request #141019 · llvm/llvm-project (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

mscuttari

@mscuttari

@mscuttari mscuttari marked this pull request as ready for review

May 22, 2025 08:11

matthias-springer

@mscuttari

mscuttari added a commit that referenced this pull request

May 23, 2025

@mscuttari

Add the MLIRBufferizationTransforms library in the list libraries linked by the MLIRMLProgramTransforms one. The problem was not catched before the merge of #141019.

mscuttari added a commit that referenced this pull request

May 26, 2025

@mscuttari

…ferization (#141341)

Avoid recomputing the symbol tables by using the BufferizationState class introduced in #141019. There is also one similar TODO remaining within the getBufferType function, but that requires more reasoning and one more API change.

xhuw

mscuttari added a commit that referenced this pull request

May 28, 2025

@mscuttari

…ts` 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.

sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request

Jun 3, 2025

@mscuttari @sivan-shani

…vm#141019)

Follow-up on llvm#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 llvm#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 llvm#138014).

sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request

Jun 3, 2025

@mscuttari @sivan-shani

…1210)

Add the MLIRBufferizationTransforms library in the list libraries linked by the MLIRMLProgramTransforms one. The problem was not catched before the merge of llvm#141019.

sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request

Jun 3, 2025

@mscuttari @sivan-shani

…ferization (llvm#141341)

Avoid recomputing the symbol tables by using the BufferizationState class introduced in llvm#141019. There is also one similar TODO remaining within the getBufferType function, but that requires more reasoning and one more API change.

sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request

Jun 3, 2025

@mscuttari @sivan-shani

…ts` interface methods (llvm#141466)

The PR continues the work started in llvm#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.

rolfmorel added a commit to libxsmm/tpp-mlir that referenced this pull request

Jun 12, 2025

@rolfmorel