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
eb881ed0
Unverified
Commit
eb881ed0
authored
Dec 27, 2024
by
youkaichao
Committed by
GitHub
Dec 27, 2024
Browse files
[misc] fix typing (#11540)
Signed-off-by:
youkaichao
<
youkaichao@gmail.com
>
parent
46d43594
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
vllm/compilation/backends.py
vllm/compilation/backends.py
+4
-3
No files found.
vllm/compilation/backends.py
View file @
eb881ed0
...
@@ -208,8 +208,8 @@ def wrap_inductor(graph: fx.GraphModule,
...
@@ -208,8 +208,8 @@ def wrap_inductor(graph: fx.GraphModule,
from
torch._inductor.compile_fx
import
graph_returns_tuple
from
torch._inductor.compile_fx
import
graph_returns_tuple
returns_tuple
=
graph_returns_tuple
(
graph
)
returns_tuple
=
graph_returns_tuple
(
graph
)
# this is the
graph
we return to Dynamo to run
# this is the
callable
we return to Dynamo to run
def
compiled_graph
(
*
args
)
->
Optional
[
fx
.
CompiledFxGraph
]
:
def
compiled_graph
(
*
args
):
# convert args to list
# convert args to list
list_args
=
list
(
args
)
list_args
=
list
(
args
)
graph_output
=
inductor_compiled_graph
(
list_args
)
graph_output
=
inductor_compiled_graph
(
list_args
)
...
@@ -537,7 +537,8 @@ class VllmBackend:
...
@@ -537,7 +537,8 @@ class VllmBackend:
example_inputs
[
x
].
clone
()
for
x
in
self
.
sym_tensor_indices
example_inputs
[
x
].
clone
()
for
x
in
self
.
sym_tensor_indices
]
]
def
copy_and_call
(
*
args
)
->
fx
.
GraphModule
:
# this is the callable we return to Dynamo to run
def
copy_and_call
(
*
args
):
list_args
=
list
(
args
)
list_args
=
list
(
args
)
for
i
,
index
in
enumerate
(
self
.
sym_tensor_indices
):
for
i
,
index
in
enumerate
(
self
.
sym_tensor_indices
):
runtime_tensor
=
list_args
[
index
]
runtime_tensor
=
list_args
[
index
]
...
...
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