Skip to content

[CI][AMD]Bugfix] Check that model_config is not None in enable_norm_pad_fusion#34007

Merged
tjtanaa merged 3 commits intovllm-project:mainfrom
rasmith:rasmithrasmith_fix_moe_kernels_tests
Feb 7, 2026
Merged

[CI][AMD]Bugfix] Check that model_config is not None in enable_norm_pad_fusion#34007
tjtanaa merged 3 commits intovllm-project:mainfrom
rasmith:rasmithrasmith_fix_moe_kernels_tests

Conversation

@rasmith
Copy link
Contributor

@rasmith rasmith commented Feb 6, 2026

Purpose

If cfg.model_config is None, then vllm.enable_norm_pad_fusion will crash. This is causing the following failures in CI:

FAILED kernels/moe/test_routing_simulator.py::test_routing_strategy_integration - AttributeError: 'NoneType' object has no attribute 'get_hidden_size'
FAILED kernels/moe/test_shared_fused_moe_routed_transform.py::test_routed_input_transform_inside_vs_outside[dtype0-256-128-1] - AttributeError: 'NoneType' object has no attribute 'get_hidden_size'
FAILED kernels/moe/test_shared_fused_moe_routed_transform.py::test_routed_input_transform_inside_vs_outside[dtype0-256-128-32] - AttributeError: 'NoneType' object has no attribute 'get_hidden_size'
FAILED kernels/moe/test_shared_fused_moe_routed_transform.py::test_routed_input_transform_inside_vs_outside[dtype0-128-64-1] - AttributeError: 'NoneType' object has no attribute 'get_hidden_size'
FAILED kernels/moe/test_shared_fused_moe_routed_transform.py::test_routed_input_transform_inside_vs_outside[dtype0-128-64-32] - AttributeError: 'NoneType' object has no attribute 

Test Plan

pytest -sv kernels/moe

Test Result

1950 passed, 5399 skipped, 8 warnings


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Copy link
Contributor

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

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 correctly addresses a potential AttributeError by adding a None check for cfg.model_config before accessing its attributes. This prevents a crash when model_config is not available. I have one suggestion to make the logic more robust by checking the model type directly instead of relying on a hardcoded hidden size, which will improve maintainability.

@tjtanaa tjtanaa added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 6, 2026
@tjtanaa tjtanaa enabled auto-merge (squash) February 6, 2026 17:34
Copy link
Member

@yewentao256 yewentao256 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the work!

@tjtanaa tjtanaa merged commit ec28784 into vllm-project:main Feb 7, 2026
44 of 45 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in AMD Feb 7, 2026
ItzDEXX pushed a commit to ItzDEXX/vllm that referenced this pull request Feb 19, 2026
…ad_fusion (vllm-project#34007)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
tunglinwood pushed a commit to tunglinwood/vllm that referenced this pull request Mar 4, 2026
…ad_fusion (vllm-project#34007)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready ONLY add when PR is ready to merge/full CI is needed rocm Related to AMD ROCm

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants