Clean up splash attention imports#4606
Open
huytransformer wants to merge 1 commit into
Open
Conversation
Import the general splash attention path from the tokamax dependency; the ring path keeps the adapted kernels via tokamax_ring_attention.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
NuojCheng
reviewed
Jul 24, 2026
| from tokamax._src.ops.attention import base as tokamax_attention_base | ||
| from tokamax._src.ops.attention import pallas_triton as tokamax_pallas_triton | ||
| from tokamax._src.ops.experimental.tpu.splash_attention import splash_attention_kernel as tokamax_splash_kernel | ||
| from tokamax._src.ops.experimental.tpu.splash_attention import splash_attention_mask as tokamax_splash_mask |
Collaborator
There was a problem hiding this comment.
I would expect an if-else path, e.g. if using ring attention we take forked splash otherwise tokamax path. If the changes are simple like this, why we need to fork all files from tokamax at the beginning?
Collaborator
Author
There was a problem hiding this comment.
Ring never needed this, it uses the tokamax_ring_attention. These were originally intended for consistency of splash paths
huytransformer
marked this pull request as ready for review
July 24, 2026 22:35
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
huytransformer
requested review from
RissyRan,
aireenmei,
bvandermoon,
gagika,
gobbleturk,
igorts-git,
jiangjy1982,
richjames0,
shralex,
suexu1025 and
xibinliu
as code owners
July 24, 2026 22:35
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.
Description
The general splash attention path now imports from the
tokamaxdependency while the ring attention keeps the adapted kernels inkernels/tokamax_splash_attentionviatokamax_ring_attention.Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.