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

[Deepseek-V2] Fused rope implementation #3105

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

annanyapr
Copy link
Contributor

This PR fuses the rope operation with the matrix transposes which we were doing before the rope operation. Have tested the model(after compiling) post the changes.

@annanyapr annanyapr closed this Jan 22, 2025
@annanyapr annanyapr reopened this Jan 22, 2025
@annanyapr
Copy link
Contributor Author

annanyapr commented Jan 23, 2025

I think the change works. Below in red is the TVM code generated earlier while in green is the TVM code after the change. It is clearly visible that we have stopped doing the reshape + permute + reshape in the newer version.
Screenshot 2025-01-23 at 3 31 25 PM
Screenshot 2025-01-23 at 3 32 24 PM

@annanyapr annanyapr force-pushed the deepseek-v2-rope-fusion branch from 8eac411 to e3de877 Compare January 24, 2025 02:51
@MasterJH5574
Copy link
Member

LGTM, thank you @annanyapr!

@MasterJH5574 MasterJH5574 merged commit 00f5303 into main Jan 24, 2025
2 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.

2 participants