[Kernel Slimming] Remove sgl-kernel AOT marlin kernels (#19241)

This commit is contained in:
Xiaoyu Zhang
2026-02-25 10:08:22 +08:00
committed by GitHub
parent 3b89302277
commit 9dff933164
13 changed files with 0 additions and 2136 deletions

View File

@@ -1,6 +1,5 @@
import pytest
import torch
from sgl_kernel import gptq_marlin_gemm as aot_gptq_marlin_gemm
from sgl_kernel.scalar_type import scalar_types
from sglang.jit_kernel.gptq_marlin import gptq_marlin_gemm
@@ -86,26 +85,6 @@ def test_gptq_marlin_gemm(
is_zp_float=False,
)
aot_output = aot_gptq_marlin_gemm(
a_input,
None,
marlin_q_w,
marlin_s,
marlin_s2,
marlin_zp,
g_idx,
sort_indices,
workspace,
quant_type,
a_input.shape[0],
b_weight.shape[1],
a_input.shape[1],
is_k_full=True,
use_atomic_add=False,
use_fp32_reduce=False,
is_zp_float=False,
)
output_ref = torch.matmul(a_input, w_ref)
torch.cuda.synchronize()
@@ -115,9 +94,6 @@ def test_gptq_marlin_gemm(
)
assert max_diff < 0.04
# JIT kernel should produce bitwise identical results to AOT kernel
torch.testing.assert_close(output, aot_output, rtol=0, atol=0)
if __name__ == "__main__":
import subprocess

View File

@@ -1,6 +1,5 @@
import pytest
import torch
from sgl_kernel import gptq_marlin_repack as aot_gptq_marlin_repack
from sgl_kernel.scalar_type import scalar_types
from sglang.jit_kernel.gptq_marlin_repack import gptq_marlin_repack
@@ -81,19 +80,11 @@ def test_gptq_marlin_repack(
q_w_gptq, sort_indices, size_k, size_n, quant_type.size_bits
)
# Run AOT repack kernel
aot_output = aot_gptq_marlin_repack(
q_w_gptq, sort_indices, size_k, size_n, quant_type.size_bits
)
torch.cuda.synchronize()
# JIT should match the reference (computed from CPU marlin_weights)
torch.testing.assert_close(jit_output, q_w_marlin_ref)
# JIT should produce bitwise identical results to AOT
torch.testing.assert_close(jit_output, aot_output, rtol=0, atol=0)
if __name__ == "__main__":
import subprocess