-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
[torch.compile] Enable attention and allreduce fusion without custom ops enabled #24604
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
Merged
mgoin
merged 80 commits into
vllm-project:main
from
neuralmagic:luka/custom-op-matching-2
Oct 17, 2025
+1,499
−701
Merged
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
21d7d67
Functionalized patterns in prep for utility
ProExpertProg f3b4cf1
TEMP Mostly working
ProExpertProg cdad3c0
TEMP: fixed rmsnorm issue (TODO assert dtypes in fused norm_quant ker…
ProExpertProg 8e4a56f
rms works fully now, had to remove more conversions (and add them in …
ProExpertProg e151e6d
quant works except (torch,torch)
ProExpertProg 14fdc8b
quant with fix for pure torch, broke others
ProExpertProg 05a65f3
ALL WORKS
ProExpertProg e6b394e
Add TODO
ProExpertProg d96913a
Cleanup test_fusion.py, added extra layer of rms/quant
ProExpertProg b172747
Functionalize attn+quant patterns
ProExpertProg 1ae80c6
Move global vllm_config to pass manager
ProExpertProg 77835fd
Attention fusion works with custom ops
ProExpertProg 1277999
Remove V0 attn fusion test
ProExpertProg d843a67
Add triton attn test to attn+quant fusion
ProExpertProg cdd1529
Flat product for better test names/visibility
ProExpertProg 141a37e
Fix rmsnorm
ProExpertProg c6d6c3b
Refactor E2E attn fusion test
ProExpertProg 490ac86
Add TP=2 test (untested)
ProExpertProg d0b1b56
improve tests by adding more cases
ProExpertProg 47b4688
TEMP working on caplog
ProExpertProg ae7f56f
Temp MP workaround P2
ProExpertProg eb899a4
Temp MP workaround P3
ProExpertProg a2aa978
Test for caplog utils
ProExpertProg 21a9f9f
Fixed tests, passing with 2.8, 2.9 tbd
ProExpertProg 66a35a9
Update tests/compile/backend.py
ProExpertProg 7eb1364
Update csrc/layernorm_kernels.cu
ProExpertProg 5fef180
clean up fullgraph tests
ProExpertProg db479ae
TEMP allreduce fusion
ProExpertProg 54189a9
allreduce fusion working (custom ops on)
ProExpertProg b7f52bf
allreduce fusion working with/without custom ops (except fp4)
ProExpertProg d09a278
allreduce fusion working with/without custom ops (with fp4)
ProExpertProg c8675ff
log depyf folder, fix context for TestBackend, fix pattern dump
ProExpertProg d3f95fe
fullgraph allreduce test update requirements
ProExpertProg 4dbfcf7
Move e2e tests to new file, add to test pipeline
ProExpertProg 31d0127
Add e2e fusions to fullgraph test (should work with Triton backend), …
ProExpertProg c653d24
Fix spelling, precommit
ProExpertProg 1756f67
add back fp4
ProExpertProg 5619bc3
clean up e2e tests
ProExpertProg 32989d8
add pattern for final allreduce in model
ProExpertProg 46ee626
add more comprehensive testing for quantfp8 (-rmsnorm+-quant still fa…
ProExpertProg a1c7fdb
add more comprehensive testing for allreduce-rmsnorm, fix fp4 (-rmsno…
ProExpertProg c3264d8
Fix partial match rmsnorm+quant, fix allreduce+rmsnorm match
ProExpertProg 095277c
Simplify matcher utils by using RMSNorm.forward_static
ProExpertProg 52f78ce
Add allreduce test to 2-gpu test
ProExpertProg 1b1a63e
Fix e2e allreduce fusion test
ProExpertProg 0d6e550
fix func test
ProExpertProg 26892df
fix pass manager test
ProExpertProg 3547b87
fix sequence parallelism test
ProExpertProg af1ffa7
PR review
ProExpertProg 97b3ff2
Merge remote-tracking branch 'upstream/main' into luka/custom-op-matc…
ProExpertProg b5f89e5
Cleanup test_full_graph.py
ProExpertProg f6429e4
Cleanup test_fusion_attn.py
ProExpertProg 8a363d3
Slight improvement for E2E fusion
ProExpertProg 12a7c6d
Tests & docs for flat_product
ProExpertProg db16ee1
Merge branch 'main' into luka/custom-op-matching-2
ProExpertProg 8ffb474
Remove/fix TODOs
ProExpertProg 2a6299c
Fix e2e test patterns
ProExpertProg 465ce58
Update tests/compile/test_fusion.py
ProExpertProg bb0254a
Merge branch 'main' into luka/custom-op-matching-2
ProExpertProg bcd95b5
Fix func test
ProExpertProg db2b1c7
Smaller model for e2e fusion test
ProExpertProg a3ebf0a
fix fp8 quant tests
ProExpertProg 3943257
Restore original torch.Parameter behavior in RMSNorm
ProExpertProg 532cbcf
Add comment to test_logger
ProExpertProg 7e6f5b3
add flat_product example
ProExpertProg 24f1298
PR comments: cleanup fusion passes, & matching
ProExpertProg de7405b
PR comments: add _custom_op suffix
ProExpertProg 6253d5b
Add e2e to L40 distributed, move tests to start of B200 distributed
ProExpertProg 876ef22
Fix tests, PR feedback
ProExpertProg e99a759
Break up B200 tests, move allreduce to H200
ProExpertProg a226864
Merge branch 'main' into luka/custom-op-matching-2
ProExpertProg ae581e1
Fix attention fusion test numerics
ProExpertProg c03b29b
Remove inductor graph partition from unit test (included in e2e tests)
ProExpertProg d2e0489
Relax tolerance for L40 fusion test
ProExpertProg 65ef5fd
Merge branch 'main' into luka/custom-op-matching-2
ProExpertProg d4fe977
Fix NamedTuple
ProExpertProg 6319e39
Update test durations
ProExpertProg e34d36d
More tweaking of precision
ProExpertProg c27a182
Merge remote-tracking branch 'upstream/main' into luka/custom-op-matc…
ProExpertProg c4f913d
Removed TODO
ProExpertProg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.