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

[torch.compile] Dynamic fp8 + rms_norm fusion #31

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

ProExpertProg
Copy link

@ProExpertProg ProExpertProg commented Nov 8, 2024

This PR cleans up the fusion pass to make it easier to add other multi-output patterns. Then it adds dynamic fp8 rmsnorm fusion.

Copy link

github-actions bot commented Nov 8, 2024

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@ProExpertProg ProExpertProg force-pushed the luka/rms-norm-fusion-refactor branch 2 times, most recently from 81ad334 to 7d1adbf Compare November 12, 2024 23:08
@ProExpertProg ProExpertProg force-pushed the luka/rms-norm-fusion-refactor branch from 7d1adbf to 651ebdc Compare November 21, 2024 23:35
@ProExpertProg ProExpertProg changed the title Fusion and functionalization pass refactors [torch.compile] Dynamic fp8 + rms_norm fusion Nov 21, 2024
@ProExpertProg ProExpertProg changed the base branch from luka/rms-norm-fusion to main November 21, 2024 23:48
@@ -22,6 +22,7 @@
supports_moe_ops = False
with contextlib.suppress(ImportError):
import vllm._moe_C # noqa: F401

Choose a reason for hiding this comment

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

nit: whitespace changes, here and below

@varun-sundar-rabindranath

Reviewed the kernel files and kernel tests. Left some minor comments. LGTM otherwise.

@ProExpertProg ProExpertProg force-pushed the luka/rms-norm-fusion-refactor branch from 13f84b9 to 194eb6f Compare December 4, 2024 22:45
@ProExpertProg ProExpertProg marked this pull request as ready for review December 4, 2024 22:45
@ProExpertProg ProExpertProg force-pushed the luka/rms-norm-fusion-refactor branch from 194eb6f to 7046e4b Compare December 4, 2024 22:48
Signed-off-by: luka <[email protected]>
Signed-off-by: luka <[email protected]>
- extracted MultiOutputMatch to own file
- extracted utils to fx_utils
- added named tuples for op keys

Signed-off-by: luka <[email protected]>
@ProExpertProg ProExpertProg force-pushed the luka/rms-norm-fusion-refactor branch from 17ff1b9 to 720d537 Compare December 12, 2024 20:16
@ProExpertProg ProExpertProg force-pushed the luka/rms-norm-fusion-refactor branch from 21abcff to a70d496 Compare December 12, 2024 22:19
- add kFp8Type constant for cuda/hip agnostic torch type checking
- check contiguous
- overflow
- reduce number of tests

Signed-off-by: luka <[email protected]>
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