feat(issue4): add real NCCL bitwise reproducibility diagnostics - #24
Open
liu66-qing wants to merge 5 commits into
Open
feat(issue4): add real NCCL bitwise reproducibility diagnostics#24liu66-qing wants to merge 5 commits into
liu66-qing wants to merge 5 commits into
Conversation
liu66-qing
marked this pull request as ready for review
July 23, 2026 15:36
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
Adds a reproducible diagnostic workflow for the 2026 Issue 4 acceptance
criteria. The tool runs the same collective in independent
torchrunprocess groups, captures every rank/call as raw bytes, and localizes the
first run-to-run divergence.
Why this approach
A NumPy reduction-order simulation cannot establish NCCL reproducibility
because it does not exercise NCCL algorithm selection, topology discovery,
CUDA kernels, or communicator initialization. Repeating an operation inside
one communicator also cannot establish run-to-run behavior.
This implementation therefore:
error, and signed IEEE ULP distance;
combinations.
Files
worker.py: one real distributed NCCL capturediagnose.py: independent-run orchestration and report generationsweep.py: unifiedNCCL_ALGO × NCCL_PROTOexperiment matrixcore.py: hardware-independent comparison/report enginetest_core.py: CPU unit tests for equality, first-offset localization,positive/negative ULP distance, and first-call localization
README.md: experiment protocol and three-dimensional analysis guidanceCorrectness and safety
The documentation intentionally avoids undocumented controls such as
NCCL_DETERMINISTICand does not label Ring/Tree/PAT/NVLS deterministic byassumption. NVIDIA documents
NCCL_ALGOandNCCL_PROTOas selection/debugcontrols and warns that forcing unsupported LL128 may corrupt data, so
unsupported configurations are surfaced as failures.
Raw captures are deleted after report creation by default to bound retained
storage. The README documents capture scaling and requires changing one
experimental factor at a time.
Validation
Completed locally and on a real four-GPU NCCL host.
Measured environment:
All valid same-configuration runs were bitwise identical. Tree Reduce-Scatter
was rejected with
ncclInvalidUsageand was not silently replaced. Acontrolled Ring-to-Tree change produced a first difference at call 0, rank 0,
float32 element 6, with maximum absolute error
9.5367431640625e-07.Full methodology, bounded conclusions, topology, hashes, and machine-readable
evidence are in
EXPERIMENT.mdandresults/autodl-4x3090.json.Closes #4