{"record":{"id":"b4a2d7aa4c006a4e","repo":"sgl-project/sglang","slug":"cutedsl-mla-backend-only-supports-kv-cache-dtype-o","errorCode":null,"errorMessage":"CuteDSL MLA backend only supports kv-cache-dtype of fp8_e4m3, bf16, or auto.","messagePattern":"CuteDSL MLA backend only supports kv-cache-dtype of fp8_e4m3, bf16, or auto\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/arg_groups/overrides.py","lineNumber":2550,"sourceCode":"        view.attention_backend == \"cutedsl_mla\"\n        or view.decode_attention_backend == \"cutedsl_mla\"\n        or view.prefill_attention_backend == \"cutedsl_mla\"\n    ):\n        return {}\n    assert (\n        view.prefill_attention_backend != \"cutedsl_mla\"\n    ), \"CuteDSL MLA only supports decoding for now\"\n    if not is_sm100_supported():\n        raise ValueError(\n            \"CuteDSL MLA backend is only supported on Blackwell GPUs (SM100). Please use a different backend.\"\n        )\n    if view.kv_cache_dtype not in [\n        \"fp8_e4m3\",\n        \"bf16\",\n        \"bfloat16\",\n        \"auto\",\n    ]:\n        raise ValueError(\n            \"CuteDSL MLA backend only supports kv-cache-dtype of fp8_e4m3, bf16, or auto.\"\n        )\n    if view.prefill_attention_backend is None:\n        return {\"prefill_attention_backend\": \"trtllm_mla\"}\n    return {}\n\n\n@register_post_process\ndef _attention_backend_fa3_fp8_fallback(view: Any) -> dict:\n    if view.attention_backend == \"fa3\" and view.kv_cache_dtype == \"fp8_e5m2\":\n        logger.warning(\n            \"FlashAttention3 only supports fp8_e4m3 if using FP8; \"\n            \"Setting attention backend to triton.\"\n        )\n        return {\"attention_backend\": \"triton\"}\n    return {}\n\n","sourceCodeStart":2532,"sourceCodeEnd":2568,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/arg_groups/overrides.py#L2532-L2568","documentation":"The cutedsl_mla prefill backend only supports KV cache dtypes fp8_e4m3, bf16/bfloat16, or auto; its CUTLASS DSL kernels are not instantiated for other element types (e.g. fp16, fp8_e5m2, fp4).","triggerScenarios":"--prefill-attention-backend cutedsl_mla together with --kv-cache-dtype outside {fp8_e4m3, bf16, bfloat16, auto}.","commonSituations":"Porting an fp16 or e5m2 cache config from another backend onto cutedsl_mla prefill.","solutions":["Set --kv-cache-dtype fp8_e4m3 or bf16 (or omit it to use auto)","Use a different prefill backend if the dtype is a hard requirement"],"exampleFix":"# before\n--prefill-attention-backend cutedsl_mla --kv-cache-dtype fp8_e5m2\n# after\n--prefill-attention-backend cutedsl_mla --kv-cache-dtype fp8_e4m3","handlingStrategy":"validation","validationCode":"allowed = {\"fp8_e4m3\",\"bf16\",\"bfloat16\",\"auto\"}\nif args.prefill_attention_backend == \"cutedsl_mla\" and args.kv_cache_dtype not in allowed:\n    args.kv_cache_dtype = \"fp8_e4m3\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate dtype allowlists per backend in config linting"],"tags":["sglang","cutedsl","mla","kv-cache-dtype","config-validation"],"backgroundTag":"unsupported-argument-combination","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}