-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Pallas TPU] Generalize while_loop lowering in Pallas -> Mosaic.
The existing lowering path supports only while_loops which can be converted to fori_loop. That path makes it significantly easier to optimize and unroll, but cannot support a large class of interesting loop formulations. This patch draws from the Pallas -> Triton while_loop lowering rule to support such loops in Pallas. Matching is still performed against fori_loop, to lower via that mechanism if possible -- as it is likely more straightforwardly optimizable compared to general "while". PiperOrigin-RevId: 626089180
- Loading branch information
jax authors
committed
Apr 18, 2024
1 parent
6ca69f3
commit 9c9e805
Showing
2 changed files
with
274 additions
and
8 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