merge to main of feat(flux): core runtime + Megatron adapter scaffolding#856
Merged
Conversation
… on draft PRs Bump PRIMUS_TURBO_COMMIT to Primus-Turbo main (0.3.x, validated build) which exposes the mxfp4 gemm_fp4_impl(..., preshuffled=...) fast path, and PRIMUS_TURBO_AITER_COMMIT to AITER v0.1.14.post1. Mirror the turbo commit into benchmark.yaml; the docker build receives both via ci.yaml build-args. Add a draft-skip guard to the expensive jobs (build-docker, run-unittest-torch, run-unittest-jax) so the stacked Flux PRs can sit in Draft without firing the full pipeline; code-lint stays ungated. Add ready_for_review to the pull_request trigger types so flipping a draft to Ready triggers the first run. MEGATRON_PATH export intentionally omitted: the Flux diffusion unit tests run in-process (no megatron-importing subprocess remains after the te_vs_local in-process conversion), and tests/conftest.py auto-adds third_party/Megatron-LM to sys.path when MEGATRON_PATH is unset. CI already checks out submodules: recursive, so megatron imports without any extra env.
… DeepEP pad_multiple
The branch's pins pointed at older commits missing required APIs, breaking
DeepEP MoE training with:
DeepEPTokenDispatcher.__init__() got an unexpected keyword argument 'pad_multiple'
- PRIMUS_TURBO_COMMIT 3cd482de -> bc6c7d2a :
old pin lacked both gemm_fp4_impl(preshuffled=) and
DeepEPTokenDispatcher(pad_multiple=); new pin has both.
- PRIMUS_TURBO_AITER_COMMIT f299f579 -> 0f3c58e6: the real v0.1.14.post1
tag commit required by Primus-Turbo main's aiter_utils.py.
… on draft PRs Bump PRIMUS_TURBO_COMMIT to Primus-Turbo main (0.3.x, validated build) which exposes the mxfp4 gemm_fp4_impl(..., preshuffled=...) fast path, and PRIMUS_TURBO_AITER_COMMIT to AITER v0.1.14.post1. Mirror the turbo commit into benchmark.yaml; the docker build receives both via ci.yaml build-args. Add a draft-skip guard to the expensive jobs (build-docker, run-unittest-torch, run-unittest-jax) so the stacked Flux PRs can sit in Draft without firing the full pipeline; code-lint stays ungated. Add ready_for_review to the pull_request trigger types so flipping a draft to Ready triggers the first run. MEGATRON_PATH export intentionally omitted: the Flux diffusion unit tests run in-process (no megatron-importing subprocess remains after the te_vs_local in-process conversion), and tests/conftest.py auto-adds third_party/Megatron-LM to sys.path when MEGATRON_PATH is unset. CI already checks out submodules: recursive, so megatron imports without any extra env. rebase to main branch
xmpeng-dev
approved these changes
Jul 7, 2026
Xiaoming-AMD
approved these changes
Jul 7, 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.
Important: The content of this PR was approved and merged #807, but not to main (auto-target to main was not triggered and the lesson was taken into account for further PRs).
The purpose of this PR is to finalize the merge to main and no new changes were introduced.
Base of an 18-PR series splitting the Flux diffusion-training feature (training Flux, a DiT text-to-image diffusion model, on Primus/Megatron) out of one large branch for reviewability. Targets
feat/flux/ci-envand auto-retargets tomainonce that merges. Every other content PR stacks on this one.What this changes
The shared runtime scaffolding the rest of the feature builds on: core runtime state + train-runtime wiring, the Megatron adapter and base/pretrain trainers, and a patch auto-loader (
patches/__init__.py) that imports every*_patches.pyin the package on import, so each later layer only drops in its own patch file with no registry edit. Also carries the shared test root (tests/conftest.py,tests/utils.py) and a one-line.gitignorechange (the baredataignore → root-anchored/data/*, and nothing else) that stops Git from ignoring the in-repodata/source and config directories the later layers add. Kept deliberately small so it can land first.Dependencies
Sequenced after the CI-pins PR (
feat/flux/ci-env); no functional dependency on the turbo bump.Test plan
pytest tests/unit_tests/core tests/unit_tests/backends/megatron; lint/pre-commit clean. Validated locally on an AMD GPU container: 58 passed.Files
39 (core runtime, Megatron adapter/trainers, base patch loader, shared test root,
.gitignore).