Lines Matching refs:One
9 an entire program in a single pass (*One-Shot Bufferize*). This infrastructure
16 bufferization patterns have been migrated to One-Shot Bufferize, but some
18 conversion and its type converter. New projects should use One-Shot Bufferize,
20 Moreover, One-Shot Bufferize results in better bufferization with fewer memory
21 allocations and buffer copies. This documentation is mostly about One-Shot
23 conversion-based bufferization to One-Shot Bufferize.
25 ## What is One-Shot Bufferize?
27 One-Shot Bufferize is a new tensor bufferization pass designed for IR in
31 One-Shot Bufferize is:
35 different dialects. In One-Shot Bufferize, `BufferizableOpInterface`
41 ops, but also helper methods for One-Shot Bufferize's analysis to query
57 * **Modular**: The current One-Shot Analysis can be replaced with a different
61 serve as a custom analysis. It is even possible to run One-Shot Bufferize
62 without any analysis (`AlwaysCopyAnalysisState`), in which case One-Shot
66 To reduce complexity, One-Shot Bufferize should be
72 From an architecture perspective, One-Shot Bufferize consists of
104 To simplify this problem, One-Shot Bufferize was designed for ops that are in
113 `%0`, One-Shot Bufferize considers only two options:
119 for buffer(`%0`), but those are not considered by One-Shot Bufferize to keep the
120 bufferization simple. One-Shot Bufferize could be extended to consider such
167 later). One-Shot Bufferize works best if there is a single SSA use-def chain,
186 One-Shot Bufferize has debug flags (`test-analysis-only print-conflicts`) that
190 ## Using One-Shot Bufferize
199 that all needed external models are registered before running One-Shot
202 By default, One-Shot Bufferize fails when it encounters an op with tensor
205 `allow-unknown-ops`. In that case, One-Shot Bufferize inserts
207 named versions of `unrealized_conversion_cast`. Note that One-Shot Bufferize's
209 bufferization. Therefore, running One-Shot Bufferize multiple times in a
212 One-Shot Bufferize can be configured to bufferize only ops from a set of
214 dialect conversion-based bufferization to One-Shot Bufferize. One-Shot Bufferize
216 generates `to_tensor`/`to_memref` ops which One-Shot Bufferize cannot analyze.
218 One-Shot Bufferize can also be called programmatically with
227 One-Shot Bufferize deallocates all buffers that it allocates. This is in
231 pass. By default, One-Shot Bufferize rejects IR where a newly allocated buffer
268 in an efficient way. For this reason, One-Shot Bufferize must be explicitly
271 When running with `allow-return-allocs`, One-Shot Bufferize may introduce
272 allocations that cannot be deallocated by One-Shot Bufferize yet. For that
273 reason, `-buffer-deallocation` must be run after One-Shot Bufferize. This buffer
299 One-Shot Bufferize can be configured to leak all memory and not generate any
305 One-Shot Bufferize bufferizes ops from top to bottom. This works well when all
307 `allow-unknown-ops`, One-Shot Bufferize must insert `to_memref` ops at the
308 bufferization boundary and decide on a memref type. By default, One-Shot
316 When bufferizing the above IR, One-Shot Bufferize inserts a `to_memref` ops with
334 One-Shot Bufferize tries to infer the most precise memref type when bufferizing
344 One-Shot Bufferize has an option `unknown-type-conversion` to control the
358 ## Extending One-Shot Bufferize
385 To get a better understanding of why One-Shot Bufferize introduced a buffer
408 ([slides](https://mlir.llvm.org/OpenMeetings/2022-01-13-One-Shot-Bufferization.pdf)).
413 Both dialect conversion-based bufferization and One-Shot Bufferize generate
416 One-Shot Bufferize must run first because it cannot analyze those boundary ops.
418 filter for One-Shot Bufferize, so that dialects can be switched over one-by-one.
422 One-Shot Bufferize does currently not support function graph bufferization.
424 run the existing `--func-bufferize` bufferization pass after One-Shot Bufferize.
428 which is an extension of One-Shot Bufferize. This bufferization is still under
437 One-Shot Bufferize. New users should use One-Shot Bufferize (with or without
621 One convenient utility provided by the MLIR bufferization infrastructure is the
693 `BufferizableOpInterface`. New users should use One-Shot Bufferize instead