Revert "[Bugfix] Temporarily skip TRTLLM attention on (G)B300 (SM103) to avoid high-concurrency hang" (#22098)

This commit is contained in:
Baizhou Zhang
2026-04-04 02:17:19 -07:00
committed by GitHub
parent 46bf19cdab
commit bf984ae65d
3 changed files with 34 additions and 85 deletions
+11 -27
View File
@@ -57,7 +57,6 @@ from sglang.srt.utils.common import (
is_remote_url,
is_sm90_supported,
is_sm100_supported,
is_sm103_supported,
is_sm120_supported,
is_triton_kernels_available,
is_xpu,
@@ -1464,13 +1463,8 @@ class ServerArgs:
self.nsa_decode_backend = "tilelang"
elif kv_cache_dtype == "fp8_e4m3":
if major >= 10:
# TODO: Set sm103 default to trtllm after the hanging bug is fixed (#21904)
if is_sm103_supported():
self.nsa_prefill_backend = "flashmla_sparse"
self.nsa_decode_backend = "flashmla_kv"
else:
self.nsa_prefill_backend = "trtllm"
self.nsa_decode_backend = "trtllm"
self.nsa_prefill_backend = "trtllm"
self.nsa_decode_backend = "trtllm"
else:
# flashmla_auto dispatches to flashmla_sparse/flashmla_kv based on hardware and heuristics
if not user_set_prefill:
@@ -1605,7 +1599,7 @@ class ServerArgs:
if not self.disable_piecewise_cuda_graph:
logger.info("Piecewise CUDA graph is enabled, use MLA for prefill.")
if is_sm100_supported() and not is_sm103_supported():
if is_sm100_supported():
if (
self.attention_backend is None
and self.prefill_attention_backend is None
@@ -1703,7 +1697,7 @@ class ServerArgs:
elif model_arch in ["GptOssForCausalLM"]:
# Set attention backend for GPT-OSS
if self.is_attention_backend_not_set():
if is_sm100_supported() and not is_sm103_supported():
if is_sm100_supported():
self.attention_backend = "trtllm_mha"
elif is_sm90_supported():
self.attention_backend = "fa3"
@@ -1841,7 +1835,7 @@ class ServerArgs:
elif "Llama4" in model_arch and self.device != "cpu":
# Auto-select attention backend for Llama4 if not specified
if self.attention_backend is None:
if is_sm100_supported() and not is_sm103_supported():
if is_sm100_supported():
self.attention_backend, platform = "trtllm_mha", "sm100"
elif is_sm90_supported():
self.attention_backend, platform = "fa3", "sm90"
@@ -1900,7 +1894,7 @@ class ServerArgs:
self.disable_hybrid_swa_memory = True
if self.attention_backend is None:
if is_cuda() and is_sm100_supported() and not is_sm103_supported():
if is_cuda() and is_sm100_supported():
self.attention_backend = "trtllm_mha"
elif is_cuda() and get_device_sm() >= 80:
self.attention_backend = "fa3"
@@ -1986,7 +1980,7 @@ class ServerArgs:
"Qwen3_5ForConditionalGeneration",
]:
sm100_default_attn_backend = "triton"
if is_sm100_supported() and not is_sm103_supported():
if is_sm100_supported():
# trtllm_mha requires speculative_eagle_topk == 1 and page_size > 1.
# _get_default_attn_backend handles the eagle_topk check.
# There is only one case where page_size=1 is required,
@@ -2135,7 +2129,6 @@ class ServerArgs:
):
if (
is_sm100_supported()
and not is_sm103_supported()
and self.attention_backend is None
and sm100_default_attention_backend is not None
):
@@ -2250,7 +2243,6 @@ class ServerArgs:
return "fa3"
elif (
is_sm100_supported()
and not is_sm103_supported()
and is_no_spec_infer_or_topk_one(self)
and (
self.speculative_algorithm is None
@@ -2378,13 +2370,9 @@ class ServerArgs:
if self.prefill_attention_backend is not None
else self.attention_backend
)
if prefill_backend == "trtllm_mha" and (
not is_sm100_supported() or is_sm103_supported()
):
if prefill_backend == "trtllm_mha" and not is_sm100_supported():
raise ValueError(
"TRTLLM MHA backend for prefill is only supported on SM100. "
"(G)B300 (SM103) is temporarily disabled due to hangs at high concurrency. "
"Please use a different prefill backend."
"TRTLLM MHA backend for prefill is only supported on Blackwell GPUs (SM100). Please use a different prefill backend."
)
# Check decode backend
@@ -2394,14 +2382,10 @@ class ServerArgs:
else self.attention_backend
)
if decode_backend == "trtllm_mha" and not (
is_sm90_supported()
or (is_sm100_supported() and not is_sm103_supported())
or is_sm120_supported()
is_sm90_supported() or is_sm100_supported() or is_sm120_supported()
):
raise ValueError(
"TRTLLM MHA backend for decode is only supported on Hopper (SM90), SM100, and SM120 GPUs. "
"(G)B300 (SM103) is temporarily disabled due to hangs at high concurrency. "
"Please use a different decode backend."
"TRTLLM MHA backend for decode is only supported on Hopper (SM90), Blackwell (SM100) and (SM120) GPUs. Please use a different decode backend."
)
if self.page_size not in [16, 32, 64]: