refactor: consolidate is_in_ci (jit_kernel, sgl-kernel benchmarks, tests) (#21009)
This commit is contained in:
@@ -7,6 +7,8 @@ import torch
|
||||
import triton
|
||||
from sgl_kernel import int8_scaled_mm
|
||||
|
||||
from sglang.utils import is_in_ci
|
||||
|
||||
# Optional vLLM import
|
||||
try:
|
||||
from vllm._custom_ops import cutlass_scaled_mm as vllm_scaled_mm
|
||||
@@ -16,11 +18,7 @@ except ImportError:
|
||||
vllm_scaled_mm = None
|
||||
VLLM_AVAILABLE = False
|
||||
|
||||
# CI environment detection
|
||||
IS_CI = (
|
||||
os.getenv("CI", "false").lower() == "true"
|
||||
or os.getenv("GITHUB_ACTIONS", "false").lower() == "true"
|
||||
)
|
||||
IS_CI = is_in_ci()
|
||||
|
||||
|
||||
def to_int8(tensor: torch.Tensor) -> torch.Tensor:
|
||||
|
||||
Reference in New Issue
Block a user