Unverified Commit 6fd4816d authored by Zaili Wang's avatar Zaili Wang Committed by GitHub
Browse files

Fix sgl_kernel import failure on devices other than CUDA (#10610)

parent 1344ebc8
...@@ -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
......
...@@ -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():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment