{"record":{"id":"9d6a4aa8b3213c0e","repo":"sgl-project/sglang","slug":"unknown-gemm-type-gemm-type","errorCode":null,"errorMessage":"Unknown gemm type: {gemm_type}","messagePattern":"Unknown gemm type: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/layers/moe/moe_runner/humming.py","lineNumber":142,"sourceCode":"        return runner._run_grouped_contiguous_gemm(\n            hidden_states=hidden_states,\n            topk_ids=topk_ids,\n            topk_weights=topk_weights,\n            hidden_states_scale=hidden_states_scale,\n            apply_routed_scaling_factor=apply_routed_scaling_factor,\n        )\n    elif gemm_type == \"grouped_masked\":\n        assert expected_m is not None and expert_num_tokens is not None\n        return runner._run_grouped_masked_gemm(\n            hidden_states=hidden_states,\n            topk_ids=topk_ids,\n            topk_weights=topk_weights,\n            expected_m=expected_m,\n            expert_num_tokens=expert_num_tokens,\n            hidden_states_scale=hidden_states_scale,\n        )\n    else:\n        raise ValueError(f\"Unknown gemm type: {gemm_type}\")\n\n\nclass HummingRunnerCore(MoeRunnerCore):\n    runner_cores: WeakValueDictionary = WeakValueDictionary()\n\n    def __init__(self, config: MoeRunnerConfig):\n        super().__init__(config)\n        assert config.num_local_experts is not None\n        assert config.num_experts is not None\n        self.num_experts = config.num_local_experts\n        self.global_num_experts = config.num_experts\n        self.activation = config.activation\n        self.swiglu_limit = config.swiglu_limit\n        self.layer: torch.nn.Module | None = None\n        self.humming_gemm_configs = {}\n        HummingRunnerCore.runner_cores[id(self)] = self\n\n    @property","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/moe/moe_runner/humming.py#L124-L160","documentation":"humming_moe_runner_core_run dispatches GEMMs by a gemm_type string and raises ValueError for any unrecognized value. Only the specific gemm types handled above the else branch (grouped/masked/indexed variants) are supported.","triggerScenarios":"Calling humming_moe_runner_core_run with a gemm_type string not in the supported set — typically from custom code or a version mismatch between sglang and the humming kernel integration where a new gemm type name was added on one side.","commonSituations":"Mixing sglang versions with custom humming patches; passing a typo'd or renamed gemm type from a fork; upgrading one component without the other.","solutions":["Check the dispatch branches above the else in humming.py:142 for the accepted gemm_type values and use one of them","Align sglang version with the humming integration that produced the caller","If adding a new gemm type, extend the dispatcher with an explicit branch"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"SUPPORTED_GEMMS = {'grouped_contiguous', 'grouped_masked', 'indexed'}  # per dispatch branches\nassert gemm_type in SUPPORTED_GEMMS, f'gemm_type must be one of {SUPPORTED_GEMMS}'","typeGuard":"def is_supported_gemm(g: str) -> bool:\n    return g in {'grouped_contiguous', 'grouped_masked', 'indexed'}","tryCatchPattern":null,"preventionTips":["Pin sglang and humming-related forks to compatible versions","Add exhaustive dispatch tests when adding new gemm types"],"tags":["sglang","moe","humming","gemm","dispatch"],"backgroundTag":"invalid-enum-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}