Skip to content

Adapt Splash Attention from TorchPrime #8911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 11, 2025
Merged

Adapt Splash Attention from TorchPrime #8911

merged 16 commits into from
Apr 11, 2025

Conversation

zpcore
Copy link
Collaborator

@zpcore zpcore commented Mar 31, 2025

Adapt the PR AI-Hypercomputer/torchprime#145 from TorchPrime into PTXLA. Also simplified the code to use jit hashing from #8878.

In addition, fix a small bug in xla_builder.call_jax when the input arg contains both None and other hashable types in sequence.

@zpcore zpcore marked this pull request as ready for review April 5, 2025 21:00
@zpcore zpcore requested a review from tengyifei April 5, 2025 21:00
@zpcore zpcore enabled auto-merge (squash) April 5, 2025 23:28
Copy link
Collaborator

@tengyifei tengyifei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@tengyifei tengyifei requested a review from bhavya01 April 8, 2025 21:29
@tengyifei
Copy link
Collaborator

Looks like some comments still need to be addressed -- LMK whenever I should TAL!

@zpcore
Copy link
Collaborator Author

zpcore commented Apr 9, 2025

Looks like some comments still need to be addressed -- LMK whenever I should TAL!

Yes, I am working on getting rid of the lru_cache. Need to fix some small issues before resolving the feedback. Thanks!

@zpcore
Copy link
Collaborator Author

zpcore commented Apr 10, 2025

Oh, interesting that the test failed for the cache miss count. Looks like the HLO cache can be reused between test functions.

@zpcore
Copy link
Collaborator Author

zpcore commented Apr 11, 2025

Hi @tengyifei , I created issue #8963 to track the hashing issue. Will follow up in a separate PR for the fix.

Copy link
Collaborator

@tengyifei tengyifei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM / LGTM

@zpcore zpcore merged commit 4583051 into master Apr 11, 2025
23 of 24 checks passed
@zpcore zpcore deleted the piz/port_sa branch April 11, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants