Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
0660f81
ccl: hierarchical cross-node AllGather (intra-node SDMA + inter-node …
inkcherry Jun 30, 2026
5909a30
ccl: auto-detect ranks_per_node; keep flat AllgatherSdma-compatible s…
inkcherry Jul 1, 2026
05deca8
Merge ROCm/mori main into sdma-hier-allgather
inkcherry Jul 1, 2026
5c2fd42
ccl: add traditional list-based all_gather to HierAllGather
inkcherry Jul 1, 2026
7fb4db3
docs/bench: use English wording (drop non-ASCII in README and gemm-ov…
inkcherry Jul 1, 2026
e14abec
bench: annotate result charts as cross-node (2 nodes x 4 GPU, intra-S…
inkcherry Jul 1, 2026
4188668
examples/fsdp_sdma: transparent FSDP2 all-gather over MORI (intra SDM…
inkcherry Jul 3, 2026
1e4bfad
ccl: param-contiguous zero-copy for HierAllGather (kill FSDP copy-out…
inkcherry Jul 3, 2026
b3e4475
ccl: fuse HierAllGather param-contiguous scatter into ONE launch (kil…
inkcherry Jul 3, 2026
d802d9e
ccl: overlap HierAllGather param-contiguous local-block scatter with …
inkcherry Jul 3, 2026
0d8f548
ccl: gate HierAllGather param-contiguous overlap OFF by default (HSA …
inkcherry Jul 3, 2026
e5809af
ccl: standalone bit-exact test for intra param-contiguous (HSDP winni…
inkcherry Jul 3, 2026
daa789e
ccl: system-scope fences in fused subgroup param-contiguous scatter +…
inkcherry Jul 3, 2026
a380c7a
ccl: drop ineffective threadfence_system from fused subgroup param-co…
inkcherry Jul 3, 2026
06d6a8a
ccl: gated measurement to skip inter-ring entry barrier — proves the …
inkcherry Jul 3, 2026
2a133f8
ccl: kill per-AG-call D2H syncs in param-contiguous zero-copy path (.…
inkcherry Jul 3, 2026
b5f4add
ccl: MORI_HIER_NO_ALL_BARRIER measurement switch (strip entry+finish+…
inkcherry Jul 3, 2026
2ad6498
ccl: FIX the 17-turn num_blocks=1 param-contiguous scatter 'bug' — it…
inkcherry Jul 3, 2026
0f1c22a
ccl: fix overlap zero-copy spin-deadlock — serialize side/main param-…
inkcherry Jul 3, 2026
6c26ebf
ccl: fix overlap zero-copy loss-drift race — record_stream input/outp…
inkcherry Jul 3, 2026
5c89a6c
ccl: MORI_HIER_REG_STATS diagnostic — count output-ptr registration c…
inkcherry Jul 3, 2026
401b075
ccl: MORI_HIER_DEBUG_SYNC isolation switch proves the FSDP copy-out l…
inkcherry Jul 3, 2026
949bb36
ccl: fix FSDP copy-out loss-nondeterminism — SDMA gather receiver spi…
inkcherry Jul 3, 2026
db71740
ccl: CU-domain Phase-B copy-OUT (transit out_ accessor + single torch…
inkcherry Jul 3, 2026
3a137e5
ccl: cross-stream overlap-determinism UT for HierAllGather param-cont…
inkcherry Jul 4, 2026
6ff8f8e
ccl: extend overlap-determinism UT to the COPY-OUT __call__ path (the…
inkcherry Jul 4, 2026
3a39c17
ccl: fix overlap-determinism UT false-NaN — use a FRESH handle per op…
inkcherry Jul 4, 2026
a9d3c65
test(hier-ag): add Qwen-band large-split profile + independent all_ga…
inkcherry Jul 4, 2026
e29365b
ccl(hier-ring): system-scope acquire + threadfence on inter-node ring…
inkcherry Jul 4, 2026
0d707c6
ccl(hier): default MORI_HIER_FUSE_LOCAL OFF — fused ring||local-gathe…
inkcherry Jul 4, 2026
bdfb4c8
ccl(hier-ring): transport-aware quiet on the default single-warp ring…
inkcherry Jul 4, 2026
16d172d
ccl(hier-ring): CU-domain ring finish copy-OUT (coherent reader) — re…
inkcherry Jul 4, 2026
86e2014
ccl(hier): env-gated Phase-B entry barrier (MORI_HIER_PHASEB_ENTRY_BA…
inkcherry Jul 4, 2026
1bcc08f
ccl(hier-ring): env-gated put-with-signal ring send (MORI_HIER_RING_P…
inkcherry Jul 4, 2026
dcb7de0
ccl(hier-ring): port put-with-signal to the multi-QP FANOUT path (MOR…
inkcherry Jul 4, 2026
aeba23e
core(rdma-ionic): add WRITE_WITH_IMM send device primitive (PostWrite…
inkcherry Jul 4, 2026
1fd6178
core(rdma-ionic): add WRITE_WITH_IMM receiver CQ-poll primitive (Poll…
inkcherry Jul 4, 2026
8bfc9b3
core(rdma-ionic): optional dedicated recv CQ for WRITE_WITH_IMM (conf…
inkcherry Jul 4, 2026
60b8529
ccl(hier): crown fill + chunk-pipelined DEEP_PIPE + host-proxy inter …
inkcherry Jul 8, 2026
97dc115
ccl(hier): DEEP_PIPE=16 -> all-size UT parity (>=1.0x) + reassembly S…
inkcherry Jul 9, 2026
3e1448e
Merge ROCm/mori main and finalize hierarchical AllGather
inkcherry Jul 13, 2026
ac56e73
docs(hier-allgather): refresh results to the current bit-exact benchm…
inkcherry Jul 13, 2026
ebdde48
docs(hier-allgather): full size-sweep w8/w16 UT + GEMM-overlap + E2E
inkcherry Jul 13, 2026
3426d38
Add one-key UT/E2E run scripts (incl. GEMM-overlap UT) + w16 E2E host…
inkcherry Jul 13, 2026
baf5c60
examples(fsdp): w16 E2E uses deferred landing fence (no inline host-d…
inkcherry Jul 13, 2026
cb0b848
examples(fsdp): consolidate bench into bench_scripts/bench_results + …
inkcherry Jul 13, 2026
7fa429c
examples(fsdp): save raw w16 bench logs (force-add past *.log gitignore)
inkcherry Jul 13, 2026
e01c144
examples(fsdp): slim bench to ut / ut-overlap / e2e (script + log + f…
inkcherry Jul 13, 2026
a9fd33e
overlap-UT: route through standalone_fast crown path (env MORI_HIER_U…
inkcherry Jul 13, 2026
c0b5e80
overlap-UT: persistent buffer pool for the crown route (unblock MORI_…
inkcherry Jul 13, 2026
8b1229d
inter-node AG: env-gated CU-yield backoff in RDMA landing spins (defa…
inkcherry Jul 13, 2026
b48e085
inter-node AG: enable CU-yield backoff N=2 for overlap measurement
inkcherry Jul 13, 2026
bc3f598
inter-node AG: gate CU-yield backoff OFF (kHierInterPollSleep=0) for …
inkcherry Jul 13, 2026
2fa62a4
host-proxy: env-gated ASYNC _post/_complete counter diagnostic (defau…
inkcherry Jul 13, 2026
f68f44c
host-proxy: double-buffered recv staging for ASYNC (MORI_HOSTPROXY_AS…
inkcherry Jul 13, 2026
57961de
host-proxy: ASYNC host-drain discriminator (MORI_HOSTPROXY_ASYNC_DRAI…
inkcherry Jul 13, 2026
8014a76
host-proxy: ASYNC auto-enables DRAIN+RING (bit-exact 269 TFLOPS, 1.07…
inkcherry Jul 13, 2026
757b005
examples(fsdp): w16 E2E run script defaults to host-proxy ASYNC (bit-…
inkcherry Jul 14, 2026
a042a76
examples(fsdp): add MI355X + AINIC (ionic) w16 E2E results + reproduc…
inkcherry Jul 14, 2026
89c331d
examples(fsdp): add host-proxy ASYNC w16 E2E loss+tflops curves (MI30…
inkcherry Jul 14, 2026
c375abe
examples(fsdp): run_e2e mode-selects env (mori=host-proxy / mori-ibgd…
inkcherry Jul 14, 2026
0ae5025
examples(fsdp): remove unused legacy mori_hier_allgather.py
inkcherry Jul 14, 2026
9f4025e
fix(hier-allgather): correct sub-group SDMA drain index (fixes host-p…
inkcherry Jul 14, 2026
c4eb8ae
perf(hier-allgather): realize the intra-SDMA CU-freedom dividend (hp_…
inkcherry Jul 15, 2026
9127d39
docs(hier-allgather): w16 E2E loss+tflops figures (RCCL / hp_sdma / h…
inkcherry Jul 15, 2026
7ffc420
docs(hier-allgather): consolidate w16 results — keep only combined fi…
inkcherry Jul 15, 2026
ab953b9
bench(e2e): run_e2e.sh selects the 4 named configs (RCCL / hp_sdma / …
inkcherry Jul 15, 2026
a7143cd
examples(fsdp): refresh MI355X+AINIC w16 E2E figures + raw logs
inkcherry Jul 15, 2026
9930165
bench(e2e): PLATFORM choice for run_e2e.sh (mi300x_mlx5 | mi355x_ainic)
inkcherry Jul 15, 2026
22c6706
test(ccl): cross-node overlap UT — GEMM runs faster under hp_sdma tha…
inkcherry Jul 15, 2026
c444469
bench: remove the superseded GEMM-overlap UT (ut_overlap_w16) in favo…
inkcherry Jul 15, 2026
8de01ea
ccl: skip RDMA MR registration for the SDMA-only intra transit
inkcherry Jul 15, 2026
90ce927
examples(fsdp): mi355x_ainic w16 E2E figures/logs -> hp_sdma
inkcherry Jul 15, 2026
a4e65eb
bench(ccl): cross-node AllGather UT with perf / E2E-stable switch pre…
inkcherry Jul 15, 2026
db6e008
bench(ccl): refine ag-perf E2E-stable chart (drop ratio labels, full-…
inkcherry Jul 15, 2026
cefc8d4
bench(fsdp): remove the old ut_w16.png UT chart
inkcherry Jul 15, 2026
f932507
examples(fsdp): gc.freeze after warmup removes the FSDP GC tail-spike
inkcherry Jul 15, 2026
12d5f2c
bench(ccl): drop per-point value labels on ag-perf chart (points only)
inkcherry Jul 15, 2026
856543b
bench(ccl): add run_ut_overlap.sh launcher for the cross-node overlap UT
inkcherry Jul 15, 2026
18ef908
docs(hier-allgather): clean up README + add UT/overlap/E2E reproduce …
inkcherry Jul 15, 2026
da593f9
examples(fsdp): add mi355x_ainic UT + E2E-stable AG-perf + overlap UT
inkcherry Jul 15, 2026
9acf8fa
chore(fsdp): relocate bench artifacts + move feature README out of re…
inkcherry Jul 15, 2026
4e4be8a
style(ccl): satisfy pre-commit on the ag-perf UT scripts
inkcherry Jul 17, 2026
d5f08e6
refactor(fsdp): move UT launchers + plotter out of the tests tree
inkcherry Jul 17, 2026
5391b5e
refactor(ccl): drop two dead files from the test tree
inkcherry Jul 17, 2026
c6fb756
refactor(fsdp): results layout — figures at top, logs+csv+plotters un…
inkcherry Jul 17, 2026
ae1a4bc
chore: neutralize the core.* .gitignore comment
inkcherry Jul 17, 2026
68648c5
fix(memory): free peerRkeys2 host+GPU in DeregisterSymmMemObj
inkcherry Jul 17, 2026
1c9cbe5
fix(sdma): drop [SDMAENG] fputs, dead commented std::cout, REFUTATION…
inkcherry Jul 17, 2026
5af70c7
fix(mlx5): remove [DIAG_QP_MTU] std::cout, trim ECMP investigation co…
inkcherry Jul 17, 2026
7dc5868
fix(allgather): remove in-kernel debug printf on data path
inkcherry Jul 17, 2026
bdca7e8
fix(pybind): correct stale 'inert until wired' comments, drop PHASE-4…
inkcherry Jul 17, 2026
9de617a
docs(sdma): replace debugging-journal comments with contract comments
inkcherry Jul 17, 2026
1c398a8
docs(allgather): strip Txx/PHASE-N tags from kernel comments
inkcherry Jul 17, 2026
7af9a88
fix(ccl): ruff+black on hier_allgather.py — drop unused G, rename O->off
inkcherry Jul 17, 2026
182aa59
chore(ccl): delete dead fsdp_prefetch.py — zero imports, bench.py dup…
inkcherry Jul 17, 2026
743d48b
chore(ccl): delete dead drain_deferred method — zero callers in repo
inkcherry Jul 17, 2026
d0a389a
fix(ccl): remove default-OFF WRITE_IMM known-bug branch + os.environ …
inkcherry Jul 17, 2026
85a5c0c
docs(ccl): rewrite docstrings for shipped multi-node path; drop DESIG…
inkcherry Jul 17, 2026
2cf8432
docs(ccl): strip stale narration from comments/docstrings; add missin…
inkcherry Jul 17, 2026
32152fb
docs(ccl): strip stale narration from hier_allgather.py comments — ba…
inkcherry Jul 17, 2026
4b8234f
docs(ccl): strip stale narration from hier_allgather.py comments — ba…
inkcherry Jul 17, 2026
aff0aad
docs(ccl): strip stale narration from hier_allgather.py comments — ba…
inkcherry Jul 17, 2026
a488787
docs(ccl): strip stale narration from hier_allgather.py comments — ba…
inkcherry Jul 17, 2026
479ace9
docs(ccl): sanitize leaked cluster hostnames + strip stale markers
inkcherry Jul 17, 2026
4af5dbf
docs(ccl): add missing MIT header to hostproxy_inter.py + strip stale…
inkcherry Jul 17, 2026
e5f7b50
refactor(ccl): consolidate __init__ __all__ + hoist host_proxy_ag import
inkcherry Jul 17, 2026
1aa419c
fix(examples): ruff E741/E402 in mori_allgather.py
inkcherry Jul 17, 2026
12be71e
fix(examples): remove dead code + leaked path from bench.py
inkcherry Jul 17, 2026
798cec2
chore(examples): delete orphaned run_ut.sh launcher
inkcherry Jul 17, 2026
c452fd9
chore(examples): sanitize internal paths/hosts from bench logs, scrip…
inkcherry Jul 17, 2026
61f3601
docs(examples): fix figure-regeneration claim + link mi355x results
inkcherry Jul 17, 2026
f2ffe69
docs(examples): strip stale narration from mori_allgather.py
inkcherry Jul 17, 2026
b30b90d
docs(examples): document the torch FSDP overlay requirement in bench.py
inkcherry Jul 17, 2026
51e7535
fix(tests): remove unused first_bad var
inkcherry Jul 17, 2026
9fb9579
fix(tests): bind h_def/h_oip as closure params to satisfy ruff F821
inkcherry Jul 17, 2026
2ad6f22
fix(tests): split semicolon statements + bind h closure param, ruff g…
inkcherry Jul 17, 2026
f9d8168
test(ccl): add pytest entrypoint to GPU-free CPU spec test + repair g…
inkcherry Jul 17, 2026
d973522
test(ccl): add pytest.mark.skipif for <2 GPUs so CI skips not errors
inkcherry Jul 17, 2026
f60460f
test(ccl): add pytest entrypoints + torchrun skipif to cross-node har…
inkcherry Jul 17, 2026
233c0a9
docs(ccl): document determinism test's scalar gate + where bit-exact …
inkcherry Jul 17, 2026
c84775e
test(ccl): add pytest entrypoint + torchrun skipif to overlap_w16 bench
inkcherry Jul 17, 2026
0879968
style: apply the repo's pinned clang-format/black to the remaining PR…
inkcherry Jul 17, 2026
c47f4fa
refactor(ccl): decompose HierAllGather.__init__ god-object into helpers
inkcherry Jul 20, 2026
32180ba
refactor(ccl): prune dead/diagnostic C++ env-flag sprawl
inkcherry Jul 20, 2026
501b9e5
fix(sdma): add missing #include <mutex> in anvil.cpp
inkcherry Jul 20, 2026
b2c21b7
fix(sdma): pass cacheHint through multi-descriptor SdmaPutThread
inkcherry Jul 20, 2026
45e84d4
fix(mlx5): honor RdmaEndpointConfig.dedicatedRecvCq for recv-CQ
inkcherry Jul 20, 2026
5dd0a02
fix(shmem): fail-closed guards for hier-barrier fixed slot layout
inkcherry Jul 20, 2026
47d012e
fix(ccl): register broadcast SDMA-only out buffer rdmaRegister=false
inkcherry Jul 20, 2026
8767f35
fail-closed topology guards in HierAllGather ctor
inkcherry Jul 20, 2026
2a8f35c
document shipped default path vs experimental knobs in README
inkcherry Jul 20, 2026
2cc3056
document shipped default path in module docstring
inkcherry Jul 20, 2026
439ab55
strip stale investigation narrative from inter_num_blocks comment
inkcherry Jul 20, 2026
fd4f11a
strip A/B narratives from out_in_place + fuse_barrier comments
inkcherry Jul 20, 2026
cc5a3af
strip A/B narratives from slice_inter/slice_fused/slice_min_bytes
inkcherry Jul 20, 2026
1158299
strip narratives from pipe_band/slice_overlap/slice_fuse_ib/slice_pipe
inkcherry Jul 20, 2026
25aa9ad
strip narratives from standalone-fill + slice_direct comments
inkcherry Jul 20, 2026
404ea57
strip investigation narrative from SYNC_BIG mode comments
inkcherry Jul 20, 2026
7bef826
strip narratives from stream_ring/stream_intra/slice_defer_inter_fin …
inkcherry Jul 20, 2026
b787d08
remove dead MORI_HIER_PATH_LOG diagnostic print
inkcherry Jul 20, 2026
f484572
remove dead MORI_HIER_REG_STATS diagnostic counter
inkcherry Jul 20, 2026
cfd3f38
remove dead MORI_HIER_DP_DEBUG diagnostic print
inkcherry Jul 20, 2026
a5247e9
remove dead MORI_HOSTPROXY_ASYNC_DIAG diagnostic counter
inkcherry Jul 20, 2026
b8b733b
strip investigation narrative from fuse_local/reasm_streams comments
inkcherry Jul 20, 2026
be18695
extract ctor arg-or-env resolution into _resolve_bool/_resolve_int he…
inkcherry Jul 20, 2026
5acea77
fail-closed guard for explicit slice_direct over IPC transport
inkcherry Jul 20, 2026
0053565
strip gather_in_place investigation narrative to correctness invariant
inkcherry Jul 20, 2026
85f8131
strip slice_direct_overlap investigation narrative to correctness inv…
inkcherry Jul 20, 2026
60df6b6
strip leader-only investigation narrative to design + opt-in invariant
inkcherry Jul 20, 2026
016d603
strip DEFER_MODE=stream investigation narrative to experimental + inv…
inkcherry Jul 20, 2026
870f2fb
strip stale perf-investigation numbers from AG_TIMING diagnostic comment
inkcherry Jul 20, 2026
7af71bc
strip stale perf numbers from HOSTPROXY_ASYNC defaults comment
inkcherry Jul 20, 2026
111ea01
strip barrierthrottle sync_big investigation narrative to invariant
inkcherry Jul 20, 2026
761f216
strip SDMA reasm queue turn-history narrative to nq>=2 invariant
inkcherry Jul 20, 2026
4bd8caa
strip stale TFLOPS figure from PC_OVERLAP experimental comment
inkcherry Jul 20, 2026
e7b1a37
strip chunked-ring overlap turn-history narrative to invariant
inkcherry Jul 20, 2026
e515bb6
strip fused-ring persistent-kernel investigation narrative to invariant
inkcherry Jul 20, 2026
672f923
strip stale Δ-residual/TFLOPS figures from barriercutouch SYNC_BIG co…
inkcherry Jul 20, 2026
1d402c8
Remove ut_w16 standalone AllGather microbench artifacts from mi355x_a…
inkcherry Jul 20, 2026
e08bcbe
style(bench): render MI355X E2E figures in the MI300X figure style
inkcherry Jul 20, 2026
3c1adef
style(bench): render MI355X overlap figure in the MI300X bar-chart style
inkcherry Jul 20, 2026
c55ef94
style(bench): apply repo black formatting to plot_mi355x_ainic.py
inkcherry Jul 20, 2026
3502b68
style: satisfy repo pre-commit (ruff unused-import + clang-format)
inkcherry Jul 20, 2026
303bfb4
fix(shmem/sdma): index EP dispatch SDMA handles by global pe
inkcherry Jul 21, 2026
a7b70c6
style(shmem/sdma): wrap long comment to satisfy clang-format (ColumnL…
inkcherry Jul 21, 2026
d8ea365
docs: tidy comments across the hierarchical AllGather feature
inkcherry Jul 21, 2026
cf0fb38
ccl: remove experimental/debug/dead paths, keep only shipped AllGather
inkcherry Jul 22, 2026
82436c2
ccl: drop raw bench run logs from results/ (keep figures + CSVs)
inkcherry Jul 22, 2026
2498788
ccl: drop bench CSVs and plot scripts from results/ (keep figures)
inkcherry Jul 22, 2026
7e882ec
ccl: drop mi355x_ainic result README (keep figures), point main READM…
inkcherry Jul 22, 2026
92b87ba
comments: trim to terse invariants, drop dev-history and inline perf …
inkcherry Jul 22, 2026
e899344
comments: keep upstream comments untouched in modified files
inkcherry Jul 22, 2026
539b328
ccl: revert recv-CQ collapsed/forceClassic knobs to upstream CQ ctors
inkcherry Jul 22, 2026
1cb0482
ccl: drop stray blank line in IonicQpContainer (match upstream)
inkcherry Jul 22, 2026
3b30795
ccl: remove unused SDMA put variants
inkcherry Jul 22, 2026
ae25a4f
ccl: drop per-call SDMA ndesc split at oneshot put sites
inkcherry Jul 22, 2026
98575c8
ccl: single COPY_LINEAR in SDMA put (drop ndesc split)
inkcherry Jul 22, 2026
d89f9d1
ccl: single COPY_LINEAR in SDMA copy+remote-add (drop 8MB split)
inkcherry Jul 22, 2026
b247b9c
ccl: remove unused HierAllGather.result_tensor accessor
inkcherry Jul 22, 2026
ce26b4c
ccl: drop dead out_in_place path in HierAllGather
inkcherry Jul 22, 2026
a26405d
ccl: remove unused list-form all_gather in HierAllGather
inkcherry Jul 22, 2026
72cbdea
ccl: remove ring debug printf and dead var in oneshot sdma kernel
inkcherry Jul 22, 2026
2dbf587
ccl: remove dead deferred-backward drain no-op
inkcherry Jul 22, 2026
8e6871d
ccl: restore upstream SdmaPutThread body verbatim
inkcherry Jul 22, 2026
7ea950b
ccl: remove unused drain_hostproxy no-op stub
inkcherry Jul 22, 2026
7664551
ccl: remove unused MoriIntraSubGroupAllGather adapter
inkcherry Jul 22, 2026
8b6c213
ccl: remove unused MoriHierAllGather alias
inkcherry Jul 22, 2026
a967cd8
ccl: remove unused npes/num_blocks getters and pybind exports
inkcherry Jul 22, 2026
c92d497
ccl: drop unused write-push ring fence knob
inkcherry Jul 22, 2026
55f2a9e
ccl: drop unused intra event-sync fallback
inkcherry Jul 22, 2026
d27b9d0
ccl: drop unreachable subgroup-ring schedule variants
inkcherry Jul 22, 2026
a4535fb
ccl: drop dead self-fill schedule bits in subgroup-ring
inkcherry Jul 22, 2026
d3873f2
ccl: restore 8MiB SDMA copy-size cap in remote-add put
inkcherry Jul 22, 2026
98ef2a9
ccl: drop redundant deep-pipe-quiet env re-read
inkcherry Jul 22, 2026
3d73eb4
ccl: fix stale doc-ref to nonexistent deep-sq helper
inkcherry Jul 22, 2026
d4dff32
Merge cleanup
inkcherry Jul 23, 2026
fa4deb2
ccl: remove unused crown local-block gather knob
inkcherry Jul 23, 2026
3fa8af2
ccl: remove unused fwd-prefetch-unsafe depth knob
inkcherry Jul 23, 2026
be4db1f
ccl: remove dead fsdp-enable-sdma knob residue
inkcherry Jul 23, 2026
392eae0
ccl: remove write-only fwd-prefetch-root knob
inkcherry Jul 23, 2026
2840a59
ccl: remove orphaned subgroup ring sdma kernel body
inkcherry Jul 23, 2026
2c7fa1a
ccl: remove unused finish_sync_no_copy ring handle method
inkcherry Jul 23, 2026
ec3c949
Merge cleanup
inkcherry Jul 23, 2026
9125be0
ccl: drop unused mlx5 fence-mode enum residue
inkcherry Jul 23, 2026
02eb099
docs(fsdp): drop stale experimental-knob rows for removed flags
inkcherry Jul 23, 2026
f22283a
ccl(fsdp): drop dead python paths and redundant knobs
inkcherry Jul 23, 2026
585f016
ccl: remove dead C++ helpers and unreachable barrier paths
inkcherry Jul 23, 2026
5f08fad
docs(fsdp): align README knob table with the three-state scripts
inkcherry Jul 23, 2026
012421e
style: satisfy repo pre-commit (black + clang-format)
inkcherry Jul 23, 2026
2a9e225
test: restore unrelated ccl tests dropped by mistake
inkcherry Jul 23, 2026
b90260e
revert unrelated churn on pre-existing files
inkcherry Jul 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ python/mori/_jit_sources/

# Bundled tools/*.sh files copied into the package at build time
python/mori/tools/*.sh

# crash core dumps
core.*
174 changes: 174 additions & 0 deletions examples/fsdp_sdma/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# ccl: hierarchical cross-node AllGather (intra-node SDMA + inter-node RDMA)

## Summary

Adds a hierarchical AllGather to MORI-CCL (`mori.ccl.HierAllGather`, an
`all_gather_into_tensor`-compatible collective) that keeps intra-node traffic on
the GPU **SDMA copy engines** (XGMI) and moves inter-node traffic over **RDMA**
(NIC).

Motivation is **compute/communication overlap**: the collective runs
on the dedicated SDMA copy engines instead of the compute units, so an AllGather
issued concurrently with a GEMM does not steal CUs from the GEMM — parity with
the native (non-SDMA) path standalone, and a strict win when overlapped with
compute.

## Design

- Intra-node phase: SDMA sub-group gather over XGMI (no CU usage, no NIC).
- Inter-node phase: RDMA ring exchange of node-blocks over the NIC.
- Fused `ring || local-gather` kernel: the inter-node RDMA ring and the
ring-independent local node-block SDMA gather run concurrently in one grid,
stream-ordered, direct-to-output (no staging copy).
- Correctness: **bit-exact** vs `torch.distributed.all_gather_into_tensor`
(zero tolerance) for `{bf16, fp16, fp32, int32}`, all tested sizes.

## API

```python
from mori.ccl import HierAllGather

ag = HierAllGather(
my_pe=rank, npes=world_size, ranks_per_node=local_world_size,
input_buffer_size=per_rank_bytes,
output_buffer_size=per_rank_bytes * world_size,
copy_output_to_user=True,
)
ag(input_tensor, output_tensor, numel, stream) # intra=SDMA, inter=RDMA
```

## Results (MI300X, mlx5 RoCEv2 — w16 = 2 node × 8 GPU; all bit-exact vs RCCL)

Raw logs, CSVs, and the plot scripts live under
[`bench/`](bench/). The standalone AllGather-bandwidth figure is regenerated
from that data by `plot_ag_perf.py` (see **Reproduce**); the overlap and E2E
figures below are captured artifacts from the runs whose raw logs are committed
alongside them.

### 1. Standalone AllGather bandwidth vs RCCL (E2E-stable config)

The default E2E construction (`MORI_HIER_UT_FAST=0`, device `ibgda_sdma`) is
bit-exact and tracks RCCL closely, converging as the message grows. A single
AllGather is **not** where the win is — the collective is network-bound and
GPU-light, so standalone bandwidth is near-parity, not a beat:

| per-rank size | ibgda_sdma / RCCL |
|--------------:|:-----------------:|
| 64 MB | 0.90× |
| 128 MB | 0.94× |
| 256 MB | 0.95× |
| 512 MB | 0.96× |

![standalone AllGather bandwidth](bench/results/mi300x_mlx5/ag_perf_e2e_stable_w16.png)

### 2. GEMM time under concurrent AllGather (the no-CU-contention dividend)

Where the win actually comes from: RCCL's CU-resident AllGather kernels steal the
GPU from concurrent GEMMs; `hp_sdma` keeps the cross-node leg on the CPU and the
intra-node leg on the SDMA copy engine, so the GEMMs finish faster while 50
AllGathers run concurrently (lower = better, bit-exact vs RCCL):

| 50 AGs ‖ 50 GEMMs | RCCL | hp_sdma | speedup |
|---|--:|--:|:--:|
| 8 MB, GEMM n=2048 | 3.5 ms | 2.6 ms | 1.33× |
| 8 MB, GEMM n=4096 | 17.5 ms | 15.8 ms | 1.11× |
| 16 MB, GEMM n=4096 | 19.1 ms | 16.0 ms | 1.20× |

![GEMM time under concurrent AllGather](bench/results/mi300x_mlx5/overlap_w16_gemm_time.png)

### 3. End-to-end FSDP2 (Qwen-7B, seq 2048, w16) — drop-in MoriAllGather

Training loss is bit-identical to the native run over the whole curve while step
throughput beats the framework default. Three mori variants (intra × inter leg):

| variant | inter-node leg | intra-node leg | throughput vs RCCL |
|---|---|---|--:|
| `hp_sdma` | host-proxy (CPU-posted RDMA) | SDMA (XGMI, CU-free) | ~1.20× |
| `hp_cu` | host-proxy | NCCL (CU) | ~1.10× |
| `ibgda_sdma` | device IBGDA (GPU-posted RDMA) | SDMA | ~1.07× |

![E2E loss](bench/results/mi300x_mlx5/e2e_all_w16_loss.png)
![E2E throughput](bench/results/mi300x_mlx5/e2e_all_w16_tflops.png)

## Default path

The **default path** — what every FSDP/E2E caller gets with no `MORI_HIER_*`
env set — is:

- **Sliced 2-D AllGather**: inter-node RDMA ring over same-local-index peers
exchanging one shard/NIC, then N intra-node SDMA reassembly gathers. The
bit-exact bandwidth path.
- **Fused Phase-B** with stream-ordered ring/intra barriers and deferred finish
fences.
- CU-domain copy-out, with the two cross-PE finish fences forced ON at
`ranks_per_node >= 8` (the w16 config) for bit-exactness.

This raw library default needs no env var. On top of it the FSDP adapter
(`mori_allgather.py`) applies **zero-tuning defaults** for cross-node
(`num_nodes >= 8` layouts) — enabled via `setdefault`, so any explicit `MORI_*`
still wins.

### Shipped env (what the `bench/scripts/run_*.sh` three-state configs set)

The reproduce scripts are the source of truth; each knob below is part of a
bit-exact shipped path (verified against RCCL), not a diagnostic. Per E2E variant
(`run_e2e.sh`, on top of `MORI_ENABLE_SDMA=1 MORI_FSDP_ENABLE_HIER=1`):

| variant | env it sets |
|---|---|
| `hp_sdma` | `MORI_FSDP_HOST_PROXY=1 MORI_FSDP_HOSTPROXY_CAP_MB=512 MORI_HOSTPROXY_ASYNC=1 MORI_HOSTPROXY_SDMA_INTRA=1` |
| `hp_cu` | `MORI_FSDP_HOST_PROXY=1 MORI_FSDP_HOSTPROXY_CAP_MB=512 MORI_HOSTPROXY_ASYNC=1` |
| `ibgda_sdma` | `MORI_HIER_DEBUG_SYNC=0` (device IBGDA leg; no host proxy) |

The FSDP adapter additionally turns on the CU-free fused fill for cross-node —
`MORI_HIER_FUSE_LOCAL=1 MORI_HIER_FUSE_REMOTE=1 MORI_HIER_LOCAL_PUSHONLY=1`, plus
`MORI_HIER_DEBUG_SYNC=1 MORI_HIER_CUDA_GRAPH=0` at `ranks_per_node >= 8` as the
bit-exact landing fence (`ibgda_sdma` overrides it back to `0`). This is exactly
the `run_ut_ag_perf.sh e2e` construction, which is bit-exact and E2E-safe.

Env overrides always win, so any default above can be flipped.

## Second platform (MI355X + AINIC / ionic)

A parallel w16 FSDP2 E2E result set on AMD **MI355X** GPUs with the **AINIC
(ionic)** RoCEv2 NIC is under
[`bench/results/mi355x_ainic/`](bench/results/mi355x_ainic/) — same `run_e2e.sh`
script with the ionic node pair / NIC env, headline ~1.08× TFLOPS/GPU vs native
with bit-identical loss. See the figures there.

## Reproduce

All launchers live in `bench/scripts/`. Each one drives the 2-node run itself
(ssh into master + worker, clear stale procs, start `torchrun`); the UT sources
are in `tests/python/ccl/`. The node pair / NIC list is at the top of each script
(env-overridable: `MASTER`/`WORKER`/`IFACE`/`MORI_RDMA_DEVICES`/…). Raw logs +
figures land under `bench/results/mi300x_mlx5/`.

```bash
cd examples/fsdp_sdma/bench/scripts

# 1) Standalone AllGather bandwidth UT (device ibgda_sdma vs RCCL)
# -> ../results/mi300x_mlx5/ag_perf_e2e_stable_w16.png
bash run_ut_ag_perf.sh e2e 64 128 256 512 # E2E-stable (default) config
python ../results/mi300x_mlx5/raw/plot_ag_perf.py # (re)draw the figure from the run (or committed CSV)

# 2) Compute/comm overlap UT (GEMM time under 50 concurrent AGs, hp_sdma vs RCCL)
# -> ../results/mi300x_mlx5/overlap_w16_gemm_time.png (args: gemm_n size_mb nops)
bash run_ut_overlap.sh 2048 8 50
bash run_ut_overlap.sh 4096 8 50
bash run_ut_overlap.sh 4096 16 50

# 3) End-to-end FSDP2 (Qwen-7B): RCCL baseline + one mori variant, bit-exact loss + tflops
bash run_e2e.sh # RCCL + hp_sdma (default)
bash run_e2e.sh hp_cu
bash run_e2e.sh ibgda_sdma
WORLD=w8 bash run_e2e.sh # world=8 (default w16)
```

## Test plan

- [x] Bit-exact vs `torch.distributed.all_gather_into_tensor` for
`{bf16, fp16, fp32, int32}` on every tested size (true 2-node, world=8 & 16).
- [x] Standalone AllGather bandwidth sweep, E2E-stable config (near-parity, bit-exact).
- [x] Compute/comm overlap UT — GEMM finishes 1.1–1.3× faster under 50 concurrent AGs.
- [x] End-to-end FSDP2 training, loss bit-identical to native at world=8 & 16.
Loading
Loading