forked from iree-org/iree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding TiedOpInterface and wiring it through the Flow dialect.
This allows for results of operations to be tied back to their operands in storage but not in time. This allows for in-place operations to be defined on tensors that carry enough metadata to be able to correctly form streams, materialize HAL interfaces, and allocate buffers. Example: ```mlir %t = flow.dispatch @foo[...](%input) : (tensor<4xf32>) -> %input ``` This syntax also combines with the shape-carrying op interface to make it possible to also indicate that an input and a result share type and shape information: ```mlir %t = flow.dispatch @foo[...](%input) : (tensor<?xf32>{%dim}) -> %input ``` which is effectively: ```mlir %t = flow.dispatch @foo[...](%input) : (tensor<?xf32>{%dim}) -> tensor<?xf32>{%dim} ``` but with the extra bit that result 0 is tied to operand 0. Here the result %t of the dispatch aliases the storage for %input, making %input a read-write/mutable binding in the resulting HAL executable. %t is a distinct SSA value from %input, though, and represents the value of the storage backing %input after the dispatch has completed. By keeping the SSA use-def chains correct with respect to time they are still meaningful for analysi2As and nothing at this level (and the beginning of the HAL transformations) needs to perform alias analysis, while still giving us all of the information required to induce aliasing during later allocation passes.
- Loading branch information
Showing
63 changed files
with
1,700 additions
and
813 deletions.
There are no files selected for viewing
This file contains 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
166 changes: 83 additions & 83 deletions
166
iree/compiler/Conversion/Common/test/linalg_bufferize.mlir
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.