{"record":{"id":"f01633ea0bb1415a","repo":"sgl-project/sglang","slug":"enable-deepseek-v4-fp4-indexer-requires-sm100-or","errorCode":null,"errorMessage":"--enable-deepseek-v4-fp4-indexer requires SM100 or SM120 GPUs with DeepGEMM FP4 indexer support.","messagePattern":"--enable-deepseek-v4-fp4-indexer requires SM100 or SM120 GPUs with DeepGEMM FP4 indexer support\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/server_args.py","lineNumber":9078,"sourceCode":"        if cfg.enable_deterministic_inference:\n            envs.SGLANG_FLASHINFER_MOE_FUSED_FINALIZE.set(\"0\")\n        if cfg.debug_cuda_graph:\n            if not (is_cuda() or is_hip()):\n                logger.warning(\n                    \"--debug-cuda-graph is not supported on non CUDA/HIP devices. \"\n                    \"Disabling breakable CUDA graph.\"\n                )\n                self._declare(\"_handle_environment_variables\", debug_cuda_graph=False)\n            else:\n                envs.SGLANG_USE_BREAKABLE_CUDA_GRAPH.set(\"1\")\n                logger.warning(\n                    \"Debug mode for CUDA graph is enabled via breakable CUDA graph. \"\n                    \"All operations will run eagerly through the graph capture/replay path.\"\n                )\n        if cfg.enable_deepseek_v4_fp4_indexer and not (\n            is_sm100_supported() or is_sm120_supported()\n        ):\n            raise ValueError(\n                \"--enable-deepseek-v4-fp4-indexer requires SM100 or SM120 GPUs with \"\n                \"DeepGEMM FP4 indexer support.\"\n            )\n        # FP8 W_o GEMM needs DeepGEMM JIT. Enable exactly where the runtime can run\n        # it, mirroring the forward scale split: the ue8m0 path\n        # (DEEPGEMM_SCALE_UE8M0, true sm100, default on) or an sm90 opt-in\n        # fp32-scale path (use FP4 expert ckpt). Disable in every other case.\n        if is_cuda() and envs.SGLANG_OPT_FP8_WO_A_GEMM.get():\n            from sglang.srt.layers import deep_gemm_wrapper\n\n            sm = get_device_sm()\n            explicit = envs.SGLANG_OPT_FP8_WO_A_GEMM.is_set()\n            supported = deep_gemm_wrapper.DEEPGEMM_SCALE_UE8M0 or (\n                deep_gemm_wrapper.ENABLE_JIT_DEEPGEMM\n                and is_sm90_supported()\n                and explicit\n            )\n            if not supported and explicit:","sourceCodeStart":9060,"sourceCodeEnd":9096,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/server_args.py#L9060-L9096","documentation":"ServerArgs validation rejects --enable-deepseek-v4-fp4-indexer unless the GPU compute capability is SM100 (Blackwell B100/B200) or SM120 (Blackwell consumer). The DeepSeek V4 FP4 indexer path relies on DeepGEMM FP4 kernels that are compiled/enabled only for those architectures; on older SMs (Hopper, Ada, Ampere) it cannot run.","triggerScenarios":"Launching with --enable-deepseek-v4-fp4-indexer on a GPU whose compute capability is below SM100 (e.g. H100 sm90, A100 sm80, L40S sm89), where is_sm100_supported() and is_sm120_supported() both return False.","commonSituations":"Developing on H100/A100 clusters and reusing flags tuned for B200; mixing up FP8 (sm90-capable) and FP4 (sm100+) indexer requirements; drivers/runtime reporting unexpected compute capability in containers.","solutions":["Remove --enable-deepseek-v4-fp4-indexer on non-Blackwell hardware and use the supported FP8/default indexer path","Run the model on an SM100/SM120 GPU (B200, GB200, RTX Blackwell) if FP4 indexer is required","Confirm the detected compute capability via torch.cuda.get_device_capability() to rule out device-masking mistakes"],"exampleFix":"# before (H100)\npython -m sglang.launch_server --model deepseek-v4 --enable-deepseek-v4-fp4-indexer\n# after (H100)\npython -m sglang.launch_server --model deepseek-v4","handlingStrategy":"validation","validationCode":"def supports_fp4_indexer() -> bool:\n    if not torch.cuda.is_available():\n        return False\n    major, _ = torch.cuda.get_device_capability(0)\n    return major >= 100  # SM100/SM120 Blackwell\n\nflags = [\"--enable-deepseek-v4-fp4-indexer\"] if supports_fp4_indexer() else []","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin hardware-specific flags per cluster SKU in config management (B200 vs H100)","Assert torch.cuda.get_device_capability() matches expected SM before enabling FP4 paths","Wrap exotic quantization flags behind feature-detection helpers instead of hardcoding"],"tags":["sglang","deepseek","fp4","gpu-architecture","deepgemm"],"backgroundTag":"unsupported-gpu-architecture","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}