Repository navigation
[moe] resolve the default EP group before tagging parameters - #6486
Merged
Merged
Conversation
JazyJiang
marked this pull request as ready for review
October 28, 2026 01:37
JazyJiang
pushed a commit
that referenced
this pull request
Oct 28, 2026
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.
Problem and change
Fixes #6485. Stacked on #6477: base
feat/moe-ep-layer, headfix/ep-default-process-group.When distributed is initialized, constructing
EPMoELayerwith its defaultep_group=Nonecomputes the WORLD size correctly but tags expert parameters withNone. The existingget_ep_size(param)then raises an assertion. Resolve the default group todist.group.WORLDbefore creating the default dispatcher or tagging parameters. Explicit subgroups and construction before distributed initialization retain their current behavior.Add a CPU/Gloo regression for initialized and uninitialized construction, include it in both CPU batch manifests, and extend the existing four-GPU parameter-contract test to cover WORLD and explicit subgroups. No changes to gradient scaling, the getter API, checkpoint layout, dependencies, image configuration, or
version.txt.Validation
Tested commit:
c1702d851d9086415e6a942224220ddfdca57e60(parent055853017e23c778402b2c8d965838cb09fb43e4).layer.pymounted over the fixed snapshotgit diff --checktest_ep_moe_layer.py/ Layer 3Commands inside the existing dependency image, with
/workspacebound read-only to the exact source archive and zero visible GPUs:python -m pytest -p no:cacheprovider -v -ra --tb=short \ --junitxml=/results/cpu-after.xml tests/test_moe/test_ep_moe_layer_cpu.py PYTEST_ADDOPTS='-p no:cacheprovider' COLOSSAL_RESULTS=/results/cpu-gate \ bash .github/scripts/ci/run_cpu_unit_tests.shThe targeted regression ran with
FAST_TESTunset. The CPU gate used its normalFAST_MODE=1/FAST_TEST=1setting; these two new cases are not reduced by that setting. No new skip, xfail, ignore, tolerance change, or failure retry was added. One initial CPU-gate launch stopped before pytest because Windowsgit archiveexported CRLF shell scripts; regenerating the unchanged commit withgit -c core.autocrlf=false archivefixed the source packaging. Results above are from the corrected archive.Environment: Ubuntu 22.04.5 LTS; Python 3.10.12; Torch 2.13.0+cu130 (CUDA runtime 13.0); Transformers 5.17.0; PEFT 0.21.2; pytest 7.4.4. GPU count 0, Gloo backend; no CUDA kernels/toolkit or flash-attn path exercised. Image:
wangzhijian/colossalai-ci:torch2.13-cu130-tf5.17.0-peft0.21.2-20261022-091529, local image IDsha256:ae8ff34bf340a692803edca6e0f38a576fc1a2b206c01b4ef6f7c2a40dfd8c10. Containers had no network or GPU access and used the existing environment without installing dependencies.The source import was verified as
/workspace/colossalai/__init__.py. Source archive SHA256:56af8c927ba8d094d728bb00124feb8e31544c2d49c38cc1d57ca2ee555c1fc1.Logs/JUnit on server 30005:
/mnt/beegfs/ricardoo/codex-ep-default-group-20261027/results/(cpu-before.*,cpu-after.*,cpu-gate/cpu-local-1.{log,xml}). The reproducible red/green command wrapper isvalidate.shin the same task directory.Risk and rollback
The runtime change only makes default-group metadata explicit after distributed initialization; the communication group and numerical operations are unchanged. Revert this commit to roll back. No release or installation changes are needed. Keep as Draft pending the four-GPU regression; this validation does not claim a Layer 3 pass.