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
325aa3de
Unverified
Commit
325aa3de
authored
Aug 22, 2025
by
Ning Xie
Committed by
GitHub
Aug 22, 2025
Browse files
[Misc] local import code clean (#23420)
Signed-off-by:
Andy Xie
<
andy.xning@gmail.com
>
parent
a073be6d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
3 deletions
+1
-3
vllm/v1/worker/gpu_worker.py
vllm/v1/worker/gpu_worker.py
+0
-1
vllm/worker/worker.py
vllm/worker/worker.py
+1
-2
No files found.
vllm/v1/worker/gpu_worker.py
View file @
325aa3de
...
...
@@ -292,7 +292,6 @@ class Worker(WorkerBase):
allocator
=
CuMemAllocator
.
get_instance
()
context
=
allocator
.
use_memory_pool
(
tag
=
"kv_cache"
)
else
:
from
contextlib
import
nullcontext
context
=
nullcontext
()
with
context
:
self
.
model_runner
.
initialize_kv_cache
(
kv_cache_config
)
...
...
vllm/worker/worker.py
View file @
325aa3de
...
...
@@ -3,6 +3,7 @@
"""A GPU worker class."""
import
gc
import
os
from
contextlib
import
nullcontext
from
typing
import
Dict
,
List
,
Optional
,
Set
,
Tuple
,
Type
,
Union
import
torch
...
...
@@ -206,7 +207,6 @@ class Worker(LocalOrDistributedWorkerBase):
"used for one instance per process."
)
context
=
allocator
.
use_memory_pool
(
tag
=
"weights"
)
else
:
from
contextlib
import
nullcontext
context
=
nullcontext
()
with
context
:
self
.
model_runner
.
load_model
()
...
...
@@ -330,7 +330,6 @@ class Worker(LocalOrDistributedWorkerBase):
allocator
=
CuMemAllocator
.
get_instance
()
context
=
allocator
.
use_memory_pool
(
tag
=
"kv_cache"
)
else
:
from
contextlib
import
nullcontext
context
=
nullcontext
()
with
context
:
self
.
_init_cache_engine
()
...
...
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