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
73fa2d49
Unverified
Commit
73fa2d49
authored
Aug 09, 2024
by
Liangsheng Yin
Committed by
GitHub
Aug 09, 2024
Browse files
Some warnings to crash when CI (#1009)
parent
61728884
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
python/sglang/srt/managers/tp_worker.py
python/sglang/srt/managers/tp_worker.py
+4
-0
No files found.
python/sglang/srt/managers/tp_worker.py
View file @
73fa2d49
...
...
@@ -17,6 +17,7 @@ limitations under the License.
import
logging
import
multiprocessing
import
os
import
pickle
import
time
import
warnings
...
...
@@ -285,6 +286,7 @@ class ModelTpServer:
)
def
check_memory
(
self
):
crash
=
os
.
getenv
(
"CI"
,
"false"
)
==
"true"
available_size
=
(
self
.
token_to_kv_pool
.
available_size
()
+
self
.
tree_cache
.
evictable_size
()
)
...
...
@@ -294,6 +296,7 @@ class ModelTpServer:
f
"available_size=
{
available_size
}
, max_total_num_tokens=
{
self
.
max_total_num_tokens
}
\n
"
"KV cache pool leak detected!"
)
exit
(
1
)
if
crash
else
None
if
len
(
self
.
req_to_token_pool
.
free_slots
)
!=
self
.
req_to_token_pool
.
size
:
warnings
.
warn
(
...
...
@@ -302,6 +305,7 @@ class ModelTpServer:
f
"total slots=
{
self
.
req_to_token_pool
.
size
}
\n
"
"Memory pool leak detected!"
)
exit
(
1
)
if
crash
else
None
def
handle_generate_request
(
self
,
...
...
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