Repository navigation
feat(backend): add native Ascend 950DT support - #19
Conversation
|
Thanks for the thorough work. The device abstraction in 1. Please validate the CUDA path as far as you canSeveral changes alter CUDA behavior, not only NPU: the pytest tests/unit/
torchrun --nproc_per_node=4 tests/distributed/test_hsdp_correctness.py
torchrun --nproc_per_node=4 tests/distributed/test_hsdp_async_correctness.py
torchrun --nproc_per_node=4 tests/distributed/test_grad_accum.py
torchrun --nproc_per_node=4 tests/distributed/test_muon_step.py
torchrun --nproc_per_node=4 tests/distributed/test_checkpoint.py
torchrun --nproc_per_node=4 tests/distributed/test_ddp_correctness.pyIf you have no GPU access at all, let us know which ones you couldn't run. 2. Please remove
|
b32c1ca to
8105157
Compare
|
Thanks for the careful review. I have rebased onto main with #20 included, preserved the original 13 commits in order, and added separate follow-up commits for your requests. The current PR head is 18e06bd, including the three test corrections found during hardware validation. All hardware results below were rerun on this exact head on 14 October 2026; the two full log attachments include commands, versions, timestamps and exit codes.
The initial extra continuous-trajectory comparison was too strong: different accumulation orders produced tiny gradient differences that FP16 normalization and NS amplified. The test correction checks the actual gradients before any replacement and retains failures in the final rank-wide result, then separately tests three continuing optimizer updates with identical gradient inputs. Those model/state comparisons passed byte-exactly on both backends. This establishes the gradient contract and controlled optimizer-state behavior, not equality of the two natural training trajectories. Full validation attachments (all tests at
Native coverage:
Both files contain complete command stdout/stderr, attempt history, versions, timestamps and exits. Only internal machine/user/path identities were substituted; numeric test results, warnings and errors were retained. Embedded raw-log hashes precede those substitutions; public-file hashes are in the accompanying manifest. Modified-file lint/format checks and the strict English/Chinese documentation build passed. Thank you again for identifying these issues. |
StarrickLiu
left a comment
There was a problem hiding this comment.
Thanks for addressing every point so thoroughly. Re-verified at 18e06bd:
- CPU unit suite: 349 passed / 55 skipped;
ruff check dmuon examplesclean. - 4× H100 (SM90, torch 2.10 + cu128): GPU unit suite 382 passed / 38 skipped (all environmental: quack not installed, fast-clip extension not built, no torch_npu). All requested distributed entrypoints pass (
test_hsdp_correctness,test_hsdp_async_correctness,test_grad_accum,test_muon_step,test_checkpoint,test_ddp_correctness), plustest_hsdp_replicate_gate_accum(worst rel consumed-grad diff 1.3e-6) andtest_gradient_storage_ownership(shard and HSDP). - The #20 integration in 59d5b06 and the ownership transfer in 8105157 look correct.
SM90 + Quack remains unverified on both sides; Ascend results are from your logs. Approving.
Related to #18.
DMuon currently assumes CUDA for device operations and optional kernels. This PR adds native Ascend 950DT execution through torch_npu and HCCL while retaining the existing public interfaces and shared optimizer implementation.
Validation: