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
6fd4816d
"vscode:/vscode.git/clone" did not exist on "f7c78114d7271154ef45391a87aa43f6479f8713"
Unverified
Commit
6fd4816d
authored
Sep 19, 2025
by
Zaili Wang
Committed by
GitHub
Sep 18, 2025
Browse files
Fix sgl_kernel import failure on devices other than CUDA (#10610)
parent
1344ebc8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
docs/platforms/cpu_server.md
docs/platforms/cpu_server.md
+1
-1
sgl-kernel/python/sgl_kernel/__init__.py
sgl-kernel/python/sgl_kernel/__init__.py
+1
-1
No files found.
docs/platforms/cpu_server.md
View file @
6fd4816d
...
@@ -63,7 +63,7 @@ is required to enable SGLang service with CPU engine.
...
@@ -63,7 +63,7 @@ is required to enable SGLang service with CPU engine.
conda create
-n
sgl-cpu
python
=
3.12
-y
conda create
-n
sgl-cpu
python
=
3.12
-y
conda activate sgl-cpu
conda activate sgl-cpu
#
Optional:
Set PyTorch CPU as primary pip install channel to avoid installing
CUDA version
# Set PyTorch CPU as primary pip install channel to avoid installing
the larger CUDA-enabled version and prevent potential runtime issues.
pip config
set
global.index-url https://download.pytorch.org/whl/cpu
pip config
set
global.index-url https://download.pytorch.org/whl/cpu
pip config
set
global.extra-index-url https://pypi.org/simple
pip config
set
global.extra-index-url https://pypi.org/simple
...
...
sgl-kernel/python/sgl_kernel/__init__.py
View file @
6fd4816d
...
@@ -23,7 +23,7 @@ def _find_cuda_home():
...
@@ -23,7 +23,7 @@ def _find_cuda_home():
return
cuda_home
return
cuda_home
if
torch
.
version
.
hip
is
None
:
if
torch
.
version
.
cuda
is
not
None
:
cuda_home
=
Path
(
_find_cuda_home
())
cuda_home
=
Path
(
_find_cuda_home
())
if
(
cuda_home
/
"lib"
).
is_dir
():
if
(
cuda_home
/
"lib"
).
is_dir
():
...
...
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