Repository navigation
[https://nvbugs/6912139][fix] Keep NCCL-EP transport aligned with layer quantization - #20441
Conversation
e99dd49 to
ecc5d14
Compare
ecc5d14 to
97b3b98
Compare
|
/bot run --extra-stage "GB300-16_GPUs-4_Nodes-PyTorch-PerfSanity-GEN1-NODE4-GPU16-Post-Merge-1,GB300-32_GPUs-8_Nodes-PyTorch-PerfSanity-GEN1-NODE8-GPU32-Post-Merge-2" |
|
PR_Github #78249 [ run ] triggered by Bot. Commit: |
Barry-Delaney
left a comment
There was a problem hiding this comment.
Reviewed 97b3b98. Traced backend creation, layerwise/explicit quantization finalization, scheduler quantize/dispatch ordering and NCCL-EP context construction. Communication now receives the effective layer configuration without mutating the shared model configuration; transport changes are validated before changing backend state and cannot invalidate an existing context. No blocking code finding. Executed 19 new PR unit cases against the exact extracted methods with import/dependency doubles, plus 64 transport/KV-cache/combine combinations and 16 override/weight-creation cases; all passed. Checked frozen ModelConfig shallow-copy semantics, Python parsing and git diff --check. Author-reported serving runs provide GPU evidence; I did not rerun PyTorch/CUDA/NCCL integration locally.
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
|
PR_Github #78249 [ run ] completed with state
|
|
/bot run --extra-stage "GB300-16_GPUs-4_Nodes-PyTorch-PerfSanity-GEN1-NODE4-GPU16-Post-Merge-,GB300-32_GPUs-8_Nodes-PyTorch-PerfSanity-GEN1-NODE8-GPU32-Post-Merge-" |
|
PR_Github #78307 [ run ] triggered by Bot. Commit: |
|
PR_Github #78307 [ run ] completed with state
|
sunnyqgg
left a comment
There was a problem hiding this comment.
The fix looks right. Main points (details inline):
- The actual fix is the 3-line
_create_comm_strategy_autochange, because DSR1/GLM-5 MTP layers come in throughoverride_quant_config. Thecreate_weights()->set_quant_config()sync covers a different case (layers changed in__post_init__without an override). Please clarify this in the description, and mention that a BF16 MTP layer now creates a second NCCL-EP context (communicator, EP group, buffers). - DeepEPLowLatency has the same stale-config issue. Prefer a base-class
Communication.set_quant_config()hook overisinstance(self.comm, NcclEP), at least in the main forward-port. - Use
layer_quant_modeinstead of bypassing the cache, so NCCL-EP and the backend resolve the format the same way. - Tests: 19 cases for about 70 changed lines. 4-5 cases give the same regression coverage, and the ConfigurableMoE-level tests belong in
fused_moe/test_configurable_moe.py. - main has the same
model_config=self.model_configcall in_create_comm_strategy_auto. Is a forward-port planned?
|
Addressed the review in 1b09335 and updated the PR description. NCCL-EP uses the backend-compatible layer_quant_mode and falls back to BF16 with a warning when quantized transport is unsupported. Consolidated the original 19 added test cases into six focused cases, including the real MTP override path and the new fallback behavior. The common communication hook and DeepEP late-finalization fix will be a follow-up PR. Forward-porting to main is deferred to the mass merges back to main. Validation: all commit hooks passed with Python 3.13. Locally, 18 repository transport cases passed using extracted production methods and dependency doubles, plus an additional allocated-context fallback guard check. Full pytest and GPU serving were not rerun for this revision; the description distinguishes the earlier reported runs from the current isolated checks. |
1b09335 to
03533e7
Compare
|
/bot run --extra-stage "GB300-16_GPUs-4_Nodes-PyTorch-PerfSanity-GEN1-NODE4-GPU16-Post-Merge-,GB300-32_GPUs-8_Nodes-PyTorch-PerfSanity-GEN1-NODE8-GPU32-Post-Merge-*" |
Barry-Delaney
left a comment
There was a problem hiding this comment.
Re-reviewed 03533e7. The late release/1.3 rebase leaves all four feature Python files byte-identical to the validated 1b09335 snapshot; the overlapping changes are upstream waiver-list updates. NCCL-EP now uses the same layer_quant_mode interpretation as the backend and falls back to BF16 transport when quantized transport is unavailable, allowing dispatch before local quantization. The resolved transport is checked against an existing context before mutation, so fallback cannot replace an allocated quantized context. Reviewed the consolidated MTP override/finalization tests and scheduler ordering. Ninety-six actual transport/fallback/context cases and eight weight-finalization override cases passed with native dependencies replaced; Python parsing and git diff --check passed. No blocking code finding. Earlier author-reported serving runs precede this revision; I did not rerun native NCCL/PyTorch/CUDA integration.
|
PR_Github #78542 [ run ] triggered by Bot. Commit: |
|
PR_Github #78542 [ run ] completed with state
|
03533e7 to
8d7944a
Compare
|
/bot run --extra-stage "GB300-16_GPUs-4_Nodes-PyTorch-PerfSanity-GEN1-NODE4-GPU16-Post-Merge-,GB300-32_GPUs-8_Nodes-PyTorch-PerfSanity-GEN1-NODE8-GPU32-Post-Merge-" |
|
PR_Github #78562 [ run ] triggered by Bot. Commit: |
|
PR_Github #78562 [ run ] completed with state |
|
/bot run --extra-stage "GB300-16_GPUs-4_Nodes-PyTorch-PerfSanity-GEN1-NODE4-GPU16-Post-Merge-,GB300-32_GPUs-8_Nodes-PyTorch-PerfSanity-GEN1-NODE8-GPU32-Post-Merge-" |
|
PR_Github #78596 [ run ] triggered by Bot. Commit: |
|
PR_Github #78596 [ run ] completed with state
|
|
PR_Github #79575 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #79732 [ run ] triggered by Bot. Commit: |
|
@nv-lschneider Please resolve the conflicts. |
Use each MoE layer's quantization settings for NCCL-EP communication. Honor unquantized MTP layers and quantization changes during initialization. Keep dispatch and combine behavior consistent with the resolved format. Reject incompatible format changes after communication initialization. Signed-off-by: Ludwig Schneider <[email protected]>
Re-enable the gen-only GB300 DeepSeek-R1 FP4 DEP16/MTP1 perf-sanity test. Signed-off-by: Ludwig Schneider <[email protected]>
Signed-off-by: Ludwig Schneider <[email protected]>
7d3603d to
561e970
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #79750 [ run ] triggered by Bot. Commit: |
|
PR_Github #79732 [ run ] completed with state |
|
/bot run |
|
PR_Github #79929 [ run ] triggered by Bot. Commit: |
|
PR_Github #79750 [ run ] completed with state |
|
/bot run --extra-stage "GB300-16_GPUs-4_Nodes-PyTorch-PerfSanity-GEN1-NODE4-GPU16-Post-Merge-,GB300-32_GPUs-8_Nodes-PyTorch-PerfSanity-GEN1-NODE8-GPU32-Post-Merge-" |
|
PR_Github #79952 [ run ] triggered by Bot. Commit: |
|
PR_Github #79929 [ run ] completed with state |
|
/bot skip --comment "Remaining CI stages are B200 multi-GPU. All other stages, including post-merge previous failure passed." |
|
PR_Github #79968 [ skip ] triggered by Bot. Commit: |
|
PR_Github #79952 [ run ] completed with state |
|
PR_Github #79968 [ skip ] completed with state |
….3: Keep NCCL-EP transport aligned with layer quantization Forward-port of release/1.3 PR NVIDIA#20441 (release/1.3 commit c6b6fa0) to main. Adapted to main: the waives.txt hunk is dropped because main never carried the removed waiver. In test_configurable_moe.py, main imports apply_quant_config_exclude_modules instead of DecoderModelForCausalLM, and its _create_backend helper returns a (backend, config) tuple, so the new MTP-override test unpacks the backend accordingly. The configurable_moe.py change lands after main's FUSED_COMM and DWDP early returns in _create_comm_strategy_auto. Two main-only tests (test_cutlass_communication_selection in test_moe_impl.py and test_without_dwdp_the_factory_picks_the_strategy in test_dwdp_manager.py) build MoE backends without __init__, so their fake backends now set quant_config, which _create_comm_strategy_auto reads. Signed-off-by: Ludwig Schneider <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
….3: Keep NCCL-EP transport aligned with layer quantization Forward-port of release/1.3 PR NVIDIA#20441 (release/1.3 commit c6b6fa0) to main. Adapted to main: the waives.txt hunk is dropped because main never carried the removed waiver. In test_configurable_moe.py, main imports apply_quant_config_exclude_modules instead of DecoderModelForCausalLM, and its _create_backend helper returns a (backend, config) tuple, so the new MTP-override test unpacks the backend accordingly. The configurable_moe.py change lands after main's FUSED_COMM and DWDP early returns in _create_comm_strategy_auto. Two main-only tests (test_cutlass_communication_selection in test_moe_impl.py and test_without_dwdp_the_factory_picks_the_strategy in test_dwdp_manager.py) build MoE backends without __init__, so their fake backends now set quant_config, which _create_comm_strategy_auto reads. Signed-off-by: Ludwig Schneider <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
….3: Keep NCCL-EP transport aligned with layer quantization Forward-port of release/1.3 PR NVIDIA#20441 (release/1.3 commit c6b6fa0) to main. Adapted to main: the waives.txt hunk is dropped because main never carried the removed waiver. In test_configurable_moe.py, main imports apply_quant_config_exclude_modules instead of DecoderModelForCausalLM, and its _create_backend helper returns a (backend, config) tuple, so the new MTP-override test unpacks the backend accordingly. The configurable_moe.py change lands after main's FUSED_COMM and DWDP early returns in _create_comm_strategy_auto. Two main-only tests (test_cutlass_communication_selection in test_moe_impl.py and test_without_dwdp_the_factory_picks_the_strategy in test_dwdp_manager.py) build MoE backends without __init__, so their fake backends now set quant_config, which _create_comm_strategy_auto reads. Signed-off-by: Ludwig Schneider <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
….3: Keep NCCL-EP transport aligned with layer quantization Forward-port of release/1.3 PR NVIDIA#20441 (release/1.3 commit c6b6fa0) to main. Adapted to main: the waives.txt hunk is dropped because main never carried the removed waiver. In test_configurable_moe.py, main imports apply_quant_config_exclude_modules instead of DecoderModelForCausalLM, and its _create_backend helper returns a (backend, config) tuple, so the new MTP-override test unpacks the backend accordingly. The configurable_moe.py change lands after main's FUSED_COMM and DWDP early returns in _create_comm_strategy_auto. Two main-only tests (test_cutlass_communication_selection in test_moe_impl.py and test_without_dwdp_the_factory_picks_the_strategy in test_dwdp_manager.py) build MoE backends without __init__, so their fake backends now set quant_config, which _create_comm_strategy_auto reads. Signed-off-by: Ludwig Schneider <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
….3: Keep NCCL-EP transport aligned with layer quantization Forward-port of release/1.3 PR NVIDIA#20441 (release/1.3 commit c6b6fa0) to main. Adapted to main: the waives.txt hunk is dropped because main never carried the removed waiver. In test_configurable_moe.py, main imports apply_quant_config_exclude_modules instead of DecoderModelForCausalLM, and its _create_backend helper returns a (backend, config) tuple, so the new MTP-override test unpacks the backend accordingly. The configurable_moe.py change lands after main's FUSED_COMM and DWDP early returns in _create_comm_strategy_auto. Two main-only tests (test_cutlass_communication_selection in test_moe_impl.py and test_without_dwdp_the_factory_picks_the_strategy in test_dwdp_manager.py) build MoE backends without __init__, so their fake backends now set quant_config, which _create_comm_strategy_auto reads. Signed-off-by: Ludwig Schneider <[email protected]> Signed-off-by: Simeng Liu <[email protected]> Signed-off-by: Mike Iovine <[email protected]>
Description
Fix NCCL-EP dispatch inheriting model-wide NVFP4 settings for an unquantized MoE layer. DeepSeek-R1's MTP layer produces BF16 activations, but communication previously rejected them as invalid NVFP4 input:
DSR1/GLM-5 MTP layers receive their unquantized configuration through
override_quant_config. Passing the backend's effective layer configuration toCommunicationFactoryin_create_comm_strategy_auto()is the fix for that path: communication starts with BF16 transport without changing the shared model configuration. Synchronization increate_weights()covers a separate case, where__post_init__finalizes layerwise/exclusion settings without an explicit override; it is a no-op for the MTP override path.NCCL-EP reads
QuantConfig.layer_quant_mode, matching the backend's format interpretation, and stores the resolved transport mode. Unsupported quantized dispatch falls back to BF16 with a warning, so the scheduler dispatches first and quantizes locally afterward. Changing the resolved transport after context allocation remains an error to protect context-owned buffers and descriptors.The BF16 MTP layer uses a separate NCCL-EP context from NVFP4 layers, including its communicator, EP group, and buffers. Passing effective layer settings to the factory also affects DeepEP/DeepEPLowLatency selection for override models; for example, W4A8_AWQ experts under MIXED_PRECISION can now select post-quant dispatch on DeepEPLowLatency when its other eligibility requirements are met.
This addresses the quantization mismatch exposed during NCCL-GIN regression testing. The GIN context failure was addressed separately in #20146. A common
Communication.set_quant_config()hook and DeepEP late-finalization support will be handled in a follow-up PR. Forward-porting this release fix tomainis deferred to the mass merges back tomain.Test Coverage
git diff --check, and all commit hooks passed (hooks run with Python 3.13).NCCL_GIN_GPUNETIO_PATHset and unset. These serving runs have not been rerun for the review revision.NCCL_MNNVL_CLIQUE_ID=$SLURM_NODEIDandNCCL_MNNVL_CROSS_CLIQUE=0to exercise communication across synthetic NVLink cliques.PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.Dev Engineer Review
ConfigurableMoEcreates communication strategies with the backend’s effective quantization configuration. It applies the finalized layer configuration toNcclEPbefore backend weight creation.NcclEP.set_quant_config()selects a transport format from the effective configuration and supported transport capabilities. It falls back to BF16 when FP8 or NVFP4 requirements are not met. It rejects transport-format changes after context initialization.The supplied comments report failures in two post-merge CI stages and their associated release/1.3 merge-request pipelines. They do not give failure details, so the cause is unknown.
QA Engineer Review
The modified unit tests cover layer-specific configuration, transport selection and fallback, warnings, context preservation, and rejection of transport changes after context initialization. The waiver removal targets the GB300 DeepSeek-R1 FP4 generation-only perf-sanity selector, which the existing summary identifies in
tests/integration/test_lists/test-db/l0_gb300_multi_nodes_perf_sanity_gen1_node4_gpu16.yml.For this revision, the supplied PR description reports 18 isolated transport test cases and an allocated-context fallback check passed. It also says full pytest and GPU serving were not rerun. Earlier reported test and serving results do not establish results for this revision. Coverage verdict: needs follow-up because the post-merge CI pipelines failed and no failure details were supplied.
Per-File QA Perspective
tensorrt_llm/_torch/moe/fused_moe/communication/nccl_ep.py— Verify BF16, FP8, and NVFP4 selection, fallback conditions, low-precision combine behavior, and rejection of format changes after context initialization.tensorrt_llm/_torch/moe/fused_moe/configurable_moe.py— Verify communication creation uses the backend’s effective quantization configuration and finalizes NCCL-EP before weight creation.tests/unittest/_torch/moe/fused_moe/test_configurable_moe.py— Covers layer-specific configuration during communication setup and weight creation. This unit-test file is not an integration test-list entry.tests/unittest/_torch/moe/test_communication_factory.py— Covers transport selection, unsupported-format fallback, warnings, context preservation, and rejection of late format changes. This unit-test file is not an integration test-list entry.tests/integration/test_lists/waives.txt— Removes the waiver for the GB300 DeepSeek-R1 FP4 generation-only perf-sanity selector. The supplied existing summary identifies that selector in a CI test-db list.