Repository navigation
fix(ep): fail fast for cross-node kernels on the CCO backend - #894
Merged
Merged
Conversation
paklui
force-pushed
the
fix/ep-internode-cco-guard
branch
from
November 2, 2026 15:53
304aff4 to
60aa380
Compare
Contributor
|
Thank you for the contribution ! A clear error at construction is much better than a GPU fault at address 0. @paklui Note for gfx1250
Review points
|
On gfx125x the EP communication backend defaults to CCO (MORI_EP_COMM=cco).
The cross-node kernels (InterNode v0, InterNodeV1/V1LL, AsyncLL) move data
with the shmem RDMA API, which reads the remote address and rkey from
SymmMemObj::peerPtrs / peerRkeys. The CCO MallocSymm only fills
p2pPeerPtrs for LSA peers and leaves the RDMA fields null, so with
worldSize > gpuPerNode the first cross-node put dereferences a null
pointer on the GPU:
Memory access fault by GPU node-N ... on address (nil)
amdgpu: GCVM_L2_PROTECTION_FAULT ... page starting at address 0x0
from IH client 27 (GC_UTCL2), client TCP
Seen on 2 nodes x 8 gfx1250 GPUs with InterNodeV1LL
(MORI_EP_DISABLE_RDMA_ATOMICS=1), with and without
MORI_CCO_FABRIC_DISABLE=1.
Throw at handle construction with a message that names the cause and the
alternatives, the same way the rail-only and atomic-free checks do. A
functional fix needs the CCO arena registered for RDMA (MR plus rkey and
remote VA exchange) and those fields copied into each sub-region object.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review follow-up: - The check now runs first in the EpDispatchCombineHandle constructor and rejects any kernel type when the CCO backend is used with worldSize > gpuPerNode, so kernel types added later are rejected by default. The message points to EPv2 (mori.ops.dispatch_combine_v2). - The rail-only comment no longer claims that CCO has its own connection rail for this path. - tests/python/ops/test_dispatch_combine_cco_guard.py builds a handle with a placeholder CCO communicator pointer (never dereferenced) and a cross-node config, for every kernel type, and expects RuntimeError. It needs no GPU, shmem or CCO setup. Co-Authored-By: Claude Opus 5.5 <[email protected]>
paklui
force-pushed
the
fix/ep-internode-cco-guard
branch
from
November 3, 2026 22:24
60aa380 to
ac15d09
Compare
Contributor
Author
|
Thanks for the review. Updated (rebased on main, new commit ac15d09):
Noted on gfx1250: EPv1 and RDMA scale-out are not verified there; we will move our gfx1250 testing to EPv2. |
kawhil-amd
approved these changes
Nov 4, 2026
kawhil-amd
left a comment
Contributor
There was a problem hiding this comment.
LGTM @jhchouuu maybe you could help to check it again
zhangfei829
added a commit
that referenced
this pull request
Nov 9, 2026
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. An EP v2 comment that named EpDispatchCombineHandle::MallocSymm as the arena now names SymmArena, which is what EP v2 allocates from.
zhangfei829
added a commit
that referenced
this pull request
Nov 10, 2026
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.
zhangfei829
added a commit
that referenced
this pull request
Nov 12, 2026
* refactor(ep): remove the EP v1 gfx125x code 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. * refactor(ep): remove EP v1's cco backend 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. * refactor(ep): drop the wave32 branch EP v1 left in WarpQuantizeToFp8Blockwise #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. * refactor(ep): warn that EP v1 ignores MORI_EP_COMM 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. * docs(ep): stop naming the files the EP v1 gfx125x removal deleted 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On gfx125x,
MORI_EP_COMMdefaults tocco. In that modeMallocSymmfills onlylocalPtrand the LSA peer pointers of each symmetric buffer;peerPtrs,peerRkeysandlkeystay null. The cross-node kernels (InterNode, InterNodeV1/V1LL, AsyncLL) send with the shmem RDMA put, which readsdest->peerPtrs[pe]anddest->peerRkeys[pe]. So the first cross-node put dereferences a null pointer, and the GPU faults at address 0.This PR fails at
EpDispatchCombineHandleconstruction instead, with a message that names the cause and the alternatives. It is the same pattern as the existing rail-only check, +17 lines indispatch_combine.cpp. Supporting the CCO backend across nodes (registering the CCO arena for RDMA) is a separate change.Testing
On gfx1250: 2 x 4 GPUs (
GPU_PER_NODE=4), default backend,--kernel-type v1_ll. Every rank now raises the newRuntimeErrorin the constructor; no kernel is launched and no GPU fault occurs. Previously this configuration hit the null-address fault.Internal tracking: AIMORI-20.