Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
9c485d9e
Unverified
Commit
9c485d9e
authored
Jan 21, 2025
by
Jani Monoses
Committed by
GitHub
Jan 21, 2025
Browse files
[Core] Free CPU pinned memory on environment cleanup (#10477)
parent
fa9ee081
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
vllm/distributed/parallel_state.py
vllm/distributed/parallel_state.py
+5
-0
No files found.
vllm/distributed/parallel_state.py
View file @
9c485d9e
...
...
@@ -1183,6 +1183,11 @@ def cleanup_dist_env_and_memory(shutdown_ray: bool = False):
from
vllm.platforms
import
current_platform
if
not
current_platform
.
is_cpu
():
torch
.
cuda
.
empty_cache
()
try
:
torch
.
_C
.
_host_emptyCache
()
except
AttributeError
:
logger
.
warning
(
"torch._C._host_emptyCache() only available in Pytorch >=2.5"
)
def
in_the_same_node_as
(
pg
:
Union
[
ProcessGroup
,
StatelessProcessGroup
],
...
...
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