Repository navigation
[MUSA] Allow MAGI-2 pipeline device handling on MUSA - #7264
Closed
yeahdongcn wants to merge 2 commits into
Closed
yeahdongcn wants to merge 2 commits into
yeahdongcn wants to merge 2 commits into
Conversation
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
Contributor
Author
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
Allow MAGI-2 to use MUSA through the existing Omni platform abstraction.
is_cuda=True.atomic_addepilogue. CUDA/ROCm, MUSA FP16/FP32 and explicitMAGI2_DETERMINISTIC=1dispatch remain unchanged.This is entry compatibility, not optimized full-resolution MUSA support. Attention still uses the dense Torch reference, which is only qualified by bounded tests here.
Scope
Independent of #7249 and #7206: no FA3 adapter or new BF16 MoE kernel is copied or enabled. No MoE kernel arithmetic, SwiGLU7, mHC, EP, sampler-step optimization, compilation, launch-tile or dependency-pin changes. #7156 remains the historical reference draft.
The BF16 MoE adjustment reuses
deterministic=Trueto choosetl.storefollowed by the existing scatter. It is a non-atomic Triton-output selection, not a new whole-pipeline determinism guarantee. Its full-model buffer/memory/performance impact remains unmeasured.Exact-head validation
Tested and pushed commit:
96a02eaa6948a6a26e3e8c49f9b61d61af359eac, a signed-off follow-up tof9101b2a3.3.3.8-server(no driver pin).D=256, I=1280, top_k=6, tokens/heads2/3and129/1. Constant clipped expert inputs yield the independently derived nonzero output105/64; both cases match it bitwise and confirm non-atomic output selection.rtol=2e-4, atol=2e-5), and synchronization/memory instrumentation with a stub runtime.Stack: Python 3.10.12; torch/torch_musa
2.11.0.post1+musa5.2.0; torchada0.1.83; vLLM0.28.0; vllm-musa0.1.28; Triton3.2.0; MATE0.2.6; flash_attn_30.2.6+musa.Image:
registry.mthreads.com/mcconline/inference/vllm-omni@sha256:7f4f2cd83a88979025ef92968334f6e075eb24d45d02e0c30dbb222f7780d58a.Installation was skipped for this Python-only source update. The exact Git archive and runner were checksum-verified;
PYTHONPATHand the resolved import path identify the candidate source. No dependency/native build was performed. On the MUSA stack, import torchada first:CPU validation additionally includes
test_pipeline_magi2.pyandtest_native_preview.py, selectingcpu.Not run: CUDA hardware regression, multi-rank MUSA collectives, full-checkpoint/video accuracy, optimized FA3, compiled/graph execution, full-model memory sizing and performance benchmarks. This remains Draft.