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
cfc9f9ab
Unverified
Commit
cfc9f9ab
authored
May 16, 2025
by
Yi Liu
Committed by
GitHub
May 15, 2025
Browse files
Fix gpu mem check on CPU (#6317)
Signed-off-by:
yiliu30
<
yi4.liu@intel.com
>
parent
fb4959b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+2
-2
No files found.
python/sglang/srt/server_args.py
View file @
cfc9f9ab
...
...
@@ -229,7 +229,7 @@ class ServerArgs:
# Set mem fraction static, which depends on the tensor parallelism size
if
self
.
mem_fraction_static
is
None
:
parallel_size
=
self
.
tp_size
*
self
.
pp_size
if
gpu_mem
<=
81920
:
if
gpu_mem
is
not
None
and
gpu_mem
<=
81920
:
if
parallel_size
>=
16
:
self
.
mem_fraction_static
=
0.79
elif
parallel_size
>=
8
:
...
...
@@ -242,7 +242,7 @@ class ServerArgs:
self
.
mem_fraction_static
=
0.88
else
:
self
.
mem_fraction_static
=
0.88
if
gpu_mem
>
96
*
1024
:
if
gpu_mem
is
not
None
and
gpu_mem
>
96
*
1024
:
mem_fraction
=
self
.
mem_fraction_static
self
.
mem_fraction_static
=
min
(
mem_fraction
+
48
*
1024
*
(
1
-
mem_fraction
)
/
gpu_mem
,
...
...
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