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.
[Codegen][GPU] Change iree_gpu.shuffle_tensor to take a region for th…
…e read (iree-org#17425) This simplifies the number of fields required for the ops and enables including reshaping of the intermediate allocation without needing to add fields to the op ad infinitum. This change has another motivation due to an issue arising from alloc reuse that naturally arises from hoisting static allocations out of loops. In short, such hoisting (and bufferization) requires a synchronization not only on the write to the allocation, but also after all reads have completed due to reusing the same allocation for each iteration of the loop. This dependency is not modeled with SSA before or after bufferization, meaning the fact that this operation represents both the write and the reads is saving us with some spooky action at a distance. This missing dependency needs more investigation in the future, but it is unclear to me at the moment how to navigate bufferization and vectorization currently. I suspect we will end up wanting a vectorization pattern for this operation, but I'm leaving that as TODO for now. This also makes the intermediate type a tensor again because we were just using `bufferization.to_memref` before to get back to a tensor and the generated IR was unnatural. Perhaps worth another look in the future as well.
- Loading branch information
Showing
9 changed files
with
223 additions
and
175 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
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.