{"record":{"id":"0322f3e406f8ad48","repo":"sgl-project/sglang","slug":"unsupported-compute-capability-arch-supported","errorCode":null,"errorMessage":"Unsupported compute capability: {arch}. Supported: 8.x, 9.x, 10.x, 11.x, and architectures registered through the forward-host bridge","messagePattern":"Unsupported compute capability: (.+?)\\. Supported: 8\\.x, 9\\.x, 10\\.x, 11\\.x, and architectures registered through the forward-host bridge","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/kernels/ops/attention/flash_attn/cute/interface.py","lineNumber":1554,"sourceCode":"                head_dim=head_dim,\n                head_dim_v=head_dim_v,\n                qhead_per_kvhead=qhead_per_kvhead,\n                is_causal=causal,\n                is_local=local,\n                pack_gqa=pack_gqa,\n                config=arch_forward_config,\n                paged_kv=page_table is not None,\n                score_mod=score_mod,\n                mask_mod=mask_mod,\n                has_aux_tensors=aux_tensors is not None,\n                is_split_kv=is_split_kv,\n                has_bias=bias is not None,\n                bias_block_size=tile_bias,\n                rel_extent_padded=rel_extent_padded,\n                plan=arch_forward_plan,\n            )\n        else:\n            raise ValueError(\n                f\"Unsupported compute capability: {arch}. Supported: 8.x, 9.x, \"\n                \"10.x, 11.x, and architectures registered through the \"\n                \"forward-host bridge\"\n            )\n        # TODO: check @can_implement\n        if qv is not None:\n            _flash_attn_fwd.compile_cache[compile_key] = cute.compile(\n                fa_fwd,\n                q_tensor,\n                qv_tensor,\n                k_tensor,\n                v_tensor,\n                o_tensor,\n                lse_tensor,\n                softmax_scale,\n                p_tensor,\n                row_max_tensor,\n                cu_seqlens_q_tensor,","sourceCodeStart":1536,"sourceCodeEnd":1572,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/kernels/ops/attention/flash_attn/cute/interface.py#L1536-L1572","documentation":"The FA4 CuTe dispatcher only implements kernels for compute capabilities 8.x, 9.x, 10.x, 11.x (plus architectures registered via the forward-host bridge). Any other arch value falls through to this ValueError.","triggerScenarios":"Running _flash_attn_fwd on a GPU with an unrecognized compute capability — e.g. an old pre-Ampere card (7.5), an unregistered new arch, or a bogus arch integer derived from a malformed arch string/env override.","commonSituations":"Running on Turing (T4, 20xx) or older; using a torch/CUDA build that reports an unexpected arch; forcing an arch via env var/forward-host bridge that wasn't registered.","solutions":["Run on a supported GPU: Ampere (8.x), Hopper (9.x), Blackwell (10.x/11.x)","If on newer hardware, upgrade sglang/FA4 so the arch is registered or the forward-host bridge covers it","Verify torch.cuda.get_device_capability() reports an expected value; check for arch overrides"],"exampleFix":"# before: running on T4 (SM75)\nout = fa(q, k, v)\n# after: run on A100/H100/B200, or\nhost = get_forward_host(arch); register_forward_host(arch, host)  # custom backend","handlingStrategy":"fallback","validationCode":"major, minor = torch.cuda.get_device_capability()\nassert (8,9,10,11).__contains__(major) or custom_host_registered(major*10+minor), f'unsupported arch {major}.{minor}'","typeGuard":"def arch_supported(arch: int) -> bool: return arch // 10 in (8, 9, 10, 11)","tryCatchPattern":"try:\n    out = fa(q, k, v)\nexcept ValueError as e:\n    if 'Unsupported compute capability' in str(e):\n        out = fallback_attention(q, k, v)  # e.g. torch SDPA\n    else:\n        raise","preventionTips":["Check device compute capability at app startup and select attention backend accordingly","Keep a reference (torch SDPA) fallback path for unsupported GPUs"],"tags":["flash-attention","gpu-arch","unsupported-hardware","cuda"],"backgroundTag":"unsupported-hardware","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}