feat: add support for deepgemm sglang
This commit is contained in:
@@ -56,6 +56,7 @@ set_compile_mode = _wrap_op('set_compile_mode')
|
||||
get_compile_mode = _wrap_op('get_compile_mode')
|
||||
set_tc_util = _wrap_op('set_tc_util')
|
||||
get_tc_util = _wrap_op('get_tc_util')
|
||||
preload_kernels = _wrap_op('preload_kernels')
|
||||
|
||||
fp8_gemm_nt = _wrap_op('fp8_gemm_nt')
|
||||
fp8_gemm_nn = _wrap_op('fp8_gemm_nn')
|
||||
@@ -109,7 +110,7 @@ from .utils import *
|
||||
|
||||
def _verify_ops_loaded():
|
||||
expected_ops = [
|
||||
'init', 'set_num_sms', 'get_num_sms', 'set_tc_util', 'get_tc_util',
|
||||
'init', 'preload_kernels', 'set_num_sms', 'get_num_sms', 'set_tc_util', 'get_tc_util',
|
||||
'fp8_gemm_nt', 'fp8_gemm_nn', 'fp8_gemm_tn', 'fp8_gemm_tt',
|
||||
'm_grouped_fp8_gemm_nt_contiguous', 'm_grouped_fp8_gemm_nn_contiguous',
|
||||
'm_grouped_fp8_gemm_nt_masked', 'k_grouped_fp8_gemm_nt_contiguous',
|
||||
@@ -141,10 +142,10 @@ if __debug__:
|
||||
# Preload cached kernels if enabled via environment variable
|
||||
if os.environ.get('DG_PRELOAD_KERNELS', '0') == '1':
|
||||
try:
|
||||
deep_gemm_cpp.preload_kernels()
|
||||
preload_kernels()
|
||||
except Exception as e:
|
||||
# Preloading failure should not block initialization
|
||||
import warnings
|
||||
warnings.warn(f"Failed to preload DeepGEMM kernels: {e}")
|
||||
|
||||
__version__ = '2.1.2'
|
||||
__version__ = '2.2.1'
|
||||
Reference in New Issue
Block a user