Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
844e2f22
Unverified
Commit
844e2f22
authored
May 19, 2025
by
lukec
Committed by
GitHub
May 19, 2025
Browse files
Fix nodeepgemm init (#6417)
parent
4f39bcf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
python/sglang/srt/layers/quantization/deep_gemm.py
python/sglang/srt/layers/quantization/deep_gemm.py
+5
-3
No files found.
python/sglang/srt/layers/quantization/deep_gemm.py
View file @
844e2f22
...
...
@@ -11,8 +11,10 @@ from tqdm.contrib.concurrent import thread_map
from
sglang.srt.server_args
import
ServerArgs
from
sglang.srt.utils
import
get_bool_env_var
,
get_device_sm
,
get_int_env_var
,
is_cuda
logger
=
logging
.
getLogger
(
__name__
)
_ENABLE_JIT_DEEPGEMM
=
False
if
is_cuda
():
try
:
import
deep_gemm
from
deep_gemm
import
get_num_sms
from
deep_gemm.jit.compiler
import
get_nvcc_compiler
...
...
@@ -24,14 +26,14 @@ if is_cuda():
if
sm_version
==
90
:
if
get_bool_env_var
(
"SGL_ENABLE_JIT_DEEPGEMM"
,
default
=
"true"
):
_ENABLE_JIT_DEEPGEMM
=
True
except
ImportError
:
logger
.
warning
(
"Failed to import deepgemm, disable _ENABLE_JIT_DEEPGEMM."
)
def
get_enable_jit_deepgemm
():
return
_ENABLE_JIT_DEEPGEMM
logger
=
logging
.
getLogger
(
__name__
)
_BUILTIN_M_LIST
=
list
(
range
(
1
,
1024
*
16
+
1
))
_ENABLE_JIT_DEEPGEMM_PRECOMPILE
=
get_bool_env_var
(
"SGL_JIT_DEEPGEMM_PRECOMPILE"
,
"true"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment