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
217f2759
Unverified
Commit
217f2759
authored
Mar 09, 2026
by
Li, Jiang
Committed by
GitHub
Mar 09, 2026
Browse files
[Bugfix] Avoid to replace non-tensor members in cpu model runner (#36430)
Signed-off-by:
jiang1.li
<
jiang1.li@intel.com
>
parent
fff3711a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vllm/v1/worker/cpu_model_runner.py
vllm/v1/worker/cpu_model_runner.py
+3
-3
No files found.
vllm/v1/worker/cpu_model_runner.py
View file @
217f2759
...
...
@@ -34,9 +34,9 @@ class CPUModelRunner(GPUModelRunner):
def
replace_tensor
(
obj
:
Any
,
cpu_attr_name
:
str
,
device_attr_name
)
->
None
:
cpu_tensor
=
getattr
(
obj
,
cpu_attr_name
,
None
)
device_tensor
=
getattr
(
obj
,
device_attr_name
,
None
)
if
cpu_tensor
is
not
None
and
device_tensor
is
not
None
:
assert
isinstance
(
cpu
_tensor
,
torch
.
Tensor
)
assert
isinstance
(
device_tensor
,
torch
.
Tensor
)
if
isinstance
(
cpu_tensor
,
torch
.
Tensor
)
and
isinstance
(
device
_tensor
,
torch
.
Tensor
)
:
setattr
(
obj
,
device_attr_name
,
cpu_tensor
)
for
v
in
vars
(
self
).
values
():
...
...
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