-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#sdy avoid sideways operand propagation for elementwise ops which can…
…'t propagate to the result. We don't want to propagate sideways through operands if the element-wise factor is used in the result and is not sharded in the same way. We want to avoid this to avoid the following situation which can happen when a `sharding_constraint` is added onto the operand during Shardy import: ```mlir %arg0: [{"a", ?}] %arg1: [{?}] %0 = add %arg0, %arg1 : [{}] ``` We don't want to do an all-gather on both %arg0 and %arg1 due to "a" propagating sideways. Instead with the code below, since "a" can't propagate to `%0`, we will only do an all-gather on %arg0. Long term we should undo this and allow sideways propagation, but have our explicit reshard pass make sure the result is all-gathered instead of both operands. PiperOrigin-RevId: 726920093
- Loading branch information
1 parent
1023b94
commit 4fbb266
Showing
5 changed files
with
105 additions
and
18 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