Skip to content

[Graph][Fusion] Integrating inductor pass and npugraph ex pass - #6354

Merged
wangxiyuan merged 17 commits into
vllm-project:mainfrom
wxsIcey:pass_framework
Feb 13, 2026
Merged

wangxiyuan merged 17 commits into
vllm-project:mainfrom
wxsIcey:pass_framework

Conversation

@wxsIcey

@wxsIcey wxsIcey commented Jan 28, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it?

Integrating inductor pass and npugraph ex pass, see RFC: #6347

Does this PR introduce any user-facing change?

N/A

How was this patch tested?

all tests passed.

@wxsIcey
wxsIcey requested a review from yiz-liu as a code owner January 28, 2026 08:51
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the graph fusion passes by introducing a BasePattern class to unify pattern registration for both the inductor and npugraph_ex backends. This is a good architectural improvement. However, the current implementation contains two critical bugs that will cause runtime errors: the new BasePattern calls a method that is not defined, and a class is removed without updating its usage elsewhere. My review includes specific comments and suggestions to address these critical issues.

I am having trouble creating individual review comments. Click here to see my feedback.

vllm_ascend/compilation/passes/base_pattern.py (27-43)

critical

The call to self.get_extra_check() on line 31 will raise an AttributeError at runtime as the method is not defined in BasePattern. Additionally, the extra_check variable is unused. To fix the runtime error and improve consistency, I suggest removing the call to the undefined method and applying the existing extra_stream_scope_check to both pm.register_replacement and torchair.register_replacement.

    def register(self, pm_pass: PatternMatcherPass) -> None:
        pattern_fn = self.get_pattern()
        replacement_fn = self.get_replacement()
        example_inputs = self.get_example_inputs()
        
        pm.register_replacement(
            pattern_fn, replacement_fn, example_inputs, 
            pm.fwd_only, pm_pass, extra_check=extra_stream_scope_check
        )
        
        torchair.register_replacement(
            search_fn=pattern_fn,
            replace_fn=replacement_fn,
            example_inputs=example_inputs,
            extra_check=extra_stream_scope_check,
        )

vllm_ascend/compilation/npugraph_ex_passes/graphex_norm_quant_fusion_pass.py (28-87)

critical

Removing the GraphEXAddRMSNormQuantPattern class introduces a NameError at runtime because GraphEXAddRMSNormFusionPass in this same file still attempts to use it on line 242.

Since AddRMSNormQuantPattern (which now uses BasePattern) handles registration for both torchair and inductor, the call to GraphEXAddRMSNormQuantPattern(...).register() is likely no longer needed and should be removed from GraphEXAddRMSNormFusionPass.__init__.

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@wxsIcey

wxsIcey commented Feb 11, 2026

Copy link
Copy Markdown
Collaborator Author

please help to verify npugraph ex is available @ChenCangtao

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@wxsIcey
wxsIcey force-pushed the pass_framework branch 2 times, most recently from 78ec79c to 2a9a175 Compare February 12, 2026 02:42
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
@wangxiyuan
wangxiyuan merged commit 7164990 into vllm-project:main Feb 13, 2026
27 checks passed
845473182 pushed a commit to 845473182/vllm-ascend that referenced this pull request Feb 24, 2026
…ascend into qwen3next_rebase

* 'qwen3next_rebase' of https://github.com/845473182/vllm-ascend:
  [Bugfix][DispatchFFNCombine] resolve vec error caused by unaligned UB access (vllm-project#6707)
  [Lint] Adapt lint tools for windows (vllm-project#6727)
  [main][Docs] Fix typos across documentation (vllm-project#6728)
  [Feat.][310P]: weightNZ feature with quant or unquant. (vllm-project#6705)
  [Feat.][310P] addrmsnorm for 300I DUO (vllm-project#6704)
  [Graph][Fusion] Integrating inductor pass and npugraph ex pass (vllm-project#6354)
  [bugfix] adapt bugfix for norm_quant_fusion_pass to npugraph_ex (vllm-project#6726)
  [doc] add A2 series doc for GLM5.md (vllm-project#6717)
HF-001 pushed a commit to HF-001/vllm-ascend that referenced this pull request Feb 25, 2026
…project#6354)

### What this PR does / why we need it?
Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>
banxiaduhuo pushed a commit to banxiaduhuo/vllm-ascend that referenced this pull request Feb 26, 2026
…project#6354)

### What this PR does / why we need it?
Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>
maoxx241 pushed a commit to maoxx241/vllm-ascend that referenced this pull request Mar 2, 2026
…project#6354)

### What this PR does / why we need it?
Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>
shitianlong1994 pushed a commit to triomino/vllm-ascend that referenced this pull request Mar 5, 2026
…project#6354)

Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

N/A

all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>
shitianlong1994 pushed a commit to triomino/vllm-ascend that referenced this pull request Mar 6, 2026
…project#6354)

Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

N/A

all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>

[bugfix] Pass adaptation
mulsadd trion pass adaptation for 0.13.0
shitianlong1994 pushed a commit to triomino/vllm-ascend that referenced this pull request Mar 6, 2026
…project#6354)

Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

N/A

all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>

[bugfix] Pass adaptation
mulsadd trion pass adaptation for 0.13.0
LCAIZJ pushed a commit to LCAIZJ/vllm-ascend that referenced this pull request Mar 7, 2026
…project#6354)

### What this PR does / why we need it?
Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>
triomino pushed a commit to triomino/vllm-ascend that referenced this pull request Mar 10, 2026
…project#6354)

Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

N/A

all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>

[bugfix] Pass adaptation
mulsadd trion pass adaptation for 0.13.0
yangzhe-2026 pushed a commit to yangzhe-2026/vllm-ascend that referenced this pull request May 6, 2026
…project#6354)

### What this PR does / why we need it?
Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>
nanxingMy pushed a commit to nanxingMy/vllm-ascend that referenced this pull request May 15, 2026
…project#6354)

### What this PR does / why we need it?
Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: nanxing <1014662416@qq.com>
ader47 pushed a commit to ader47/vllm-ascend that referenced this pull request Jun 18, 2026
…project#6354)

### What this PR does / why we need it?
Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>
CXY-Katrina pushed a commit to CXY-Katrina/vllm-ascend that referenced this pull request Jun 27, 2026
…project#6354)

### What this PR does / why we need it?
Integrating inductor pass and npugraph ex pass, see RFC:
vllm-project#6347

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
all tests passed.

- vLLM version: v0.14.1
- vLLM main:
vllm-project/vllm@dc917cc

---------

Signed-off-by: wxsIcey <1790571317@qq.com>
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