Repository navigation
[Fix] dcp: Disable NCCL graph buffer registration by default for a2a - #45371
Phoenix3334 wants to merge 6 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
5767c2d to
bcbb4fc
Compare
This comment has been minimized.
This comment has been minimized.
|
Current direction, 2026-10-26: prioritize #45371 as the minimal default-policy candidate. #45824 is on hold after an operator-reported high-load R3 comparison: persistent/no-guard 10/10 idle -> 0/10 under load with repeated-character degeneration; nonpersistent guarded a2a 10/10 -> 10/10 (max_tokens=1024, non-PD TP8/attention-DP2/DCP4). This is separate local deployment evidence, not a new full-head validation of Historical persistent-configuration speedup claims (+41.82% / +32.52%) are withdrawn as valid performance evidence. The separate guarded-vs-fi single-run observations (-0.14% / +0.46%) remain scoped observations. Final-revision validation, required CI and maintainer review remain outstanding. See the updated PR description. Any older recommendation below to select the persistent alternative is superseded; older tests retain only their original scope. Documentation correction, 2026-10-25; no new experiment. This revision supersedes this comment's earlier allocator-overlap inference and any broader performance/validation interpretation. The production change remains limited to the DCP For the reported 2-node GB300 Kimi-K3 case (TP8/DCP8), the model-level smoke probe changed from 12/12 degenerate outputs with A smaller 8-rank synthetic harness calling the real Allocator-overlap inference withdrawn: the probe used the uppercase Each cell counts corrupted outputs / 12 prompts, not an accuracy score.
Within this tested deployment and probe, only the registration-enabled / temporary-buffer cell produced the reported degeneration. This supports an interaction between registration and temporary exchange-buffer lifetime. It does not directly demonstrate address reuse, clobbering, or a particular NCCL/CUDA internal mechanism. We also completed a follow-up GB300 performance matrix after restoring
Corrected The larger observed changes in this matrix accompanied TP-path changes: about +10% from NCCL AR to CustomAllReduceV2, then another +6-7% with K3 AR fusion. This earlier C64 matrix is a separate experiment, not part of the newer MRR384 cohorts. This also means the earlier large apparent The same guarded policy was also re-tested at concurrency 128 on the configuration that had previously failed with One C/ Merge-updated head The corrected cohort-separated performance record is in #45367. #45824 is the alternative persistent-buffer fix; the PRs should not merge as-is together. |
62f5c94 to
e44f057
Compare
4f1fa9d to
d254b48
Compare
|
Current direction, 2026-10-26: prioritize #45371 as the minimal default-policy candidate. #45824 is on hold after an operator-reported high-load R3 comparison: persistent/no-guard 10/10 idle -> 0/10 under load with repeated-character degeneration; nonpersistent guarded a2a 10/10 -> 10/10 (max_tokens=1024, non-PD TP8/attention-DP2/DCP4). This is separate local deployment evidence, not a new full-head validation of Historical persistent-configuration speedup claims (+41.82% / +32.52%) are withdrawn as valid performance evidence. The separate guarded-vs-fi single-run observations (-0.14% / +0.46%) remain scoped observations. Final-revision validation, required CI and maintainer review remain outstanding. See the updated PR description. Any older recommendation below to select the persistent alternative is superseded; older tests retain only their original scope. Documentation correction, 2026-10-25; no new experiment. This revision supersedes this comment's earlier allocator-overlap inference and any broader performance/validation interpretation. C128 stability observation — one guarded run did not reproduce the earlier failure Before this fix, on the same 2-node GB300 deployment (TP8/DCP8, Kimi-K3), the Re-testing the same C128 configuration with the startup guard enabled and no manual
This one run completed on the previously failing configuration. It supports the guard in this deployment; it is not long-duration production-stability evidence or a correctness score for all 640 answers. MRR112 / graphs112 is separate from the newer MRR384 performance cohorts. These deployment checks do not provide new end-to-end validation of merge-updated head Allocator-overlap inference withdrawn: the probe used the uppercase The correctness 2×2 is recorded in the mechanism update. It supports an interaction in the tested probe, not proof of a shared low-level cause for all C64/C128 symptoms. |
|
Current direction, 2026-10-26: prioritize #45371 as the minimal default-policy candidate. #45824 is on hold after an operator-reported high-load R3 comparison: persistent/no-guard 10/10 idle -> 0/10 under load with repeated-character degeneration; nonpersistent guarded a2a 10/10 -> 10/10 (max_tokens=1024, non-PD TP8/attention-DP2/DCP4). This is separate local deployment evidence, not a new full-head validation of Historical persistent-configuration speedup claims (+41.82% / +32.52%) are withdrawn as valid performance evidence. The separate guarded-vs-fi single-run observations (-0.14% / +0.46%) remain scoped observations. Final-revision validation, required CI and maintainer review remain outstanding. See the updated PR description. Any older recommendation below to select the persistent alternative is superseded; older tests retain only their original scope. Corrected mechanism evidence: registration × temporary-buffer lifetimeDocumentation correction, 2026-10-25; no new experiment. Reported deployment: two-node GB300, Kimi-K3, TP8/DCP8, real prefill + decode, 12-prompt greedy probe. Each cell counts corrupted outputs / 12 prompts, not an accuracy score.
Within this tested deployment and probe, only the registration-enabled / temporary-buffer cell produced the reported degeneration. This supports an interaction between registration and temporary exchange-buffer lifetime. It does not directly demonstrate address reuse, clobbering, or a particular NCCL/CUDA internal mechanism. Further controls on the failing cell still produced 12/12 corrupted outputs with Allocator-overlap inference withdrawn: the probe used the uppercase #45371 is the minimal startup-policy alternative; #45824 retains exchange storage while leaving graph registration available. Their correctness evidence is scoped to the reported checks. The older fi registration anchor measured -0.15%, but single-pair observations do not establish a noise bound or universal absence of overhead. For #45371, the deployment checks validate the startup policy, not a new end-to-end GB300 run of merge-updated head The PRs should not merge as-is together. See the cohort-separated deployment record for preliminary performance evidence and remaining CI/validation scope. |
|
Current direction, 2026-10-26: prioritize #45371 as the minimal default-policy candidate. #45824 is on hold after an operator-reported high-load R3 comparison: persistent/no-guard 10/10 idle -> 0/10 under load with repeated-character degeneration; nonpersistent guarded a2a 10/10 -> 10/10 (max_tokens=1024, non-PD TP8/attention-DP2/DCP4). This is separate local deployment evidence, not a new full-head validation of Historical persistent-configuration speedup claims (+41.82% / +32.52%) are withdrawn as valid performance evidence. The separate guarded-vs-fi single-run observations (-0.14% / +0.46%) remain scoped observations. Final-revision validation, required CI and maintainer review remain outstanding. See the updated PR description. Any older recommendation below to select the persistent alternative is superseded; older tests retain only their original scope. Corrected deployment evidence and validation scopeDocumentation correction, 2026-10-25; no new experiment. Two GB300 nodes, 4 GPUs/node; Kimi-K3, TP8/DCP8; v0.5.22-based deployment Fixed-output-length reruns
The fixed-output guarded-a2a observations are close to fi (-0.14% at C256, +0.46% at C384). This backend comparison does not isolate the cost of registration disablement in an otherwise identical Earlier variable-output exploratory sweep — separate cohort
Each throughput cell is a single measurement from a separate service startup with matched benchmark settings; repeated-run variability has not been quantified. The fixed-output rerun summary reports matching aggregate counts of 124,103,833 input / 1,966,247 output tokens across arms. That record applies only to the fixed-output rerun set, not the whole C64–C384 sweep; per-point token records still need reconciliation. Equal token totals do not establish output correctness. Requested OSL=1000 alone does not make the earlier variable-output sweep comparable to the fixed-output reruns. Do not connect the cohorts into one curve, average their deltas, or infer a shared scaling trend. These decode-only performance observations are separate from the earlier real-prefill/decode correctness probe and the MRR112 C128 stability run. They do not provide new end-to-end GB300 validation of merge-updated head Allocator-overlap inference withdrawn: the probe used the uppercase Persistent-buffer results are reported separately in #45824; the complete separated tables are in #45367. The PRs are alternative correctness fixes and should not merge as-is together. Final-version validation and repository CI remain outstanding. |
|
Current direction, 2026-10-26: prioritize #45371 as the minimal default-policy candidate. #45824 is on hold after an operator-reported high-load R3 comparison: persistent/no-guard 10/10 idle -> 0/10 under load with repeated-character degeneration; nonpersistent guarded a2a 10/10 -> 10/10 (max_tokens=1024, non-PD TP8/attention-DP2/DCP4). This is separate local deployment evidence, not a new full-head validation of Historical persistent-configuration speedup claims (+41.82% / +32.52%) are withdrawn as valid performance evidence. The separate guarded-vs-fi single-run observations (-0.14% / +0.46%) remain scoped observations. Final-revision validation, required CI and maintainer review remain outstanding. See the updated PR description. Any older recommendation below to select the persistent alternative is superseded; older tests retain only their original scope. Consolidated evidence and corrections — documentation update, 2026-10-25; no new experiment On the reported two-node GB300 / Kimi-K3 / TP8-DCP8 deployment, the startup guard reduced degenerate outputs from 12/12 to 0/12 in the real-prefill/decode smoke probe. A separate MRR112 C128 run completed 640/640 requests without the previously observed illegal-memory-access failure. These are deployment-level checks, not full task-accuracy validation or a new end-to-end validation of merge-updated head Fixed-output-length fake-PD reruns:
C64/C128/C320 from the earlier variable-output sweep remain in a separate table. They must not be combined with these reruns into one comparable C64–C384 curve. Each throughput cell is a single measurement from a separate startup; variability is unquantified. The matching aggregate token-count record applies only to the fixed-output rerun set, with per-point reconciliation pending. This backend comparison does not isolate registration-disable overhead. Allocator-overlap inference withdrawn: the probe used the uppercase The correctness 2×2 supports an interaction between registration and temporary-buffer lifetime in the tested probe. #45824 is the alternative lifetime fix; its See #45824's update and #45367's deployment record. The PRs should not merge as-is together. Final-version validation and repository CI remain outstanding. 2026-10-26 follow-up on the persistent-buffer alternativeThe #45824 evidence update now records a completed, limited non-PD TP8 / attention-DP2 / DCP4 serving smoke with local persistent a2a and the guard reported absent. Requested-ISL1024/OSL32 load bursts switched client concurrency 4→16→4. Separate short chat probes before (C1) and after (C8) each matched 10/10 extracted final-answer values; the reported final The newly supplied 53-line production patch, SHA-256 The higher-input AR-fusion boundary remains tracked in #46447: requested ISL4096/client C8 reproduced |
|
Closing #45371 as superseded for the reported CUDA-Graph-enabled DCP I rechecked current Our original GB300 A/B evidence (12/12 degenerate outputs with registration on versus 0/12 with registration off, plus a guarded C128 run completing 640/640 requests) remains documented in the PR. We have not rerun the original Kimi-K3 end-to-end reproducer on current The persistent-buffer alternative #45824 was also closed without merging after its high-load correctness failure. Historical apparent speedups from that configuration remain withdrawn. Thanks to the upstream contributors for the broader guard. No further merge of the DCP-specific policy change is needed for the original scenario. |
Final status — superseded, closed without merging (2026-11-07)
#43216 already implements the required default safeguard for the original failure configuration. The broader #43216 merged on 2026-10-22 and calls
_disable_nccl_graph_buffer_registration()when a multi-rank deployment has CUDA Graph capture enabled. In the original two-node GB300 / Kimi-K3 / TP8-DCP8 / DCPa2ascenario, the effective default is thereforeNCCL_GRAPH_REGISTER=0, provided it was not explicitly overridden.This PR's DCP-specific policy would be redundant for that graph-enabled scenario; it is not claimed that both conditions are identical for eager-only configurations. An explicit
NCCL_GRAPH_REGISTER=1is preserved by both viasetdefault(with a warning).Original issue and evidence
a2aon 2-node GB300 produced corrupted/degenerate Decode outputs when graph registration was enabled.NCCL_GRAPH_REGISTER=0; the startup guard reproduced 0/12.!pattern.Validation boundary and disposition
This is a source-level supersession, not a new GB300 end-to-end validation of current
main. The original tests and the guard's final PR head are different revisions. If the issue recurs, verify the actual worker environment, commit, graph settings, and the original correctness reproducer. #45367 is closed as completed for the upstream-policy resolution.The persistent-buffer alternative #45824 was closed unmerged after high-load correctness failures; its historical apparent speedup claims remain withdrawn.
See the closure comment and the archived experiments below.
Archived investigation, experimental cohorts and prior status updates (original PR body)
Archive notice: Historical text below preserves the original evidence and evolving analysis. Any older recommendation to merge, hold for review, or claim a speedup is superseded by the final status above.
Final status — closed without merging; superseded for the reported configuration (2026-11-07)
Closing this PR without merging. The broader upstream guard in #43216, merged on 2026-10-22 (
786cdfc0), already covers the core default-policy behavior proposed here for the reported multi-rank, CUDA-Graph-enabled DCPa2adeployment. An additional DCP-specific default guard would be redundant in that configuration.Source-level coverage confirmed on current
mainhandle_data_parallelism()calls_disable_nccl_graph_buffer_registration()when_graph_may_capture_collectives()detects more than one TP/EP/DP rank and an enabled CUDA Graph phase.a2a/ decode CUDA Graph setup satisfies those conditions, so absent an explicit override it defaults toNCCL_GRAPH_REGISTER=0.handle_data_parallelism(); the behavior is covered by the upstream argument-resolution tests.NCCL_GRAPH_REGISTER=1(with a warning). The conditions are not identical in eager-only/no-CUDA-Graph cases; this closure concerns the original graph-enabled failure configuration, not exact equivalence for every possible backend configuration.Evidence and outstanding verification
The earlier GB300 controlled experiments remain valid for the versions/configurations recorded below: the original 12-prompt probe showed 12/12 degenerate outputs with graph registration enabled and 0/12 when disabled, while the guarded C128 stress run completed 640/640 requests. No new same-environment, end-to-end Kimi-K3 regression run against current
main/ #43216 has been performed here, so this is a source-level supersession, not a claim that #45367 is universally resolved or that NCCL's low-level root cause has been proven.The alternative persistent-buffer PR #45824 was separately closed without merging following high-load output corruption; its historical apparent speedups were withdrawn as valid performance claims.
Follow-up, if the original deployment is available: confirm the effective scheduler-worker
NCCL_GRAPH_REGISTERvalue and repeat the original 12-prompt correctness probe and C128 stress reproduction on currentmain. Continue any remaining runtime investigation in #45367 (which this closure does not close).The following sections are archived investigation and validation notes, not a current recommendation to merge this PR.
Motivation
Evidence correction, 2026-10-25 (documentation only; no new experiments): performance cohorts and validation revisions are separated below. Earlier allocator-overlap negative evidence is withdrawn. The observations do not establish a general speedup, a universal registration-disable penalty, or an allocation-removal mechanism.
On a two-node GB300 MNNVL deployment (4 GPUs/node, TP8/DCP8) serving Kimi-K3, DCP
a2acan produce corrupted decode output with CUDA graphs enabled. In a 12-prompt real-prefill/decode smoke probe, the original setup produced 12/12 degenerate outputs; restarting withNCCL_GRAPH_REGISTER=0reduced this to 0/12.At the time of the initial investigation, SGLang applied
_disable_nccl_graph_buffer_registration()to the TP LM-head all-to-all path; the original proposal added a DCPa2a-specific trigger. The subsequently merged #43216 provides a broader, graph-aware guard on currentmain.The controlled correctness experiments support an interaction between NCCL graph registration and temporary DCP
a2aexchange-buffer lifetime in this deployment; the exact low-level mechanism remains unproven. This PR keeps the minimal observed-safe startup policy: disable graph buffer registration by default for resolved DCPa2a.Originally proposed to fix #45367. Closed unmerged as superseded for the reported graph-enabled deployment by #43216; #45367 remains open pending runtime verification.
Modifications
_disable_nccl_graph_buffer_registration()when the resolved backend isa2a.a2abackends, and invalida2aconfiguration.The existing helper uses
setdefault, so explicitNCCL_GRAPH_REGISTER=0/1settings are preserved. This PR does not changeNCCL_GRAPH_MIXING_SUPPORTor the DCP collective implementation.Accuracy Tests
Two-node GB300, Kimi-K3, TP8/DCP8, real prefill + decode:
a2a, original environmenta2a, manualNCCL_GRAPH_REGISTER=0a2a, startup guard applied on both nodesfi_a2acontrolThe guarded run also returned
391for17 * 23.The guard block itself was re-validated end-to-end on the reported two-node GB300 pair: the 12-prompt
a2aprobe again produced 0/12 degenerate outputs, including17 * 23 -> 391. The branch was subsequently synced with currentmain; that merge did not change the guard diff, but the full merge-updated head was not separately re-run on the GB300 pair.A smaller 8-rank
dcp_a2a_lse_reduceharness did not reproduce the model-level corruption with registration left at its default setting. The full reduction details remain in #45367.At concurrency 128, the same guarded policy also completed 640/640 requests on the configuration that had previously failed with
CUDA illegal memory access(MF=0.94,max-running-requests=112, decode CUDA graphs up to bs=112, 60K input / 1K output). No illegal-memory-access error, scheduler exception, hang, or repeated-!garbage pattern was observed; output throughput was 1932.8 tok/s with mean TPOT 32.94 ms (P99 33.43 ms). This is one completed stability run, not a long-duration production guarantee or a correctness score for all 640 answers. Its MRR112 / graphs112 configuration is separate from the newer MRR384 performance cohorts.Controlled registration × buffer-lifetime correctness probe
Each cell counts corrupted outputs / 12 prompts, not an accuracy score.
NCCL_GRAPH_REGISTER=1NCCL_GRAPH_REGISTER=0Within this tested deployment and probe, only the registration-enabled / temporary-buffer cell produced the reported degeneration. This supports an interaction between registration and temporary exchange-buffer lifetime. It does not directly demonstrate address reuse, clobbering, or a particular NCCL/CUDA internal mechanism.
Further controls on the failing cell still produced 12/12 corrupted outputs with
NCCL_CUMEM_ENABLE=0, withexpandable_segmentsdisabled, withNCCL_NVLS_ENABLE=0, and withNCCL_P2P_DISABLE=1. These are scoped non-rescues in this reproduction, not a general exclusion of allocator or transport mechanisms.Allocator-overlap inference withdrawn: the probe used the uppercase
ACTIVE_ALLOCATEDfilter, whereas the PyTorch snapshot schema usesactive_allocated; successful sampling and exception reporting were not adequately validated. The recorded buffer addresses do not validate snapshot health. The probe provides no negative evidence about persistent address reuse. The exact low-level replay-time mechanism remains unproven.The persistent-buffer alternative #45824 was closed without merging following the reported R3 high-load generation failure; earlier small-probe passes did not establish a safe guard replacement. The original merge recommendation for this minimal startup guard is superseded by the closure note above.
Latest cohort-separated performance and follow-up status: 2026-10-24 update. The newer measurements are local deployment results, not a new full-head GB300 validation.
2026-10-26 follow-up on the persistent-buffer alternative
The #45824 evidence update now records a completed, limited non-PD TP8 / attention-DP2 / DCP4 serving smoke with local persistent a2a and the guard reported absent. Requested-ISL1024/OSL32 load bursts switched client concurrency 4→16→4. Separate short chat probes before (C1) and after (C8) each matched 10/10 extracted final-answer values; the reported final
contentstrings were identical for 10/10 prompts, with allfinish_reason=stop. This does not validate TP8/DCP8 accuracy, higher-load correctness, every graph bucket, or race-free replay.The newly supplied 53-line production patch, SHA-256
129ccb8f57d3aec4405a1c524fa7fa3b58c54761bae01951ae76268ea1aaecef, matches #458249cb1de5's twocomm.pyhunks after ignoring diff metadata/line offsets. This does not establish full deployed-version identity, historical performance provenance, or a clean full-head run.The higher-input AR-fusion boundary remains tracked in #46447: requested ISL4096/client C8 reproduced
rows > max_rowswith both local persistent a2a and fi; the reason token rows exceed capacity remains unresolved. Two separate persistent-a2a C128/MRR112 fake-PD runs previously completed 640/640 requests each. These follow-ups add no new guard test, end-to-end validation of #45371 head94a2b93, or throughput claim for this guard. Memory/configuration validation and repository CI remain open; the PRs remain alternatives.Speed Tests and Profiling
Fixed-output-length deployment reruns
Two GB300 nodes, 4 GPUs/node; Kimi-K3, TP8/DCP8; v0.5.22-based deployment
baa9bef; decode-only fake-PD; requested ISL=64000 / OSL=1000; MF=0.94, MRR=384, decode CUDA graphs up to bs384; overlap enabled.fi_a2aoutput tok/sa2aoutput tok/sThe fixed-output guarded-a2a observations are close to fi (-0.14% at C256, +0.46% at C384). This backend comparison does not isolate the cost of registration disablement in an otherwise identical
a2aimplementation and does not establish a universal speedup or penalty.Earlier variable-output sweep — separate cohort
fi_a2aoutput tok/sa2aoutput tok/sThese exploratory points must not be combined with the fixed-output C256/C384 reruns into one comparable C64–C384 curve.
Each throughput cell is a single measurement from a separate service startup with matched benchmark settings; repeated-run variability has not been quantified. The fixed-output rerun summary reports matching aggregate counts of 124,103,833 input / 1,966,247 output tokens across arms. That record applies only to the fixed-output rerun set, not the whole C64–C384 sweep; per-point token records still need reconciliation. Equal token totals do not establish output correctness. Requested OSL=1000 alone does not make the earlier variable-output sweep comparable to the fixed-output reruns. Do not connect the cohorts into one curve, average their deltas, or infer a shared scaling trend.
These decode-only deployment measurements apply the guard locally; they are not a new end-to-end GPU validation of merge-updated head
94a2b93. The real-prefill/decode correctness probe is separate. Persistent-buffer configuration measurements belong to #45824, not a performance claim for this guard.Earlier registration anchor and TP-path comparison — independent records
The separate same-settings
fi_a2aanchor measured 1643.7 tok/s with the original registration environment versus 1641.3 tok/s with registration disabled (-0.15%). The observed values were close; this single pair does not quantify noise or bound the cost for other paths.An earlier C64 TP-path experiment reported:
fi_a2aa2aThe observed larger throughput changes in that matrix accompanied TP-path changes. The table neither isolates registration-disable overhead nor belongs to the newer MRR384 sweep. The original apparent large
a2aspeedup from a run producing corrupted output is excluded from valid performance evidence.Alternative fix and profiling scope
The additional C256 persistent-buffer-plus-guard capture had approximately the same summed kernel time (~62.2 ms per normalized iteration/GPU) and BMM medians as guarded a2a, while the local persistent/no-guard capture had lower timings (~39.8 ms). These historical captures do not establish a safe persistent-buffer alternative: the R3 failure now blocks that interpretation. They establish neither valid acceleration nor a universal guard penalty. This is not a complete 2×2 performance ablation: the comparable no-persistence/no-guard capture is missing, effective per-worker registration settings are not established by source markers alone, and device-side expert workload/runtime-state differences remain unexcluded. About 98% of the earlier difference in summed kernel duration was classified as MoE BMM, not DCP exchange; summed durations are not additive wall-clock latency, critical-path cost, or GPU utilization. The extra arm adds profiling only, not another end-to-end throughput or accuracy result.
Plan A / #45371 is the preferred candidate for #45367; #45824 remains on hold for correctness investigation. They should not merge as-is together. Final-version validation, repository CI, and maintainer review remain outstanding.
Unit Tests
The functional guard/test head (
f8491f7) passed the repository lint/pre-commit workflow. The branch has since been synced withmain(current head94a2b93); the PR diff remains limited to the guard and its focused unit tests. Full registered-test CI still requires the repositoryrun-cigate.Checklist
CI States
Latest PR Test (Base): ❌ Run #39782182555
Latest PR Test (Extra): ❌ Run #39782182571
Latest PR Test (AMD ROCm 10): ❌ Run #39782182265