-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Indexing changes for TMA Circular Buffering (#2825)
## Summary ## It is the changes to the indexing lowering pass from #2773. It is stacked on #2824. Tracking Branch: #2773 ## Details ## - In the circular buffering pass, we manually index the mbarriers and tokens using the index of the prologue, main, and epilogue loops. ```cpp for (int index : c10::irange(fl->extent()) { int stage = index % number_of_pipeline_stages; mbarrier_t current_stage_mbarrier = mbarriers[stage]; // represented with kir::TensorIndex int next_stage = (index + number_of_stages - 1) % number_of_pipeline_stages; mbarrier_t next_stage_mbarrier = mbarriers[next_stage]; // represented with kir::TensorIndex } ``` - The handle functions for `kir::MBarrierInit`, `kir::MBarrierInvalidate`, `kir::MBarrierArriveExpectTx`, and `kir::MBarrierWait` are modified to handle `kir::TensorIndex`. - `u32IndexScalarSmemTv` is modified to get the shared memory pointer address for a `kir::TensorIndex`.
- Loading branch information
Showing
4 changed files
with
121 additions
and
28 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