Skip to content
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

#8018: Adding rotary_embedding to ttnn #8616

Merged
merged 1 commit into from
May 21, 2024
Merged

Conversation

eyonland
Copy link
Contributor

No description provided.


rotary_embedding(input_tensor: ttnn.Tensor, cos_cache: ttnn.Tensor, sin_cache: ttnn.Tensor, token_index: int, memory_config: MemoryConfig) -> ttnn.Tensor
pt_out = apply_rotary_pos_emb(x, cos_cached, sin_cached, token_idx)
return pt_out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tt-aho , would you take a close look at the _golden_function here in pytorch that is intended to reproduce the rotary_embedding op we have?

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks correct for the case where token_idx is provided

@eyonland eyonland force-pushed the ttnn-8018-rotary-embedding branch from a8bec8d to 2a69c4d Compare May 21, 2024 14:45
@eyonland eyonland merged commit 160ae3b into main May 21, 2024
5 checks passed
@eyonland eyonland deleted the ttnn-8018-rotary-embedding branch May 21, 2024 20:45
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.

None yet

4 participants