Add env var to disable FA4 warmup (#12430)

This commit is contained in:
yinghui
2025-10-31 12:25:00 -07:00
committed by GitHub
parent f7f9e41b36
commit a80bcb5a68
2 changed files with 11 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import copy
import gc
import logging
import math
import os
from typing import Callable, Optional, Tuple
logger = logging.getLogger(__name__)
@@ -416,6 +417,15 @@ def warmup_flash_attn(f):
- Executes sequentially to minimize peak GPU mem
- Does not modify user tensors (clones)
"""
disable_warmup = os.getenv("SGLANG_DISABLE_FA4_WARMUP", "").lower() in (
"1",
"true",
"yes",
"on",
)
if disable_warmup:
return f
done = False
def _clone_args(args, kwargs):