move fla env check position (#11500)

This commit is contained in:
Yi Zhang
2025-10-12 21:40:45 +08:00
committed by GitHub
parent f49419061d
commit 4b15fa00f0
2 changed files with 2 additions and 3 deletions

View File

@@ -183,6 +183,7 @@ def attn_backend_wrapper(runner: "ModelRunner", full_attn_backend: "AttentionBac
), "hybrid_gdn can only be used with non-MLA models."
if cfg := runner.mambaish_config:
from sglang.srt.layers.attention.fla.utils import check_environments
from sglang.srt.layers.attention.hybrid_linear_attn_backend import (
GDNAttnBackend,
HybridLinearAttnBackend,
@@ -190,6 +191,7 @@ def attn_backend_wrapper(runner: "ModelRunner", full_attn_backend: "AttentionBac
)
from sglang.srt.utils import is_blackwell, is_npu
check_environments()
if runner.hybrid_gdn_config is not None:
if is_blackwell():
assert (

View File

@@ -58,9 +58,6 @@ def check_environments():
return None
check_environments()
def get_abs_err(x, y):
return (x.detach() - y.detach()).flatten().abs().max().item()