-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add logging + counter for missed reinplacing opportunities #132758
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
Conversation
Summary: - We add Inductor logs for what tensors we tried to reinplace, what tensors we were unable to reinplace, and of those tensors, which of those might be bugs (the "missed reinplacing opportunities"). You can tell this by reading the Inductor output graph but the logs make it easier to figure out. - Add a dynamo_compile counter for missed reinplacing opportunities. The goal is to see how widespread existing problems (if any) are. We've had trouble getting all of the edge cases for the reinplacing pass; the counter will help us hunt down issues. Test Plan: - tested locally [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/132758
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 2c39e2c with merge base 91df66e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Summary: - We add Inductor logs for what tensors we tried to reinplace, what tensors we were unable to reinplace, and of those tensors, which of those might be bugs (the "missed reinplacing opportunities"). You can tell this by reading the Inductor output graph but the logs make it easier to figure out. - Add a dynamo_compile counter for missed reinplacing opportunities. The goal is to see how widespread existing problems (if any) are. We've had trouble getting all of the edge cases for the reinplacing pass; the counter will help us hunt down issues. Test Plan: - tested locally cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang [ghstack-poisoned]
Summary: - We add Inductor logs for what tensors we tried to reinplace, what tensors we were unable to reinplace, and of those tensors, which of those might be bugs (the "missed reinplacing opportunities"). You can tell this by reading the Inductor output graph but the logs make it easier to figure out. - Add a dynamo_compile counter for missed reinplacing opportunities. The goal is to see how widespread existing problems (if any) are. We've had trouble getting all of the edge cases for the reinplacing pass; the counter will help us hunt down issues. Test Plan: - tested locally cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang [ghstack-poisoned]
Summary: - We add Inductor logs for what tensors we tried to reinplace, what tensors we were unable to reinplace, and of those tensors, which of those might be bugs (the "missed reinplacing opportunities"). You can tell this by reading the Inductor output graph but the logs make it easier to figure out. - Add a dynamo_compile counter for missed reinplacing opportunities. The goal is to see how widespread existing problems (if any) are. We've had trouble getting all of the edge cases for the reinplacing pass; the counter will help us hunt down issues. Test Plan: - tested locally ghstack-source-id: 4e0625f Pull Request resolved: #132758
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.
test ?
torch/_dynamo/compile_metrics.py
Outdated
# Global information for the purposes of adding to CompilationMetrics | ||
|
||
# From Inductor's reinplacing pass: the number of Tensors that we failed to reinplace. | ||
possibly_missed_reinplacing_opportunities: int = 0 |
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.
Can we just do this with counters
from torch/_dynamo/utils.py
? applying deltas on cache hit is already supported for fx graph cache hit with counters
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.
Good point, I'll just use counters
I'm not really sure what to test in code |
Summary: - We add Inductor logs for what tensors we tried to reinplace, what tensors we were unable to reinplace, and of those tensors, which of those might be bugs (the "missed reinplacing opportunities"). You can tell this by reading the Inductor output graph but the logs make it easier to figure out. - Add a dynamo_compile counter for missed reinplacing opportunities. The goal is to see how widespread existing problems (if any) are. We've had trouble getting all of the edge cases for the reinplacing pass; the counter will help us hunt down issues. Test Plan: - tested locally cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang [ghstack-poisoned]
Summary: - We add Inductor logs for what tensors we tried to reinplace, what tensors we were unable to reinplace, and of those tensors, which of those might be bugs (the "missed reinplacing opportunities"). You can tell this by reading the Inductor output graph but the logs make it easier to figure out. - Add a dynamo_compile counter for missed reinplacing opportunities. The goal is to see how widespread existing problems (if any) are. We've had trouble getting all of the edge cases for the reinplacing pass; the counter will help us hunt down issues. Test Plan: - tested locally ghstack-source-id: e371a64 Pull Request resolved: #132758
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: - We add Inductor logs for what tensors we tried to reinplace, what tensors we were unable to reinplace, and of those tensors, which of those might be bugs (the "missed reinplacing opportunities"). You can tell this by reading the Inductor output graph but the logs make it easier to figure out. - Add a dynamo_compile counter for missed reinplacing opportunities. The goal is to see how widespread existing problems (if any) are. We've had trouble getting all of the edge cases for the reinplacing pass; the counter will help us hunt down issues. X-link: pytorch/pytorch#132758 Approved by: https://github.com/eellison Reviewed By: izaitsevfb Differential Revision: D60945709 Pulled By: zou3519 fbshipit-source-id: 245f5c3a90207261e351a1c4f6bb35cbfed4bd60
Stack from ghstack (oldest at bottom):
Summary:
tensors we were unable to reinplace, and of those tensors, which of
those might be bugs (the "missed reinplacing opportunities"). You can
tell this by reading the Inductor output graph but the logs make it
easier to figure out.
goal is to see how widespread existing problems (if any) are. We've had
trouble getting all of the edge cases for the reinplacing pass; the
counter will help us hunt down issues.
Test Plan:
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang