Replace os.environ in layernorm.py (#10684)

This commit is contained in:
Baizhou Zhang
2025-09-20 00:20:33 -07:00
committed by GitHub
parent bd7eb0205a
commit f111649580

View File

@@ -14,7 +14,6 @@
"""Fused operators for normalization layers."""
import logging
import os
from typing import Optional, Tuple, Union
import torch
@@ -81,7 +80,7 @@ class RMSNorm(CustomOp):
)
if _use_aiter:
self._forward_method = self.forward_aiter
if os.environ["SGLANG_ENABLE_DETERMINISTIC_INFERENCE"] == "1":
if get_bool_env_var("SGLANG_ENABLE_DETERMINISTIC_INFERENCE"):
self._forward_method = self.forward_native
def forward_cuda(