adapt(musa): MTT S5000 backend adaptation for vLLM 0.24.0 - #308
Open
physics31415926 wants to merge 1 commit into
Open
adapt(musa): MTT S5000 backend adaptation for vLLM 0.24.0#308physics31415926 wants to merge 1 commit into
physics31415926 wants to merge 1 commit into
Conversation
physics31415926
force-pushed
the
fix/musa-mthreads-inference-patches
branch
from
July 23, 2026 06:18
85590f7 to
8050bba
Compare
physics31415926
force-pushed
the
fix/musa-mthreads-inference-patches
branch
2 times, most recently
from
July 24, 2026 02:17
03df009 to
5fcd442
Compare
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
Upgrade compatibility patches for MTT S5000 (MUSA) offline inference under vllm 0.24.0, covering both dense and MoE models.
Environment
registry.mthreads.com/mcconline/inference/vllm:v0.20.0-ph1-4.3.5-torch2.9-20260605-mtcc51Changes
musa/patch.pypatch_accelerator_missing_attrs: unconditionally replacetorch.accelerator.empty_cachewithtorch_musa.empty_cache; addmax_memory_allocatedanddevice_indexpatches_accelerator_isAllocatorInitialized()which asserts on MUSA;max_memory_allocatedcalled by base_loader after model load;device_indexused by fla/opsmusa/patch.pypatch_cuda_get_device_properties: fix sentinel flag name_musa_get_device_capability_patchedcaused patch to be skipped on reloadmusa/patch.pypatch_cuda_stream_for_musa:aux_stream()returnsNoneon MUSA; force-import all consumer modules and patch their local bindingsSharedExperts.__init__callsaux_stream()→torch.cuda.Stream()(MUSA dummy, raisesRuntimeError). Consumer modules usefrom vllm.utils.torch_utils import aux_stream(local binding at import time), so patching the module attribute alone is insufficientmusa/patch.pypatch_inductor_triton_for_musa: fixself.binary→self.kernelTritonCompileResultrenamed compiled kernel attribute from.binaryto.kernelin torch 2.9; raisedAttributeErrorduring KV-cache warmupmusa/patch.pypatch_moe_topk_softmax_for_musa: replace threading/meta-path-finder with directimportlib.import_module; addreturn topk_weights, topk_idsTypeError: cannot unpack non-iterable NoneType objectmusa/musa.pymusa/register_ops.pytopk_softmaxdispatch for MUSA backendTest Results
All tests run with
MUSA_VISIBLE_DEVICES=4,5,6,7, TP=4.Qwen3.6-27B (dense)
Hello, my name isJohn. I am a 25-year-old...The capital of France isParis...What is 2+2?2+2 equals 4...Qwen3.6-35B-A3B (MoE)
Hello, my name isJohn. I am a 25-year-old male...The capital of France isParis, a city renowned for its iconic landmarks...What is 2+2?2+2 equals 4...Both models initialize and exit cleanly with no errors.