Skip to content

Commit c35f45f

Browse files
committed
fix unit test
1 parent 8034344 commit c35f45f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/sglang/test/test_block_fp8.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
w8a8_block_fp8_matmul,
1313
)
1414

15+
_is_cuda = torch.cuda.is_available() and torch.version.cuda
16+
1517

1618
# For test
1719
def native_per_token_group_quant_fp8(
@@ -209,9 +211,8 @@ def native_w8a8_block_fp8_matmul(A, B, As, Bs, block_size, output_dtype=torch.fl
209211

210212

211213
class TestW8A8BlockFP8Matmul(unittest.TestCase):
212-
_enable_jit_deepgemm = int(os.getenv("SGL_ENABLE_JIT_DEEPGEMM", "0"))
213214

214-
if not _enable_jit_deepgemm:
215+
if not _is_cuda:
215216
OUT_DTYPES = [torch.float32, torch.half, torch.bfloat16]
216217
M = [1, 7, 83, 512, 2048]
217218
NKs = [

0 commit comments

Comments
 (0)