fix(compiler): default cluster_dims=(1,1,1) for backends that omit it - #1020
Open
tengqm wants to merge 1 commit into
Open
fix(compiler): default cluster_dims=(1,1,1) for backends that omit it#1020tengqm wants to merge 1 commit into
tengqm wants to merge 1 commit into
Conversation
tengqm
requested review from
Galaxy1458,
menchunlei,
sunnycase and
zhzhcookie
as code owners
August 20, 2026 09:23
hcu and mthreads backends do not support cluster launch, so their compiled kernel metadata omits cluster_dims. The KernelMetadata namedtuple is then built without that key, and torch 2.9.0's make_launcher reads kernel.metadata.cluster_dims unconditionally, raising AttributeError during KV-cache profiling warmup. Default the key to (1,1,1) before building the namedtuple, matching what the vendor triton 3.5.1 compiler and the iluvatar overlay already use — instead of patching torch/inductor per backend in each vendor adapter.
tengqm
force-pushed
the
fix/cluster-dims-default
branch
from
August 20, 2026 10:25
b3b75cf to
0d59efa
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.
CompiledKernel.__init__builds theKernelMetadatanamedtuple from the metadata dict emitted by the backend. Backends without cluster-launch support (hcu, mthreads) omitcluster_dims, so the field is missing from the namedtuple.torch._inductorreadskernel.metadata.cluster_dimsunconditionally when a kernel carries metadata, raisingAttributeErrorduring KV-cache warmup — reproduced with vllm 0.24.0 on the Hygon DTK 26.04 runtime (flagtree 0.6.1+hcu3.6).Default
cluster_dimsto(1,1,1)before building the namedtuple, the same value vendor triton and the iluvatar overlay already use. Backends that do emit the field are unaffected.Fixing it at the source also lets the MUSA adapter in vllm-plugin-FL drop its
patch_inductor_triton_for_musamonkey-patch (its comment marks itTODO remove once flagtree adds cluster_dims).Applying the same one-line change in the container lets the vllm 0.24.0 F-path serve proceed past the AttributeError and reach application startup.
This PR was written in part with the assistance of generative AI.