Lines Matching refs:bufferization
9 to bufferization. These passes typically run as one of the last steps in a
12 [tile/fuse/… on tensors first](https://llvm.discourse.group/t/rfc-linalg-on-tensors-update-and-comprehensive-bufferization-rfc/3373),
15 
17 The most important bufferization pass is *One-Shot Bufferize*: This pass
32 One-Shot Bufferize is a tensor bufferization pass designed for IR in
34 and with aggressive in-place bufferization.
43 * A **whole-function at a time analysis**. In-place bufferization decisions
47 information about an op's bufferization/memory semantics.
50 analyze the entire IR and make bufferization decisions. Then, bufferize
60 analysis. The result of the analysis are queried by the bufferization via
72 The high-level goal of every bufferization technique is to:
78 bufferization into an algorithmically complex problem with similarities to
81 Depending on the concrete use case, there may be additional bufferization
90 result, bufferization has to choose a memref buffer in which the result can be
92 bufferization strategy would be unacceptable for high-performance codegen. When
99 DPS exists in itself independently of bufferization and is tied to SSA
111 place in the context of bufferization as a possible "anchor" for the
112 bufferization algorithm. This allows the user to shape the input in a form that
113 guarantees close to optimal bufferization result when carefully choosing the
117 aren't any other conflicting uses of this tensor, the bufferization can alias
137 bufferization simple. One-Shot Bufferize could be extended to consider such
138 buffers in the future to achieve a better quality of bufferization.
152 bufferization allocates a new buffer. This could be avoided by instead using an
207 The bufferization dialect provides a few helper ops to connect tensor IR (that
211 `bufferization.to_memref %t` returns the future buffer of a tensor SSA value.
212 `bufferization.to_tensor %m` returns a tensor SSA value for a given MemRef
213 buffer. `bufferization.materialize_in_destination` indicates that a tensor value
226 %A_tensor = bufferization.to_tensor %A restrict : memref<1x17x19xf32> to tensor<1x17x19xf32>
227 %B_tensor = bufferization.to_tensor %B restrict : memref<1x19x29xf32> to tensor<1x19x29xf32>
233 bufferization.materialize_in_destination
241 Note that all bufferization ops in this example have the `restrict` unit
246 attribute gives strong aliasing guarantees to the bufferization analysis and
271 `to_memref`/`to_tensor` ops around the bufferization boundary.
277 [`bufferization::runOneShotBufferize`](https://github.com/llvm/llvm-project/blob/ae2764e835a26bad9774803eca0a6530df2a3e2d/mlir/include/mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h#L167).
279 [`bufferization::bufferizeOp`](https://github.com/llvm/llvm-project/blob/ae2764e835a26bad9774803eca0a6530df2a3e2d/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h#L78)
283 currently limitations around function graph bufferization: recursive
285 boundary bufferization can be enabled with `bufferize-function-boundaries`. Each
295 bufferization boundary and decide on a memref type. By default, One-Shot
308 %0_m = bufferization.to_memref %0 : memref<?x?xf32, strided<[?, ?], offset: ?>>
315 future bufferization. If the op turns out to be bufferized to an op with a
357 is the exact same memref as the aliasing OpOperand after bufferization (in
358 case of in-place bufferization). Otherwise, (e.g., they overlap but are not
363 with `bufferization::replaceOpWithBufferizedValues`.
434 of the bufferization analysis. Every operation with tensor semantics has a