Skip to content

bound rope token count to weights tensor size in reshape#10412

Merged
copybara-service[bot] merged 1 commit into
google:masterfrom
aizu-m:rope-tokens-weights-bound
Jun 10, 2026
Merged

bound rope token count to weights tensor size in reshape#10412
copybara-service[bot] merged 1 commit into
google:masterfrom
aizu-m:rope-tokens-weights-bound

Conversation

@aizu-m

@aizu-m aizu-m commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

reshape_rope_operator hands the input's token count straight to the rope microkernel, which addresses the weights table at token * channels, so a runtime input with more tokens than the weights tensor was built for reads past the end of that buffer and the stray values land in the output; the check bounds tokens against the weights element count before the kernel runs.

@copybara-service copybara-service Bot merged commit 85115d2 into google:master Jun 10, 2026
7 checks passed
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.

1 participant