-
Notifications
You must be signed in to change notification settings - Fork 21.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
[dynamo][cpp-guards] Improve recompilation reason logic for NO_TENSOR_ALIASING guard #125439
Conversation
…_ALIASING guard [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/125439
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit be8b9bd with merge base 3b5f6b1 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…_ALIASING guard ghstack-source-id: 9525e113c7aa8469e491ec268579d5e481220569 Pull Request resolved: #125439
…r NO_TENSOR_ALIASING guard" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…_ALIASING guard ghstack-source-id: 63b5c844aa7529fd7fec0592b87c51c6ab0fdfa6 Pull Request resolved: #125439
torch/csrc/dynamo/guards.cpp
Outdated
@@ -1305,9 +1301,6 @@ class NO_TENSOR_ALIASING : public RelationalGuard { | |||
if (!result) { | |||
std::stringstream fail_reason; |
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.
Could just use a regular std::string
here?
torch/_dynamo/guards.py
Outdated
@@ -2419,7 +2440,16 @@ def get_guard_fail_reason( | |||
# walk through this list and find the guard that failed. This is | |||
# very important for symbolic shape guards which are currently | |||
# installed as a lambda guard and can encompass a long list of code_parts. | |||
if len(verbose_code_parts) == 1: | |||
|
|||
if ( |
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.
Refactor this conditional?
…r NO_TENSOR_ALIASING guard" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
…_ALIASING guard ghstack-source-id: 0b135e6530e40c316777bb502ba0d835b7cbaa34 Pull Request resolved: #125439
…r NO_TENSOR_ALIASING guard" cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
@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 |
…odule (#125421) Pull Request resolved: #125421 Approved by: https://github.com/mlazos ghstack dependencies: #125439
Improves the guard overhead of MobileBert model with nn module guards from 92000 units to 20000 units. Pull Request resolved: #124522 Approved by: https://github.com/jansel ghstack dependencies: #125439, #125421
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang