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
71c4b405
Unverified
Commit
71c4b405
authored
Mar 04, 2025
by
youkaichao
Committed by
GitHub
Mar 04, 2025
Browse files
[sleep mode] error out with expandable_segments (#14189)
Signed-off-by:
youkaichao
<
youkaichao@gmail.com
>
parent
ac65bc92
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
vllm/device_allocator/cumem.py
vllm/device_allocator/cumem.py
+7
-0
No files found.
vllm/device_allocator/cumem.py
View file @
71c4b405
...
...
@@ -8,6 +8,7 @@
# not sure why, they are created from a different context.
# the only successful approach is to call cuda driver API in C.
import
dataclasses
import
os
from
contextlib
import
contextmanager
from
typing
import
Any
,
Callable
,
Dict
,
Optional
,
Tuple
,
Union
...
...
@@ -140,6 +141,12 @@ class CuMemAllocator:
return
CuMemAllocator
.
instance
def
__init__
(
self
):
conf
=
os
.
environ
.
get
(
"PYTORCH_CUDA_ALLOC_CONF"
,
""
)
assert
"expandable_segments:True"
not
in
conf
,
\
(
"Expandable segments are not compatible with memory pool. "
"Please track https://github.com/pytorch/pytorch/issues/147851 "
"for the latest updates."
)
self
.
pointer_to_data
:
Dict
[
int
,
AllocationData
]
=
{}
self
.
current_tag
:
str
=
CuMemAllocator
.
default_tag
self
.
allocator_and_pools
:
Dict
[
str
,
Any
]
=
{}
...
...
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