-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue in
PartitionGatherTrivialSlicedOperandDimensions
when …
…handling out-of-bound indices. A gather operation will clamp the fetched indices such that we always retrieve the corresponding entries in the operand. However, the result of `PartitionGatherTrivialSlicedOperandDimensions` will do not handle these indices. Namely, if the indices is out of bound, we do not retrieve the entries from the operand and the result is 0. This is a execution bug in SPMD partitioner in both GSPMD and Shardy. The compilation succeeds. This issue does not exist in scatter since scatter does not need to clamp the indices. This change fixes this issue by clamping the indices at the very beginning of `PartitionGatherTrivialSlicedOperandDimensions`. PiperOrigin-RevId: 704842079
- Loading branch information
1 parent
fb8e7d5
commit dfc2f90
Showing
2 changed files
with
61 additions
and
15 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