From 4d2fdd14acb69747655ed5bbaea8e47c839946eb Mon Sep 17 00:00:00 2001 From: laoyao0822 Date: Tue, 9 Jun 2026 00:45:54 +0800 Subject: [PATCH] Keep kernel guard aligned with deployment env The SYH DeepGEMM pick raised the global sglang-kernel runtime guard to 0.4.3, but this deployment and pyproject intentionally use sglang-kernel 0.4.0 while DeepGEMM compatibility is handled by the deep_gemm_wrapper import/call path and tai-provided runtime pieces. A global 0.4.3 guard blocks startup before those targeted checks can run.\n\nConstraint: Do not update pyproject.toml because local and remote environments intentionally differ.\nRejected: pip install sglang-kernel --force-reinstall | mutates the remote environment and conflicts with the pinned project environment.\nRejected: keep a global 0.4.3 guard | blocks the current CUDA deployment despite pyproject requiring 0.4.0.\nConfidence: medium\nScope-risk: narrow\nDirective: Do not raise this global guard without also updating the environment contract and pyproject together; feature-specific wheel/API checks belong near their import/call sites.\nTested: local py_compile for python/sglang/srt/entrypoints/engine.py; remote py_compile in g0034 container; remote installed sglang-kernel version confirmed as 0.4.0.\nNot-tested: full launch_server restart after the guard change. --- python/sglang/srt/entrypoints/engine.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python/sglang/srt/entrypoints/engine.py b/python/sglang/srt/entrypoints/engine.py index 8e7b72b33..a90a2428f 100644 --- a/python/sglang/srt/entrypoints/engine.py +++ b/python/sglang/srt/entrypoints/engine.py @@ -1141,13 +1141,14 @@ def _set_envs_and_config(server_args: ServerArgs): "at https://docs.flashinfer.ai/installation.html.", ) if _is_cuda: - # 0.4.3 is the first sgl-kernel that ships DeepGEMM as the separate - # sgl-deep-gemm wheel; our migrated deep_gemm call paths target that wheel's - # API and would misbehave against the older bundled DeepGEMM. [[WI-2026-06-07-001]] + # Keep this guard aligned with pyproject/runtime images. DeepGEMM + # compatibility is validated by the deep_gemm_wrapper import/call + # path because our deployments may use an external/tai-provided + # DeepGEMM stack while keeping sglang-kernel==0.4.0. assert_pkg_version( "sglang-kernel", - "0.4.3", - "Please reinstall the latest version with `pip install sglang-kernel --force-reinstall`", + "0.4.0", + "Please reinstall the sglang-kernel version required by this environment.", ) # Signal handlers can only be registered from the main thread.