diff --git a/python/pyproject_cpu.toml b/python/pyproject_cpu.toml index 38ae6490d..e28e6d99b 100644 --- a/python/pyproject_cpu.toml +++ b/python/pyproject_cpu.toml @@ -97,6 +97,9 @@ dev = ["sglang[test]"] "Homepage" = "https://github.com/sgl-project/sglang" "Bug Tracker" = "https://github.com/sgl-project/sglang/issues" +[project.scripts] +sglang = "sglang.cli.main:main" + [tool.setuptools.package-data] "sglang" = [ "srt/**/*", diff --git a/python/pyproject_xpu.toml b/python/pyproject_xpu.toml index 0f9dc3466..c9c56e1c2 100644 --- a/python/pyproject_xpu.toml +++ b/python/pyproject_xpu.toml @@ -97,6 +97,9 @@ dev = ["sglang[test]"] "Homepage" = "https://github.com/sgl-project/sglang" "Bug Tracker" = "https://github.com/sgl-project/sglang/issues" +[project.scripts] +sglang = "sglang.cli.main:main" + [tool.setuptools.package-data] "sglang" = [ "srt/**/*", diff --git a/python/sglang/srt/server_args.py b/python/sglang/srt/server_args.py index 07630c9f1..0b8c1b280 100644 --- a/python/sglang/srt/server_args.py +++ b/python/sglang/srt/server_args.py @@ -46,6 +46,7 @@ from sglang.srt.utils.common import ( get_int_env_var, get_quantization_config, is_blackwell_supported, + is_cpu, is_cuda, is_flashinfer_available, is_hip, @@ -926,8 +927,8 @@ class ServerArgs: # 5. Pipeline parallelism if self.pp_size > 1: self.disable_piecewise_cuda_graph = True - # 6. Non-CUDA hardware (AMD, NPU, etc.) - if is_hip() or is_npu(): + # 6. Non-CUDA hardware (AMD, NPU, CPU, etc.) + if is_hip() or is_npu() or is_cpu(): self.disable_piecewise_cuda_graph = True # 7. MoE A2A backend if self.moe_a2a_backend != "none":