[ROCm] Fix reduction emitter tests to work on ROCm#542
Open
nurmukhametov wants to merge 1 commit intorocm-jaxlib-v0.8.2from
Open
[ROCm] Fix reduction emitter tests to work on ROCm#542nurmukhametov wants to merge 1 commit intorocm-jaxlib-v0.8.2from
nurmukhametov wants to merge 1 commit intorocm-jaxlib-v0.8.2from
Conversation
The tests mof_scalar_variadic.hlo and side_output_broadcast.hlo were designed to test the Reduction emitter with Multi-Output Fusions (MOF) containing variadic reductions and side outputs. However, they used f32[6,6] (36 elements) which fails the IsUnnestedReductionFasterThanElemental heuristic on ROCm (warp_size=64) while passing on CUDA (warp_size=32). When the heuristic fails, the fusion is routed to the Loop emitter instead of the Reduction emitter. The Loop emitter cannot handle fusions with incompatible output shapes (e.g., f32[] and f32[6,6] in the same tuple), causing a segmentation fault in GetBitcastMap/ApplyIndexing. Fix by increasing the test dimensions from 6x6 to 8x8 (64 elements), which satisfies the heuristic on both platforms. This ensures the tests exercise the Reduction emitter as originally intended on both CUDA and ROCm.
b4580c7 to
bf3b075
Compare
Author
|
I don't think it is |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tests mof_scalar_variadic.hlo and side_output_broadcast.hlo were designed to test the Reduction emitter with Multi-Output Fusions (MOF) containing variadic reductions and side outputs. However, they used f32[6,6] (36 elements) which fails the
IsUnnestedReductionFasterThanElemental heuristic on ROCm (warp_size=64) while passing on CUDA (warp_size=32).
When the heuristic fails, the fusion is routed to the Loop emitter instead of the Reduction emitter. The Loop emitter cannot handle fusions with incompatible output shapes (e.g., f32[] and f32[6,6] in the same tuple), causing a segmentation fault in GetBitcastMap/ApplyIndexing.
Fix by increasing the test dimensions from 6x6 to 8x8 (64 elements), which satisfies the heuristic on both platforms. This ensures the tests exercise the Reduction emitter as originally intended on both CUDA and ROCm.