Skip to content

Conversation

@yurekami
Copy link

Summary

  • Fixes a bug where attn_bias.to(query.dtype) was called but the result was discarded
  • The tensor's .to() method returns a new tensor rather than modifying in-place
  • This meant attn_bias remained in float32 instead of being converted to match query.dtype

Test plan

  • Code review confirms the bug - .to() returns a new tensor
  • The fix assigns the result back to attn_bias

🤖 Generated with Claude Code

The call to `attn_bias.to(query.dtype)` returned a new tensor but the
result was discarded. This meant attn_bias remained in float32 instead
of being converted to the query dtype.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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