[Fix] Set fa3 as default MHA backend on Hopper (#17425)
This commit is contained in:
@@ -45,7 +45,6 @@ from sglang.srt.utils.common import (
|
|||||||
get_quantization_config,
|
get_quantization_config,
|
||||||
is_blackwell_supported,
|
is_blackwell_supported,
|
||||||
is_cuda,
|
is_cuda,
|
||||||
is_fa3_default_architecture,
|
|
||||||
is_flashinfer_available,
|
is_flashinfer_available,
|
||||||
is_hip,
|
is_hip,
|
||||||
is_hopper_with_cuda_12_3,
|
is_hopper_with_cuda_12_3,
|
||||||
@@ -1630,11 +1629,10 @@ class ServerArgs:
|
|||||||
|
|
||||||
if not use_mla_backend:
|
if not use_mla_backend:
|
||||||
# MHA architecture
|
# MHA architecture
|
||||||
if (
|
if is_hopper_with_cuda_12_3() and is_no_spec_infer_or_topk_one(self):
|
||||||
is_hopper_with_cuda_12_3()
|
# Note: flashinfer 0.6.1 caused performance regression on Hopper attention kernel
|
||||||
and is_no_spec_infer_or_topk_one(self)
|
# Before the kernel is fixed, we choose fa3 as the default backend on Hopper MHA
|
||||||
and is_fa3_default_architecture(self.model_config.hf_config)
|
# ref: https://github.com/sgl-project/sglang/issues/17411
|
||||||
):
|
|
||||||
self.attention_backend = "fa3"
|
self.attention_backend = "fa3"
|
||||||
elif (
|
elif (
|
||||||
is_sm100_supported()
|
is_sm100_supported()
|
||||||
|
|||||||
Reference in New Issue
Block a user