Archived
The eight-rank two-shot reaches 56% of its link time at 16 MiB (1316 to 1340 us against 763), and measured(K) = f x link time(K) + h x (K + 1) fits f of about 1.45 and h of about 20 us a step: both the transfers and the step boundaries lose time. Two schedules of the same work go after them, each a new form beside the existing one, chosen by RADIANCE_AR8_FORM (unset or lockstep: as before) or per launch by the `form` parameter: - ring: the first hop goes to the peers in ring order from rank + 1 instead of ascending. In the lockstep order every card but rank 0 starts by writing rank 0's shard, then rank 1's, so the seven senders can converge on one receiver while the other links idle; in ring order each card receives from one peer at a time. - split: ring, and the one handshake a step, which waits until every peer has finished the whole step (next piece's first hop, this piece's reduce, the previous piece's assemble), becomes a flag after each half, awaited only before its data is read: before reducing piece j the peers' first hop of j, before assembling j their reduce of j. A card whose half is done goes on with the next piece's first hop while a slower card still reduces, so each link runs at its own pace instead of the slowest card's per step. The flags stay one monotone word per (block, source): the first hop of piece 0 at v0, of piece j + 1 at v0 + 2j + 1, the reduce of piece j at v0 + 2j + 2; the launch reserves pieces + 1 steps for its 2 pieces + 1 values, so it mixes with every other kernel on the instance. A launch still ends only after every peer has published its last reduce inside it, so the slot parity argument holds unchanged. r4d_ar_publish and r4d_ar_await (r4d_ar_wide.h) are the two halves of r4d_ar_handshake. Neither changes which rank folds a word or in what order, so all forms give the bits of the lockstep form, which compiles to the code it was. Ring and split are eight-rank only; the three- and four-rank launches stay lockstep and refuse another form. Every rank must read the same form; init compares it with the other eight-rank settings. --perfar8 numel iters dtype forms (comma-separated) times the forms side by side; the timeline prints a pair a synchronisation (K + 1 handshakes, or 2K awaits split, up to 8 pieces). r4d_selftest's weighted eight-rank runs repeat for ring and split at 1, 4 and 8 pieces over even, uneven, single-owner and zero-weight tables and with the piece count changing launch to launch, and the box's own weights run auto, duplex and off. On one card (R4D_SELFTEST_ONE_CARD) all three forms give the fold on every rank at 65536 to 8388608 elements, even and weighted, bf16 and fp32. Which form is fastest on the board is for the TP8 window to measure. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>