[Refactor] Use is_in_ci() utility in JIT kernel benchmarks (#17118)

This commit is contained in:
Zhengbo Wang
2026-01-25 20:40:47 +08:00
committed by GitHub
parent 64d809937a
commit fb61164f27
3 changed files with 6 additions and 15 deletions

View File

@@ -1,10 +1,10 @@
import os
from typing import Optional, Tuple
import torch
import triton
import triton.testing
from sglang.jit_kernel.benchmark.utils import is_in_ci
from sglang.jit_kernel.per_tensor_quant_fp8 import per_tensor_quant_fp8
try:
@@ -22,10 +22,7 @@ try:
except ImportError:
_is_hip = False
IS_CI = (
os.getenv("CI", "false").lower() == "true"
or os.getenv("GITHUB_ACTIONS", "false").lower() == "true"
)
IS_CI = is_in_ci()
fp8_type_ = torch.float8_e4m3fnuz if _is_hip else torch.float8_e4m3fn

View File

@@ -1,5 +1,4 @@
import itertools
import os
from typing import Tuple
import torch
@@ -7,13 +6,11 @@ import triton
import triton.testing
from sgl_kernel import rmsnorm
from sglang.jit_kernel.benchmark.utils import is_in_ci
from sglang.jit_kernel.norm import fused_inplace_qknorm
from sglang.srt.utils import get_current_device_stream_fast
IS_CI = (
os.getenv("CI", "false").lower() == "true"
or os.getenv("GITHUB_ACTIONS", "false").lower() == "true"
)
IS_CI = is_in_ci()
alt_stream = torch.cuda.Stream()

View File

@@ -1,5 +1,4 @@
import itertools
import os
import torch
import triton
@@ -7,12 +6,10 @@ import triton.testing
from flashinfer import rmsnorm as fi_rmsnorm
from sgl_kernel import rmsnorm
from sglang.jit_kernel.benchmark.utils import is_in_ci
from sglang.jit_kernel.norm import rmsnorm as jit_rmsnorm
IS_CI = (
os.getenv("CI", "false").lower() == "true"
or os.getenv("GITHUB_ACTIONS", "false").lower() == "true"
)
IS_CI = is_in_ci()
def sglang_aot_rmsnorm(