[Pallas] Add expected-failure test for non-power-of-2 RDIM size#1945
Merged
[Pallas] Add expected-failure test for non-power-of-2 RDIM size#1945
Conversation
d852bde to
a826a11
Compare
AmesingFlank
approved these changes
Apr 3, 2026
RDIM_SIZE is rounded to next power of 2, but Pallas block refs use the exact dimension size, causing shape mismatches (e.g., 1000 vs 1024). Adds test_reduce_non_pow2 as expectedFailure to document the bug.
a826a11 to
02c6b97
Compare
norx1991
added a commit
that referenced
this pull request
Apr 6, 2026
Pallas block refs use exact tensor dimensions, so rounding RDIM_SIZE to the next power of 2 (e.g., 1000→1024) causes shape mismatches. Add Backend.static_rdim_size() and override it in PallasBackend to return the exact size. Also override next_power_of_2_host_expr to be a no-op for Pallas. Removes @xfailIfPallas from test_reduce_non_pow2 added in #1945.
2 tasks
norx1991
added a commit
that referenced
this pull request
Apr 6, 2026
Pallas block refs use exact tensor dimensions, so rounding RDIM_SIZE to the next power of 2 (e.g., 1000→1024) causes shape mismatches. Add Backend.static_rdim_size() and override it in PallasBackend to return the exact size. Also override next_power_of_2_host_expr to be a no-op for Pallas. Removes @xfailIfPallas from test_reduce_non_pow2 added in #1945.
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.
Summary
test_reduce_non_pow2totest/test_pallas.pyto document a Pallas bug where_RDIM_SIZEis rounded to the next power of 2 (e.g., 1000→1024), but Pallas block refs use the exact dimension size, causing shape mismatches._RDIM_SIZEcode path.@xfailIfPallassince the fix has not landed yet.Test plan
ValueError: Incompatible shapes for broadcasting: shapes=[(128, 1024), (128, 1000)]