[Clean] Remove deprecated environs (#21536)
This commit is contained in:
@@ -337,9 +337,7 @@ class Envs:
|
||||
|
||||
# Flashinfer
|
||||
SGLANG_IS_FLASHINFER_AVAILABLE = EnvBool(True)
|
||||
SGLANG_ENABLE_FLASHINFER_FP8_GEMM = EnvBool(False)
|
||||
# Default to the pick from flashinfer
|
||||
SGLANG_FLASHINFER_FP4_GEMM_BACKEND = EnvStr("")
|
||||
SGLANG_FLASHINFER_WORKSPACE_SIZE = EnvInt(384 * 1024 * 1024)
|
||||
# TODO(mmangkad): Remove this once the FlashInfer unified allreduce-fusion
|
||||
# transport issue on GB200/GB300 platforms is fixed and verified resolved.
|
||||
@@ -408,7 +406,6 @@ class Envs:
|
||||
DISABLE_OPENAPI_DOC = EnvBool(False)
|
||||
SGLANG_ENABLE_TORCH_INFERENCE_MODE = EnvBool(False)
|
||||
SGLANG_IS_FIRST_RANK_ON_NODE = EnvBool(True)
|
||||
SGLANG_SUPPORT_CUTLASS_BLOCK_FP8 = EnvBool(False)
|
||||
SGLANG_SYNC_TOKEN_IDS_ACROSS_TP = EnvBool(False)
|
||||
SGLANG_ENABLE_COLOCATED_BATCH_GEN = EnvBool(False)
|
||||
|
||||
@@ -548,9 +545,6 @@ def _warn_deprecated_env_to_cli_flag(env_name: str, suggestion: str):
|
||||
|
||||
def _convert_SGL_to_SGLANG():
|
||||
_print_deprecated_env("SGLANG_LOG_GC", "SGLANG_GC_LOG")
|
||||
_print_deprecated_env(
|
||||
"SGLANG_ENABLE_FLASHINFER_FP8_GEMM", "SGLANG_ENABLE_FLASHINFER_GEMM"
|
||||
)
|
||||
_print_deprecated_env(
|
||||
"SGLANG_MOE_NVFP4_DISPATCH", "SGLANG_CUTEDSL_MOE_NVFP4_DISPATCH"
|
||||
)
|
||||
@@ -581,23 +575,6 @@ def _convert_SGL_to_SGLANG():
|
||||
|
||||
|
||||
_convert_SGL_to_SGLANG()
|
||||
|
||||
_warn_deprecated_env_to_cli_flag(
|
||||
"SGLANG_ENABLE_FLASHINFER_FP8_GEMM",
|
||||
"It will be completely removed in 0.5.7. Please use '--fp8-gemm-backend=flashinfer_trtllm' instead.",
|
||||
)
|
||||
_warn_deprecated_env_to_cli_flag(
|
||||
"SGLANG_ENABLE_FLASHINFER_GEMM",
|
||||
"It will be completely removed in 0.5.7. Please use '--fp8-gemm-backend=flashinfer_trtllm' instead.",
|
||||
)
|
||||
_warn_deprecated_env_to_cli_flag(
|
||||
"SGLANG_SUPPORT_CUTLASS_BLOCK_FP8",
|
||||
"It will be completely removed in 0.5.7. Please use '--fp8-gemm-backend=cutlass' instead.",
|
||||
)
|
||||
_warn_deprecated_env_to_cli_flag(
|
||||
"SGLANG_FLASHINFER_FP4_GEMM_BACKEND",
|
||||
"It will be completely removed in 0.5.9. Please use '--fp4-gemm-backend' instead.",
|
||||
)
|
||||
_warn_deprecated_env_to_cli_flag(
|
||||
"SGLANG_SCHEDULER_DECREASE_PREFILL_IDLE",
|
||||
"Please use '--enable-prefill-delayer' instead.",
|
||||
|
||||
@@ -4,7 +4,6 @@ import logging
|
||||
from enum import Enum
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.utils.common import is_sm120_supported
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -56,26 +55,6 @@ def initialize_fp4_gemm_config(server_args: ServerArgs) -> None:
|
||||
global FP4_GEMM_RUNNER_BACKEND
|
||||
|
||||
backend = server_args.fp4_gemm_runner_backend
|
||||
|
||||
# Handle deprecated env var for backward compatibility
|
||||
# TODO: Remove this in a future version
|
||||
if envs.SGLANG_FLASHINFER_FP4_GEMM_BACKEND.is_set():
|
||||
env_backend = envs.SGLANG_FLASHINFER_FP4_GEMM_BACKEND.get()
|
||||
if backend == "auto":
|
||||
logger.warning(
|
||||
"SGLANG_FLASHINFER_FP4_GEMM_BACKEND is deprecated. "
|
||||
f"Please use '--fp4-gemm-backend={env_backend}' instead."
|
||||
)
|
||||
if not env_backend.startswith("flashinfer_"):
|
||||
env_backend = "flashinfer_" + env_backend
|
||||
backend = env_backend
|
||||
else:
|
||||
logger.warning(
|
||||
f"FP4 GEMM backend set to '{backend}' via --fp4-gemm-backend overrides "
|
||||
"environment variable SGLANG_FLASHINFER_FP4_GEMM_BACKEND. "
|
||||
"Using server argument value."
|
||||
)
|
||||
|
||||
if backend == "auto":
|
||||
if is_sm120_supported():
|
||||
# flashinfer_cutlass produces NaN in dense MLP layers with
|
||||
|
||||
@@ -7,7 +7,6 @@ from typing import TYPE_CHECKING, Callable, List, Optional, Tuple
|
||||
|
||||
import torch
|
||||
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.layers import deep_gemm_wrapper
|
||||
from sglang.srt.layers.quantization.fp8_kernel import sglang_per_token_group_quant_fp8
|
||||
from sglang.srt.layers.quantization.mxfp4_tensor import MXFP4QuantizeUtil
|
||||
@@ -453,25 +452,6 @@ def initialize_fp8_gemm_config(server_args: ServerArgs) -> None:
|
||||
global FP8_GEMM_RUNNER_BACKEND
|
||||
|
||||
backend = server_args.fp8_gemm_runner_backend
|
||||
|
||||
# TODO(brayden): Remove env-based overrides in v0.5.7, they will be fully removed in v0.5.7.
|
||||
# Only check environment variables when the server args is not set, server args should take priority.
|
||||
if backend == "auto":
|
||||
if envs.SGLANG_ENABLE_FLASHINFER_FP8_GEMM.get():
|
||||
backend = "flashinfer_trtllm"
|
||||
elif envs.SGLANG_SUPPORT_CUTLASS_BLOCK_FP8.get():
|
||||
backend = "cutlass"
|
||||
else:
|
||||
if (
|
||||
envs.SGLANG_ENABLE_FLASHINFER_FP8_GEMM.get()
|
||||
or envs.SGLANG_SUPPORT_CUTLASS_BLOCK_FP8.get()
|
||||
):
|
||||
logger.warning(
|
||||
f"FP8 GEMM backend set to '{backend}' via --fp8-gemm-backend overrides "
|
||||
"environment variables SGLANG_ENABLE_FLASHINFER_FP8_GEMM and "
|
||||
"SGLANG_SUPPORT_CUTLASS_BLOCK_FP8. Using server argument value."
|
||||
)
|
||||
|
||||
if backend == "auto" and is_sm120_supported():
|
||||
# TODO(brayden): Verify if CUTLASS can be set by default once SwapAB is supported
|
||||
backend = "triton"
|
||||
|
||||
@@ -4632,9 +4632,7 @@ class ServerArgs:
|
||||
"'flashinfer_deepgemm' (Hopper SM90 only; uses swapAB optimization for small M dimensions in decoding), "
|
||||
"'cutlass' (optimal for Hopper/Blackwell GPUs and high-throughput), "
|
||||
"'triton' (fallback, widely compatible), "
|
||||
"'aiter' (ROCm only). "
|
||||
"NOTE: This replaces the deprecated environment variables "
|
||||
"SGLANG_ENABLE_FLASHINFER_FP8_GEMM and SGLANG_SUPPORT_CUTLASS_BLOCK_FP8.",
|
||||
"'aiter' (ROCm only). ",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--fp4-gemm-backend",
|
||||
@@ -4646,9 +4644,7 @@ class ServerArgs:
|
||||
"Options: 'auto' (default; selects flashinfer_cudnn on SM120, flashinfer_cutlass otherwise), "
|
||||
"'flashinfer_cutlass' (CUTLASS backend), "
|
||||
"'flashinfer_cudnn' (FlashInfer cuDNN backend, optimal on CUDA 13+ with cuDNN 9.15+), "
|
||||
"'flashinfer_trtllm' (FlashInfer TensorRT-LLM backend, requires different weight preparation with shuffling). "
|
||||
"NOTE: This replaces the deprecated environment variable "
|
||||
"SGLANG_FLASHINFER_FP4_GEMM_BACKEND.",
|
||||
"'flashinfer_trtllm' (FlashInfer TensorRT-LLM backend, requires different weight preparation with shuffling). ",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--disable-flashinfer-autotune",
|
||||
|
||||
Reference in New Issue
Block a user