Skip to content

Commit

Permalink
Add print
Browse files Browse the repository at this point in the history
Signed-off-by: luka <[email protected]>
  • Loading branch information
ProExpertProg committed Nov 8, 2024
1 parent d9375df commit d0a9e37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vllm/compilation/inductor_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ def dump_graph(self, graph: torch.fx.Graph, stage: str):
logger.info("Printing graph to %s", filepath)
with open(filepath, "w") as f:
src = graph.python_code(root_module="self", verbose=True).src
# Add imports so it's not full of errors
print("import torch; from torch import device", file=f)
print(src, file=f)

0 comments on commit d0a9e37

Please sign in to comment.