Commit 73accfa
committed
test(v7-b11..18): distributed-semantics parity suite (8 tests)
Closes the 8-item B-block 'simulation without real multi-process'
audit:
B11 test_fake_ranks_bit_identical.py — fake_ranks=4 mean-reduced
grads match single-rank grads at atol=1e-6 (the H20 replay path
must be bit-equivalent on identical input).
B12 test_tp_proxy_loss_parity.py — column_split_forward and
row_split_forward parity vs unsharded matmul for tp∈{1,2,4,8}
plus a 2-brick chain (ColumnParallel→RowParallel composition).
B13 test_pp_proxy_loss_parity.py — pipeline_forward matches
sequential composition for num_microbatches∈{1,2,4,8}; the new
pipeline_forward_real with 1f1b schedule matches the legacy
pipeline_forward on world_size==1.
B14 test_collective_proxy_sum_scatter.py — reduce_scatter(arr,4)
mean-reduces 4 N-element chunks to a single chunk equal to
arr.mean(axis=0) on the reshaped (4,N) view; all_gather+
reduce_scatter round-trips to shard for world∈{1,2,4,8};
misaligned shape raises ValueError.
B15 bench_allreduce_distributed.py --simulated — forces single-
process path, writes reports/allreduce_simulated_<date>.csv
with a warm_ms column; test_pf0g_csv_shape.py asserts the 10
required columns + warm_ms > 0.
B16 test_distributed_world1_fallback.py — distributed.init(
force_single=True) returns world=1 / rank=0 / real=False;
stage_train survives compile_mode='regional' + fake_ranks=1 +
m3_ultra_solo with extras.distributed.real=False.
B17 test_parallelism_gotcha_matrix.py — pytest.parametrize 3
topology-agnostic gotchas (fsdp2_whole_compile,
megatron_tp_whole_compile, fp8_grad_duplication) × 4 topology
factories (h100_8x, gb10_quarter, m3_ultra_solo, tpu_v6e_8) =
12 cells. Each cell asserts the gotcha fires on the matched
spec; topologies without the required mesh axis (e.g.
gb10_quarter has no tp axis) skip gracefully via
_topology_supports_kinds(). Plus a clean-spec test that the
three headline gotchas stay silent, plus a size-floor of 15
on the GOTCHAS table.
B18 test_runtime_simulation_allsum_accuracy.py — world_size=1 is
identity; simulated mode is zero-copy; manual mean reduce
over 4 distinct fp32 arrays equals (a+b+c+d)/4 bit-exact
regardless of summation order.
Bench update: scripts/bench_allreduce_distributed.py grew the
--simulated CLI flag (force single-process), the warm_ms column,
and the allreduce_simulated_<date>.csv filename pattern.
26 passed, 5 gracefully skipped (topology without the requested
mesh axis); no failures.1 parent 4ca0618 commit 73accfa
9 files changed
Lines changed: 604 additions & 3 deletions
File tree
- scripts
- tests/v4
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
49 | 56 | | |
50 | 57 | | |
51 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
52 | 65 | | |
53 | 66 | | |
54 | 67 | | |
| 68 | + | |
| 69 | + | |
55 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
56 | 76 | | |
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
60 | 80 | | |
61 | 81 | | |
62 | 82 | | |
63 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
64 | 87 | | |
65 | 88 | | |
66 | | - | |
| 89 | + | |
67 | 90 | | |
68 | 91 | | |
69 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments