Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6
# b3ebe3be 17-Jun-2022 Matthias Springer <[email protected]>

[mlir][bufferize] Bufferize after TensorCopyInsertion

This change changes the bufferization so that it utilizes the new TensorCopyInsertion pass. One-Shot Bufferize no longer calls the One-Shot Anal

[mlir][bufferize] Bufferize after TensorCopyInsertion

This change changes the bufferization so that it utilizes the new TensorCopyInsertion pass. One-Shot Bufferize no longer calls the One-Shot Analysis. Instead, it relies on the TensorCopyInsertion pass to make the entire IR fully inplacable. The `bufferize` implementations of all ops are simplified; they no longer have to account for out-of-place bufferization decisions. These were already materialized in the IR in the form of `bufferization.alloc_tensor` ops during the TensorCopyInsertion pass.

Differential Revision: https://reviews.llvm.org/D127652

show more ...


Revision tags: llvmorg-14.0.5
# 032be233 07-Jun-2022 Matthias Springer <[email protected]>

[mlir][bufferize] Improve buffer writability analysis

Find writability conflicts (writes to buffers that are not allowed to be written to) by checking SSA use-def chains. This is better than the cur

[mlir][bufferize] Improve buffer writability analysis

Find writability conflicts (writes to buffers that are not allowed to be written to) by checking SSA use-def chains. This is better than the current writability analysis, which is too conservative and finds false positives.

Differential Revision: https://reviews.llvm.org/D127256

show more ...


# 3490aadf 28-May-2022 Matthias Springer <[email protected]>

[mlir][bufferization][NFC] Remove post-analysis step infrastructure

Now that analysis and bufferization are better separated, post-analysis steps are no longer needed. Users can directly interleave

[mlir][bufferization][NFC] Remove post-analysis step infrastructure

Now that analysis and bufferization are better separated, post-analysis steps are no longer needed. Users can directly interleave analysis and bufferization as needed.

Differential Revision: https://reviews.llvm.org/D126571

show more ...


Revision tags: llvmorg-14.0.4
# ffdbeccc 21-May-2022 Matthias Springer <[email protected]>

[mlir][bufferization] Add bufferization.alloc_tensor op

This change adds a new op `alloc_tensor` to the bufferization dialect. During bufferization, this op is always lowered to a buffer allocation

[mlir][bufferization] Add bufferization.alloc_tensor op

This change adds a new op `alloc_tensor` to the bufferization dialect. During bufferization, this op is always lowered to a buffer allocation (unless it is "eliminated" by a pre-processing pass). It is useful to have such an op in tensor land, because it allows users to model tensor SSA use-def chains (which drive bufferization decisions) and because tensor SSA use-def chains can be analyzed by One-Shot Bufferize, while memref values cannot.

This change also replaces all uses of linalg.init_tensor in bufferization-related code with bufferization.alloc_tensor.

linalg.init_tensor and bufferization.alloc_tensor are similar, but the purpose of the former one is just to carry a shape. It does not indicate a memory allocation.

linalg.init_tensor is not suitable for modelling SSA use-def chains for bufferization purposes, because linalg.init_tensor is marked as not having side effects (in contrast to alloc_tensor). As such, it is legal to move linalg.init_tensor ops around/CSE them/etc. This is not desirable for alloc_tensor; it represents an explicit buffer allocation while still in tensor land and such allocations should not suddenly disappear or get moved around when running the canonicalizer/CSE/etc.

BEGIN_PUBLIC
No public commit message needed for presubmit.
END_PUBLIC

Differential Revision: https://reviews.llvm.org/D126003

show more ...


# 988748c0 06-May-2022 Matthias Springer <[email protected]>

[mlir][bufferize] Do not copy buffers with undefined contents

Buffers with undefined contents (e.g., the result of an init_tensor) are no longer copied.

Differential Revision: https://reviews.llvm.

[mlir][bufferize] Do not copy buffers with undefined contents

Buffers with undefined contents (e.g., the result of an init_tensor) are no longer copied.

Differential Revision: https://reviews.llvm.org/D125015

show more ...


# 37a14735 03-May-2022 Matthias Springer <[email protected]>

[mlir][bufferize] Allow in-place bufferization for writes to init_tensors in loops

This commit relaxes the rules around ops that define a value but do not specify the tensor's contents. (The only su

[mlir][bufferize] Allow in-place bufferization for writes to init_tensors in loops

This commit relaxes the rules around ops that define a value but do not specify the tensor's contents. (The only such op at the moment is init_tensor.)

When such a tensor is written in a loop, it should not cause out-of-place bufferization.

Differential Revision: https://reviews.llvm.org/D124849

show more ...


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2
# d6dab38a 22-Apr-2022 Matthias Springer <[email protected]>

[mlir][bufferize][NFC] Add function boundary bufferization flag to BufferizationOptions

This makes the API easier to use. Also allows us to check for incorrect API usage for easier debugging.

Diffe

[mlir][bufferize][NFC] Add function boundary bufferization flag to BufferizationOptions

This makes the API easier to use. Also allows us to check for incorrect API usage for easier debugging.

Differential Revision: https://reviews.llvm.org/D124265

show more ...


# 9235e597 20-Apr-2022 Matthias Springer <[email protected]>

[mlir][bufferize] Fix missing copies when writing to a buffer in a loop

Writes into tensors that are definied outside of a repetitive region, but with the write happening inside of the repetitive re

[mlir][bufferize] Fix missing copies when writing to a buffer in a loop

Writes into tensors that are definied outside of a repetitive region, but with the write happening inside of the repetitive region were previously not considered conflicts. This was incorrect.

E.g.:
```
%0 = ... : tensor<?xf32>
scf.for ... {
"reading_op"(%0) : tensor<?xf32>
%1 = "writing_op"(%0) : tensor<?xf32> -> tensor<?xf32>
...
}
```

In the above example, "writing_op" should be out-of-place.

This commit fixes the bufferization for any op that declares its repetitive semantics via RegionBranchOpInterface.

show more ...


Revision tags: llvmorg-14.0.1
# 855a11ee 16-Mar-2022 Matthias Springer <[email protected]>

[mlir][bufferize][NFC] Rename allow-return-memref to allow-return-allocs

Also clean up/split test cases.

Differential Revision: https://reviews.llvm.org/D121522


# 9e24f0f4 16-Mar-2022 Matthias Springer <[email protected]>

[mlir][bufferize] Do not deallocate allocs that are returned from a block

Such IR is rejected by default, but can be allowed with `allow-return-memref`. In preparation of future refactorings, do not

[mlir][bufferize] Do not deallocate allocs that are returned from a block

Such IR is rejected by default, but can be allowed with `allow-return-memref`. In preparation of future refactorings, do not deallocate such buffers.

One-Shot Analysis now gathers information about yielded tensors, so that we know during the actual bufferization whether a newly allocated buffer should be deallocated again. (Otherwise, it will leak. This will be addressed in a subsequent commit that also makes `allow-return-memref` a non-experimental flag.)

As a cleanup, `allow-return-memref` is now part of OneShotBufferizationOptions. (It was previously ignored by AlwaysCopyBufferizationState.) Moreover, AlwaysCopyBufferizationState now asserts that `create-deallocs` is deactivated to prevent surprising behavior.

Differential Revision: https://reviews.llvm.org/D121521

show more ...


# 9597b16a 15-Mar-2022 Matthias Springer <[email protected]>

[mlir][bufferize][NFC] Split BufferizationState into AnalysisState/BufferizationState

Differential Revision: https://reviews.llvm.org/D121361


Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3
# d1d79920 08-Mar-2022 Matthias Springer <[email protected]>

[mlir][bufferize][NFC] Better error messages if analysis fails

Differential Revision: https://reviews.llvm.org/D121203


Revision tags: llvmorg-14.0.0-rc2
# 3b426868 22-Feb-2022 Matthias Springer <[email protected]>

[mlir][bufferize] Do not assert destination passing style for non-bufferizable ops


# d2dacde5 22-Feb-2022 Matthias Springer <[email protected]>

[mlir][bufferize][NFC] Rename `comprehensive-function-bufferize` to `one-shot-bufferize`

The related functionality is moved over to the bufferization dialect. Test cases are cleaned up a bit.

Diffe

[mlir][bufferize][NFC] Rename `comprehensive-function-bufferize` to `one-shot-bufferize`

The related functionality is moved over to the bufferization dialect. Test cases are cleaned up a bit.

Differential Revision: https://reviews.llvm.org/D120191

show more ...


# 4ec00fb3 19-Feb-2022 Matthias Springer <[email protected]>

[mlir][bufferize] Add a way for ops to fail the analysis

Add `BufferizableOpInterface::verifyAnalysis`. Ops can implement this method to check for expected invariants and limitations.

The purpose o

[mlir][bufferize] Add a way for ops to fail the analysis

Add `BufferizableOpInterface::verifyAnalysis`. Ops can implement this method to check for expected invariants and limitations.

The purpose of this change is to introduce a modular way of checking assertions such as `assertScfForAliasingProperties`.

Differential Revision: https://reviews.llvm.org/D120189

show more ...


# 585a8a32 09-Feb-2022 Matthias Springer <[email protected]>

[mlir][bufferize] OpOperands can have multiple aliasing OpResults

This makes getAliasingOpResult symmetric to getAliasingOpOperand. The previous implementation was confusing for users and implemente

[mlir][bufferize] OpOperands can have multiple aliasing OpResults

This makes getAliasingOpResult symmetric to getAliasingOpOperand. The previous implementation was confusing for users and implemented in such a way only because there are currently no bufferizable ops that have multiple aliasing OpResults.

Differential Revision: https://reviews.llvm.org/D119259

show more ...


# cdb7675c 09-Feb-2022 Matthias Springer <[email protected]>

[mlir][bufferize][NFC] Make PostAnalysisSteps a function

They used to be classes with a virtual `run` function. This was inconvenient because post analysis steps are stored in BufferizationOptions.

[mlir][bufferize][NFC] Make PostAnalysisSteps a function

They used to be classes with a virtual `run` function. This was inconvenient because post analysis steps are stored in BufferizationOptions. Because of this design choice, BufferizationOptions were not copyable.

Differential Revision: https://reviews.llvm.org/D119258

show more ...


Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3
# 7a1579ac 20-Jan-2022 Matthias Springer <[email protected]>

[mlir][bufferization] Move one-shot bufferization to Bufferization dialect

This commit is the first step towards unifying core bufferization and One-Shot Bufferize.

This commit does not move over t

[mlir][bufferization] Move one-shot bufferization to Bufferization dialect

This commit is the first step towards unifying core bufferization and One-Shot Bufferize.

This commit does not move over the implementations of BufferizableOpInterface yet. This will be done in separate commits. This change does also not move the unit tests yet. The tests will be moved together with op interface implementations and split into separate files.

Differential Revision: https://reviews.llvm.org/D117641

show more ...