fix(npu): preserve AFD DBO config during auto worker selection - #189
Closed
jiaran-king wants to merge 1 commit into
Closed
fix(npu): preserve AFD DBO config during auto worker selection#189jiaran-king wants to merge 1 commit into
jiaran-king wants to merge 1 commit into
Conversation
jiaran-king
marked this pull request as ready for review
August 3, 2026 10:04
jiaran-king
requested review from
hsliuustc0106 and
jiangkuaixue123
as code owners
August 3, 2026 10:04
Signed-off-by: zzh <jiaranran2@gmail.com>
jiaran-king
force-pushed
the
codex/issue188-main
branch
from
August 3, 2026 10:39
9e9ff3a to
50a42b7
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
VllmConfigenable_dbo,ubatch_size, and the validation backend across the complete vLLM-Ascend platform normalization passworker_cls="auto"VllmConfig.__post_init__()validation safe and allow a failed early vLLM-Ascend import to be retriedRoot cause
For an AFD NPU config with DBO enabled, AFD temporarily presents
deepep_low_latencyso vLLM 0.19.1's native DBO backend assertion can run. vLLM-Ascend v0.19.1rc1 then normalizes an automatic, non-SP worker by replacing that backend withflashinfer_all2allv. The native assertion consequently fails before the AFD worker is created.The previous compatibility patch wrapped only
NPUPlatform._fix_incompatible_config. It did not cover the later backend rewrite in the completeNPUPlatform.check_and_update_configpass.Behavior after this change
Users continue to omit
--worker-cls:afd_plugin.v1.worker.npu.AFDNPUAttentionWorkerafd_plugin.v1.worker.npu.AFDNPUFFNWorkerdeepep_low_latencyis only the validation-safe backendflashinfer_all2allvExplicit role-specific workers remain compatible, but are not required by this fix. Non-AFD NPU and GPU platform behavior is unchanged. Existing 310P/Xlite automatic-selection restrictions remain in place.
Validation performed
Environment: macOS arm64, Python 3.12.13. The package was installed editable without runtime dependencies for CPU-safe tests.
python -m pytest -q tests/unit/compat/patches/test_config_validation.py tests/unit/compat/test_runtime.pypython -m pytest tests/unit -o addopts=python -m ruff check .python -m ruff format --check .git diff --checkThe regression coverage also verifies repeated
__post_init__, exception-safe restoration, explicit workers, non-AFD NPU behavior, DBO-off behavior, GPU automatic workers, 310P/Xlite restrictions, the runtimeflashinfer_all2allvhelper, and retry after an initial vLLM-Ascend import failure.Real NPU validation pending
This task did not log in to an NPU server or execute hardware E2E. External validation should confirm:
--worker-clsflashinfer_all2allvDBO assertion/v1/modelsand a completion request succeedflashinfer_all2allvThis change makes no DBO performance or throughput claim.
Related to #188. The issue should remain open until both target branches are merged and hardware validation is recorded.