-
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.
Fixing indexing issue with almost-exact mapping (#3494)
This is a follow-up to #3454. Specifically, as we now allow updating of index mappings in `TensorIndexer::setIndex`, there can be a case like below: ``` merge b0(1), i1(8) -> i2(8) ``` When propagating the index of `i2`, `i2_idx`, backward, the input IDs would get `i2_idx / 8` and `i2_idx % 8`, respectively. However, if `i2_idx` is not guaranteed to be less than 8 (for example, due to a non-divisible split of `i2`), the broadcast `b0` id would potentially get a non-zero index, which means that we would need to predicate `b0` as well, i.e., `i2_idx / 8 < 1`, if it's part of the allocation domain. However, this would not be predicated as we ignore broadcast IDs. The new unit test would fail at the validation due to this predication problem. To fix the issue, we could also predicate broadcast allocation IDs. Instead, this PR takes a simpler approach that just forwards a given index to its almost-exactly mapped ID as is. In the above case, `b0` and `i1` would get `0` and `i2_idx`, respectively. Tested H100 manually.
- Loading branch information
Showing
2 changed files
with
73 additions
and
10 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