Skip to content

[Pallas] Add xfail tests for scalar .begin index not collapsing dims#1971

Merged
norx1991 merged 1 commit intomainfrom
yifeixu/pallas-scalar-index-test-only
Apr 7, 2026
Merged

[Pallas] Add xfail tests for scalar .begin index not collapsing dims#1971
norx1991 merged 1 commit intomainfrom
yifeixu/pallas-scalar-index-test-only

Conversation

@norx1991
Copy link
Copy Markdown
Contributor

@norx1991 norx1991 commented Apr 7, 2026

Summary

  • Add xfail test for scalar tile.begin indexing on Pallas
  • test_scalar_index_transpose: when .begin is used as a scalar subscript, the dimension should be collapsed from the result so .T produces a correct 2D permutation

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 7, 2026
@norx1991 norx1991 force-pushed the yifeixu/pallas-scalar-index-test-only branch 4 times, most recently from c215b44 to 8d9cb31 Compare April 7, 2026 19:10
@norx1991 norx1991 marked this pull request as ready for review April 7, 2026 20:10
@AmesingFlank
Copy link
Copy Markdown
Contributor

Does #1975 help with this failure?

@norx1991
Copy link
Copy Markdown
Contributor Author

norx1991 commented Apr 7, 2026

Does #1975 help with this failure?

@AmesingFlank I tried it and it still fails. I guess the dim collapsing part is not handled. I have a draft in #1972.

When tile.begin is used as a scalar tensor subscript, the Pallas
codegen emits ':' instead of collapsing the dimension. Add two
xfail tests covering the transpose rank mismatch and the
interaction with None indexing.
@norx1991 norx1991 force-pushed the yifeixu/pallas-scalar-index-test-only branch from 8d9cb31 to a2ebcf1 Compare April 7, 2026 20:25
@AmesingFlank
Copy link
Copy Markdown
Contributor

Does #1975 help with this failure?

@AmesingFlank I tried it and it still fails. I guess the dim collapsing part is not handled. I have a draft in #1972.

OK. fwiw, P2265326063 is the generated pallas code for this test with #1975 applied. I think the pallas kernel code here is correct, the 0th dimension is collapsed, but the BlockSpecs are incorrect, meaning that the kernel launches succesfully but computes incorrect results

@norx1991
Copy link
Copy Markdown
Contributor Author

norx1991 commented Apr 7, 2026

Does #1975 help with this failure?

@AmesingFlank I tried it and it still fails. I guess the dim collapsing part is not handled. I have a draft in #1972.

OK. fwiw, P2265326063 is the generated pallas code for this test with #1975 applied. I think the pallas kernel code here is correct, the 0th dimension is collapsed, but the BlockSpecs are incorrect, meaning that the kernel launches succesfully but computes incorrect results

@AmesingFlank I see. Thank you! Feel free to see if #1975 can fix this, then I can drop #1972. I will get the test in first so the CI can help us guard the behavior.

@norx1991 norx1991 merged commit 2f0558b into main Apr 7, 2026
21 checks passed
@norx1991 norx1991 deleted the yifeixu/pallas-scalar-index-test-only branch April 7, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants