Skip to content

refactor(ep): remove EP v1's gfx125x and cco code - #975

Merged
zhangfei829 merged 5 commits into
mainfrom
refactor/ep-v1-remove-gfx125x-cco
Nov 12, 2026
Merged

zhangfei829 merged 5 commits into
mainfrom
refactor/ep-v1-remove-gfx125x-cco

Conversation

@zhangfei829

@zhangfei829 zhangfei829 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator
  • refactor(ep): remove the EP v1 gfx125x code. gfx1250 should use EP V2. EP v2 is the dispatch/combine path on gfx125x. EP v1 keeps its portable body and now raises on a wave32 GPU instead of launching kernels sized for wave64:
    RuntimeError: EP v1 (mori.ops.dispatch_combine) runs on wave64 GPUs only, this one is wave32; use EP v2 (mori.ops.dispatch_combine_v2)
  • refactor(ep): remove EP v1's cco backend. feat(ep/intranode): bring MoE dispatch/combine up on gfx1250 (MI450) #532 added it for gfx1250; on wave64 it was opt-in through MORI_EP_COMM=cco, and with the gfx125x code gone nothing selects it. EpDispatchCombineHandle loses its ccoCommPtr argument, EP v1 always initializes shmem, and mori_ops no longer links mori_cco. MallocSymm keeps the null check from fix(ep): fail MallocSymm with the heap size instead of hipMemset(nullptr) #900 on the shmem path, which is now its only path. cco itself is unchanged; EP v2 uses it.
  • refactor(ep): drop the wave32 branch of WarpQuantizeToFp8Blockwise; EP v1 is its only caller.

EP v2 has no API, launch argument or plan field changes. Code that still builds EP v1 on gfx125x (AITER's default mori backend) now gets the error above; AITER moves to EP v2 in a separate PR. No comments are added: comments that would become wrong only lose words, and the docs that name the removed files are left as they are.

Testing

  • EP v1 on 8 x MI355X (gfx950): bench_dispatch_combine.py EP8 bf16 with verify passes; test_dispatch_combine_intranode.py and test_dispatch_combine_async_ll.py: 23 passed, the rest skipped by the tests' own conditions.
  • EP v1 kernels on gfx942 and gfx950, built before and after and disassembled: same kernel metadata (registers, LDS, scratch). Five of the six kernel files are instruction-for-instruction identical; ep_intranode differs only in instruction scheduling (the launch symbols now call the *_body templates directly) and in one assert's line number.
  • Host libraries build on gfx950 (ROCm 7.2.4) and mori imports; libmori_ops.so no longer links libmori_cco.so.
  • On gfx1250, EP v1 raises the error above and EP v2's default backend is still hip.
  • black, ruff and clang-format pass; clang-format's two complaints at ep_common.hip:98-99 are on main too.

EP v2 is the dispatch/combine path on gfx125x. EP v1 keeps only its portable body and now refuses to start on a wave32 GPU instead of launching kernels sized for wave64.

Removed: the gfx125x TDM bodies (src/ops/dispatch_combine/intranode_1250x.hpp), the per-arch body selector (intranode_entry.hpp) with its _ENTRY wrapper macros, tools/ep_test.sh, and on the Python side the gfx125x launch geometry, LDS reservations, staging-capacity check, cco default and wave32 detection. The JIT no longer passes -DMORI_HOST_GFX125X, which nothing reads any more, and EP v2 picks its default backend without importing EP v1.

The cco backend stays, selected with MORI_EP_COMM=cco.
EP v1 got a cco backend in #532 so that it could run on gfx1250, where shmem init can hang. The previous commit took gfx125x away from EP v1, and nothing else selects the backend: on wave64 it was opt-in with MORI_EP_COMM=cco, and no CI job, test or caller sets that except the backend's own guard test.

Removed: the MORI_EP_COMM switch and the process-wide cco communicator on the Python side; EpDispatchCombineHandle's cco_comm_ptr argument and its cco arena (the window, the sub-region bookkeeping, FinalizeCcoAllocs); the cross-node guard that #894 added for this backend, with its test; the shmem-init skip in bench_dispatch_combine.py; and mori_ops' link against mori_cco, which only this code used. MallocSymm and FreeSymmByLocalPtr stay as the handle's shmem allocation helpers, so their callers are unchanged.

Kept: ccoGetPeerPtr and CCO_GDR_CAPABLE in the cco library, which the torch SymmetricMemory backend and the known-issues workaround use; and the s_sleep in the intranode cross-device barrier, which runs on every wave64 GPU. Only its comment is gone: it described a hang on the removed backend under a dispatch kernel that no longer exists.
…lockwise

#532 gave WarpQuantizeToFp8Blockwise a warpSize == 32 branch for EP v1's gfx125x combine. Only EP v1 calls the function (intranode.hpp, low_latency_async.cpp; EP v2 does not), and EP v1 now refuses wave32 GPUs, so nothing can reach the branch. On wave64 it was already compiled out.
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

GPU CI for 45fc35ba (run): changed areas: core, ep, epv2, ops_shared

lane runs jobs
mori yes MI355X intranode, MI355X ROCm 10, MI355X JAX, MI355X internode
mi300x yes MI300X intranode, MI300X internode
umbp yes UMBP unit test
cco yes CCO unit test, CCO EPv2 single-node test, CCO internode
fused yes CCO fused GEMM test
build yes MoRI build (compile check)

Test groups (the steps that run in those jobs): ep, kiwi, ccl, io, ras, shmem, umbp, cco, epv2, fused, build.

Lanes follow the changed files. Adding ci:full re-runs CI with every lane, the full internode sweeps and every fused GEMM case; adding ci:mi300x re-runs it with the MI300X lanes added. /ci-rerun re-runs CI against the current main.

@jhchouuu jhchouuu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal is clean: EP v1 goes back to the shmem-only path (MallocSymm keeps #900's null check), the handle constructor and its Python call agree, and on a wave32 GPU EP v1 now fails at construction with a message that names EP v2. _default_backend keeps the same gfx125x test it imported before.

Non-blocking:

  • MORI_EP_COMM is now ignored without a word. Someone who set MORI_EP_COMM=cco on a wave64 GPU silently gets shmem; a one-line warning (or error) when it is set would make that visible.
  • docs/MORI_JIT_V2_DESIGN.md still names tools/ep_test.sh.
  • Worth a line in the release notes: EP v1 no longer runs on wave32 GPUs, and the EpDispatchCombineHandle constructor lost its ccoCommPtr argument.

MORI_EP_COMM=cco selected EP v1's cco backend on wave64. With that backend removed the variable did nothing, so a caller who still set it got shmem without a word. EP v1 now logs a warning when the variable is set.
MORI_JIT_V2_DESIGN.md named tools/ep_test.sh and src/ops/dispatch_combine/intranode_1250x.hpp, and the EP v2 README named the latter. The sentences now say what those files were: v1's shipping defaults, and v1's gfx1250 kernels.
@zhangfei829

Copy link
Copy Markdown
Collaborator Author

The removal is clean: EP v1 goes back to the shmem-only path (MallocSymm keeps #900's null check), the handle constructor and its Python call agree, and on a wave32 GPU EP v1 now fails at construction with a message that names EP v2. _default_backend keeps the same gfx125x test it imported before.

Non-blocking:

  • MORI_EP_COMM is now ignored without a word. Someone who set MORI_EP_COMM=cco on a wave64 GPU silently gets shmem; a one-line warning (or error) when it is set would make that visible.
  • docs/MORI_JIT_V2_DESIGN.md still names tools/ep_test.sh.
  • Worth a line in the release notes: EP v1 no longer runs on wave32 GPUs, and the EpDispatchCombineHandle constructor lost its ccoCommPtr argument.

Thanks! All three are addressed in 34c690d and 45fc35b:

  • MORI_EP_COMM: EP v1 now logs MORI_EP_COMM is ignored: EP v1 always uses shmem whenever the variable is set. I went with a warning rather than an error because shmem is what EP v1 has always used by default on wave64, so a leftover setting doesn't need to fail the job.
  • docs/MORI_JIT_V2_DESIGN.md no longer names tools/ep_test.sh. Its §9 and the EP v2 README also named the removed src/ops/dispatch_combine/intranode_1250x.hpp; fixed those as well.
  • Release notes: added a "Release notes" section to the PR description with both points, plus the MORI_EP_COMM change, so it can be copied when the release is cut.

@zhangfei829
zhangfei829 merged commit bd82f04 into main Nov 12, 2026
16 of 18 checks passed
yangyuhuiling pushed a commit that referenced this pull request Nov 13, 2026
Checked against main after merging it: #975, #964 and the anvil changes
landed since the last merge.

EP:
- gfx1250 is EPv2 only: since #975, EPv1 refuses wave32 GPUs. IntraNode's
  gfx125x launch default goes with it.
- The HIP backend also has the gfx125x push combine (fp8_blockwise or FP4,
  plus the per-call bf16 push on gfx1250). The package README said FlyDSL
  was the default everywhere and that HIP only gathers.
- The quick start's combine passes no weights: the weight fold is for
  training backward. The package README has no per_rank_vmm section.
- README: the backend-parity test and bench_ep.py run under torchrun, and
  the intranode test's matrix is for gfx942/gfx950.

CCO and CCL:
- Single-node GDA is gda_connection_type = GDA_CONNECTION_FULL;
  MORI_CCO_GDA_CONN is only example 03's switch.
- GdaCallerOrdered has no signal, and only its own flushes release posts.
- mori.ccl no longer binds AllGatherIntoTensor, and HierAllGather crosses
  nodes over an RDMA ring.

Fused operators:
- gemm_ar's fp8 gather is an LSA pull by default, its window has a tmp
  slot, and its op test runs on 2 ranks. bf16 also takes block_m=128.
  Only bench_a2a_gemm runs every mode by default.
- a2a_gemm: mismatched chunks hang or give wrong results, depending on
  which side has more. The example needs MORI_ENABLE_SDMA=1.
- anvil.cpp is cited without a line number. The a2a VMM sizing is the
  overview's, not the tests'.

UMBP:
- Single-node script: MORI_PIP_FLAGS never reaches pip, SGLANG_REPO is
  not used, and the server runs from NFS_BASE whatever MORI_REPO says.
- Only clients log the activity summary, and at INFO while the default
  level is error. Remote puts fail at once on a full SSD staging arena.
- StandaloneClient is gone; the design doc now gives CreateUMBPClient's
  current choices.

Site:
- MORI-IR-GUIDE.html and MORI_IR_INTEGRATION.html redirect to the SHMEM
  guide's IR section. The README has the MORI-IR tests again, and the
  SHMEM guide links python/mori/ir/README.md.
- Internal hosts, private IPs, local paths and archive names are
  replaced with placeholders or dropped.
- Smaller fixes: the profiler's clock helper returns kHz, a self-link, a
  doubled "and", a conf.py comment.

python -m sphinx -E -n -W --keep-going -b html passes, and
tools/check_docs_links.py reports 0 errors over 3330 local links.

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants