-
Notifications
You must be signed in to change notification settings - Fork 22.2k
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
[NJT] Allow construction of NJT within graph using offsets from inputs #124624
base: gh/soulitzer/296/base
Are you sure you want to change the base?
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/124624
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 044eaaf with merge base bad8d25 (): NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ghstack-source-id: ca8687cc9d878fe0cac88f12544622c7f6d3b879 Pull Request resolved: #124624
… from inputs" Creating symbolic nested ints within the graph is difficult. Using unbacked symints should solve the most important(?) cases in the mean time. See #118446 Known gaps: - creating NJT from intermediate offsets (offsets created within the graph, as opposed to being offsets passed in as inputs) - when the same offsets is also passed in as a input to the graph. We are not smart enough to realize that the offsets from that input is the same and therefore would fail when the sizes are compare ("s0 cannot be compared with u0") cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
… from inputs" Creating symbolic nested ints within the graph is difficult. Using unbacked symints should solve the most important(?) cases in the mean time. See #118446 Known gaps: - creating NJT from intermediate offsets (offsets created within the graph, as opposed to being offsets passed in as inputs) - when the same offsets is also passed in as a input to the graph. We are not smart enough to realize that the offsets from that input is the same and therefore would fail when the sizes are compare ("s0 cannot be compared with u0") cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
… from inputs" Creating symbolic nested ints within the graph is difficult. Using unbacked symints should solve the most important(?) cases in the mean time. See #118446 Known gaps: - creating NJT from intermediate offsets (offsets created within the graph, as opposed to being offsets passed in as inputs) - when the same offsets is also passed in as a input to the graph. We are not smart enough to realize that the offsets from that input is the same and therefore would fail when the sizes are compare ("s0 cannot be compared with u0") cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang [ghstack-poisoned]
ghstack-source-id: b438d136f6dffe865e4c366072ffabdaed5cfa2a Pull Request resolved: #124624
elif isinstance(tensor, FakeTensor): | ||
shape_env = tensor.fake_mode.shape_env | ||
tensor_symint = shape_env.create_unbacked_symint() | ||
# Do we need to constrain as size? |
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.
why would this path ever be hit if we manually update the registry for fake tensors during tensor_unflatten?
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Rebase failed due to Command
Raised by https://github.com/pytorch/pytorch/actions/runs/9274613146 |
We run into an error when we try to construct a NT in the graph and return it. One of the errors is with symint handling in is_concrete_int: the full error this PR is here: https://gist.github.com/davidberard98/877a52f6ea57025cc122d64361e598da. Repro: run the test_nestedtensor.py test after reverting the patch in symbolic_shapes.py. Note - a separate issue occurs if we don't call fn() before fn_c(), where the tensors aren't marked as dynamic; fix for this is in #124624 [ghstack-poisoned]
We run into an error when we try to construct a NT in the graph and return it. One of the errors is with symint handling in is_concrete_int: the full error this PR is here: https://gist.github.com/davidberard98/877a52f6ea57025cc122d64361e598da. Repro: run the test_nestedtensor.py test after reverting the patch in symbolic_shapes.py. Note - a separate issue occurs if we don't call fn() before fn_c(), where the tensors aren't marked as dynamic; fix for this is in #124624 [ghstack-poisoned]
We run into an error when we try to construct a NT in the graph and return it. One of the errors is with symint handling in is_concrete_int: the full error this PR is here: https://gist.github.com/davidberard98/877a52f6ea57025cc122d64361e598da. Repro: run the test_nestedtensor.py test after reverting the patch in symbolic_shapes.py. Note - a separate issue occurs if we don't call fn() before fn_c(), where the tensors aren't marked as dynamic; fix for this is in #124624 Differential Revision: [D58315861](https://our.internmc.facebook.com/intern/diff/D58315861) [ghstack-poisoned]
We run into an error when we try to construct a NT in the graph and return it. One of the errors is with symint handling in is_concrete_int: the full error this PR is here: https://gist.github.com/davidberard98/877a52f6ea57025cc122d64361e598da. Repro: run the test_nestedtensor.py test after reverting the patch in symbolic_shapes.py. Note - a separate issue occurs if we don't call fn() before fn_c(), where the tensors aren't marked as dynamic; fix for this is in #124624 Differential Revision: [D58315861](https://our.internmc.facebook.com/intern/diff/D58315861) [ghstack-poisoned]
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Stack from ghstack (oldest at bottom):
Creating symbolic nested ints within the graph is difficult. Using unbacked symints should solve the most important(?) cases in the mean time.
See #118446
Known gaps:
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames