-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix indexing and slicing of ranges in dynamo #128567
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/128567
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (5 Unrelated Failures)As of commit da25855 with merge base dcc0093 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
I am workin on more robust solution |
Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff unblock the issue but is not an ideal solution for two reasons: 1) it force the metallization of the range to a list and then apply the subscript. 2) if the function returns a range it will return a list int the case above (unlikely to do be used in dynamo but still). A following diff will address the issue in more ideal way, were applying a binary_subscript or trinary_subscript on a range results in range. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
looking at faluires! |
Fix #128520 Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
adress errors |
Fix #128520 Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
Fix #128520 Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) 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 |
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
@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 |
Fix pytorch#128520 Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected. in python, range()[complex subscript] is another range, ex: range(1, 10, 2)[1:4:1] is range(3, 9, 2) and range(1, 10, 2)[1:4:1] is range(-9, 9, 2) This diff fix index and slice applications on range. it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c) Pull Request resolved: pytorch#128567 Approved by: https://github.com/anijain2305
Stack from ghstack (oldest at bottom):
Fix #128520
Dynamo does not handle range()[binary subscript] or range()[trinary_subscript] correctly. Right now it calls
the get_item function which basically applies the subscript operation on top of the list of [start, end, step]! which is completely not related to what is expected.
in python, range()[complex subscript] is another range, ex:
range(1, 10, 2)[1:4:1] is range(3, 9, 2)
and range(1, 10, 2)[1:4:1] is range(-9, 9, 2)
This diff fix index and slice applications on range.
it mimics implementations from (https://github.com/python/cpython/blob/main/Objects/rangeobject.c)
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang