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
7e944246
Unverified
Commit
7e944246
authored
Apr 27, 2025
by
Kebe
Committed by
GitHub
Apr 26, 2025
Browse files
Add memory_saver check (#4986)
Signed-off-by:
Kebe
<
mail@kebe7jun.com
>
parent
a086a113
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+12
-0
No files found.
python/sglang/srt/server_args.py
View file @
7e944246
...
@@ -381,6 +381,18 @@ class ServerArgs:
...
@@ -381,6 +381,18 @@ class ServerArgs:
self
.
disable_radix_cache
=
True
self
.
disable_radix_cache
=
True
logger
.
warning
(
"KV cache is forced as chunk cache for decode server"
)
logger
.
warning
(
"KV cache is forced as chunk cache for decode server"
)
if
self
.
enable_memory_saver
:
try
:
import
torch_memory_saver
except
ImportError
:
logger
.
warning
(
"enable_memory_saver is enabled, but "
"torch-memory-saver is not installed. Please install it "
"via `pip3 uninstall torch-memory-saver`. "
"For normal operation, it will be disabled."
)
raise
os
.
environ
[
"SGLANG_ENABLE_TORCH_COMPILE"
]
=
(
os
.
environ
[
"SGLANG_ENABLE_TORCH_COMPILE"
]
=
(
"1"
if
self
.
enable_torch_compile
else
"0"
"1"
if
self
.
enable_torch_compile
else
"0"
)
)
...
...
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