config: the lazy imports that buy nothing become eager (#36975)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Cheng Wan
2026-08-29 04:21:54 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent f0d621cfa6
commit 4d53767b09
38 changed files with 173 additions and 271 deletions
+2 -2
View File
@@ -864,12 +864,12 @@ class RuntimeContext:
name (the keyed-lazy pattern of the persistent buffers). Creation is
a driver call that must stay outside cuda-graph capture — call sites
lease their stream at init/warmup time."""
from sglang.srt.arg_groups.overrides import resolution_result
stream = self.resources.streams.get(name)
if stream is None:
import torch
from sglang.srt.arg_groups.overrides import resolution_result
device = (
resolution_result(self._server_args, "device")
if self._server_args