-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Conversions between strided and jagged layouts for Nested Tensors #115749
base: gh/ani300/4/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/115749
Note: Links to docs will display an error until the docs builds have been completed. ❌ 25 New FailuresAs of commit dcfc6c0 with merge base 48a5414 (): NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ghstack-source-id: c10512f5c8c66faa6a51a3dc84c0f3fdc9af7aeb Pull Request resolved: #115749
[ghstack-poisoned]
ghstack-source-id: cc51a8c36036baffa92a2cc15df68b297138d2d4 Pull Request resolved: #115749
Add a test? |
[ghstack-poisoned]
ghstack-source-id: 1080b577831db7b66d5351bac970f920fc409cd3 Pull Request resolved: #115749
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 realize this doesn't work today, but I think we want this sugar to work as the public API for conversion:
nt.to(layout=torch.jagged)
Today this gives:
TypeError: to() received an invalid combination of arguments - got (layout=torch.layout, ), but expected one of:
* (torch.device device, torch.dtype dtype, bool non_blocking, bool copy, *, torch.memory_format memory_format)
* (torch.dtype dtype, bool non_blocking, bool copy, *, torch.memory_format memory_format)
* (Tensor tensor, bool non_blocking, bool copy, *, torch.memory_format memory_format)
I think if we support that in general then we can provide a high-level meta registration for it that is used by FakeTensor to solve the Dynamo issue you're hitting for the tests. A good place to start is in tools/autograd/templates/python_variable_methods.cpp
where THPVariable_to()
and dispatch_to()
are defined.
[ghstack-poisoned]
ghstack-source-id: 56e8ca386d1636b34860515e9ff700f0b822852c Pull Request resolved: #115749
[ghstack-poisoned]
ghstack-source-id: cac5a5cebb45a61757680dc914d4340c285dcfed Pull Request resolved: #115749
[ghstack-poisoned]
ghstack-source-id: 0d3ddb87e909e05ebd1330596237ceb1e78b1aea Pull Request resolved: #115749
[ghstack-poisoned]
ghstack-source-id: 0690da2da1d73452093783d48a900c20b09a7efb Pull Request resolved: #115749
[ghstack-poisoned]
ghstack-source-id: ae00bb520f2a6faada97d86e5292439258db8c6e Pull Request resolved: #115749
ghstack-source-id: 83751d0c4dd39fdc807d94b2b3dfeda920e1d448 Pull Request resolved: #115749
ghstack-source-id: 0f7c6b1c38615a1dc65d229fa61fad1e55c20586 Pull Request resolved: #115749
ghstack-source-id: 39edb555da2c4e9fcf86a9b24b69ca181b46df60 Pull Request resolved: #115749
ghstack-source-id: 763afcc1bea36813b0a33b8d802fa8e77462bf0f Pull Request resolved: #115749
ghstack-source-id: 9976341cee22d6233dbefb2fa2ac7dce2788b824 Pull Request resolved: #115749
ghstack-source-id: cc22768290c07f96b77d42d97df46dad12e6ba50 Pull Request resolved: #115749
ghstack-source-id: a8337d942551143fce99bb8d38c83e1925475a0a Pull Request resolved: #115749
ghstack-source-id: fcad4589b439c933e16f9bdf9938e4513ec45bbb Pull Request resolved: #115749
ghstack-source-id: 5930cfb064f1f98e8fde058386220ae8d4535597 Pull Request resolved: #115749
ghstack-source-id: c67731de33427f75c977b2bbb1bcce7b4af81b1f Pull Request resolved: #115749
ghstack-source-id: 02f83a6c339494e411228505afbb6ccc4ba0e9b5 Pull Request resolved: #115749
ghstack-source-id: c220d0e7655f31d07708da073fb3a7ee42be25ae Pull Request resolved: #115749
This PR does 3 things:
Stack from ghstack (oldest at bottom):
cc @cpuhrsch @jbschlosser @bhosmer @drisspg @soulitzer