Skip to content

Commit

Permalink
[misc] fix typing (vllm-project#11540)
Browse files Browse the repository at this point in the history
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: xcnick <[email protected]>
  • Loading branch information
youkaichao authored and xcnick committed Dec 31, 2024
1 parent e7d3dae commit 3a96c1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vllm/compilation/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ def wrap_inductor(graph: fx.GraphModule,
from torch._inductor.compile_fx import graph_returns_tuple
returns_tuple = graph_returns_tuple(graph)

# this is the graph we return to Dynamo to run
def compiled_graph(*args) -> Optional[fx.CompiledFxGraph]:
# this is the callable we return to Dynamo to run
def compiled_graph(*args):
# convert args to list
list_args = list(args)
graph_output = inductor_compiled_graph(list_args)
Expand Down Expand Up @@ -537,7 +537,8 @@ def __call__(self, graph: fx.GraphModule, example_inputs) -> Callable:
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)
for i, index in enumerate(self.sym_tensor_indices):
runtime_tensor = list_args[index]
Expand Down

0 comments on commit 3a96c1b

Please sign in to comment.