-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[torch.compile] transparent compilation with more logging #12246
Conversation
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I think we do not need to use logger.info
for the internal steps of torch.compile.
vllm/compilation/backends.py
Outdated
with open(graph_path, "w") as f: | ||
f.write(src) | ||
|
||
logger.info("Computation graph saved to %s", graph_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not need logger.info here, as most users do not need to be aware of this step. The file structure in local_cache_dir
can be explained in the document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the suggestion! moved to debug
instead.
vllm/compilation/wrapper.py
Outdated
with open(decompiled_file, "w") as f: | ||
f.write(src) | ||
|
||
logger.info("Dynamo transformed code saved to %s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in fd753d1
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
failing tests are not related (amd machine issue), merging |
In preparation for
torch.compile
documentation, I added the following logging information:INFO 01-20 22:10:00 decorators.py:201] Start compiling function <code object forward at 0x7f6ea4f85580, file "/data/youkaichao/vllm/vllm/model_executor/models/llama.py", line 343>
INFO 01-20 21:59:30 wrapper.py:101] Dynamo transformed code saved to /home/eecs/youkaichao/.cache/vllm/torch_compile_cache/bef6c83c36/rank_0/transformed_code.py
INFO 01-20 22:04:08 backends.py:628] Computation graph saved to /home/eecs/youkaichao/.cache/vllm/torch_compile_cache/bef6c83c36/rank_0/computation_graph.py
The following information is already available after #12182
/home/eecs/youkaichao/.cache/vllm/torch_compile_cache/bef6c83c36/rank_0/inductor_hash_cache.py