Skip to content

Conversation

ProExpertProg
Copy link
Collaborator

@ProExpertProg ProExpertProg commented Sep 9, 2025

Fixes #23091.

Purpose

Cleanup compilation tests and custom passes and address #23091 and part of #24376. This PR is a prerequisite for matching torch implementations of custom ops in #24604.

Cleanup:

  • RMSNorm + QuantFP8 fusion:
    • remove custom multi-output matching workaround
    • remove .instance() workaround
    • remove _seen_patterns.clear() workaround
    • rename FusionPass to RMSNormQuantFusionPass
  • reduce test_fusion.py running time
  • add cleanup pass that topo-sorts and does DCE
  • add LazyInitPass test utility
  • add env var for pattern match debugging (TODO: docs)
  • fix test_sequence_parallelism.py
  • add assert to test_silu_mul_quant_fusion for easier diagnostics of fp4 failures.
  • add init check for custom_ops field syntax and warnings for specifying ops that don't exist
  • add timing and graph dumping decorator for VllmInductorPass
  • add VllmPatternMatchPass common pass superclass with pattern tracking and dumping utilities

Test Plan

Unit tests all pass.

Copy link

mergify bot commented Sep 9, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @ProExpertProg.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

Signed-off-by: Luka Govedič <lgovedic@redhat.com>
…ass)

Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
…eanup

Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
@mergify mergify bot added the needs-rebase label Sep 20, 2025
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
# Conflicts:
#	vllm/config/compilation.py

Signed-off-by: Luka Govedič <lgovedic@redhat.com>
@mergify mergify bot removed the needs-rebase label Sep 20, 2025
Signed-off-by: Luka Govedič <lgovedic@redhat.com>
@ProExpertProg ProExpertProg added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 20, 2025
Signed-off-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
Signed-off-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
@ProExpertProg ProExpertProg enabled auto-merge (squash) September 22, 2025 16:48
@simon-mo simon-mo disabled auto-merge September 22, 2025 19:30
@simon-mo simon-mo merged commit d5e0fca into vllm-project:main Sep 22, 2025
41 of 43 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in torch.compile integration Sep 22, 2025
@ProExpertProg ProExpertProg deleted the luka/custom-pass-cleanup branch September 22, 2025 19:50
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
…g utils, fix DCE bug (vllm-project#23091), fix test (vllm-project#24376), and prep for custom op matching (vllm-project#24604) (vllm-project#24542)

Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
debug_dump_path = Path(debug_dump_path) / f"rank_{rank}"
debug_dump_path.mkdir(parents=True, exist_ok=True)

from vllm.utils import unique_filepath
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that vllm.utils does not have unique_filepath.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, my bad, was working on a newer branch. I'll fix in #24604 unless you want to extract the change from there (and pull the import back up) in a separate PR to fix earlier

Copy link
Contributor

Choose a reason for hiding this comment

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

I will fix it in a separate PR

charlifu pushed a commit to ROCm/vllm that referenced this pull request Sep 25, 2025
…g utils, fix DCE bug (vllm-project#23091), fix test (vllm-project#24376), and prep for custom op matching (vllm-project#24604) (vllm-project#24542)

Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
yewentao256 pushed a commit that referenced this pull request Oct 3, 2025
…g utils, fix DCE bug (#23091), fix test (#24376), and prep for custom op matching (#24604) (#24542)

Signed-off-by: Luka Govedič <lgovedic@redhat.com>
Signed-off-by: luka <lgovedic@redhat.com>
Signed-off-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed torch.compile
Projects
Status: Done
8 participants