-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Update from_dlpack tests and documentation #70543
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
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow For more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 0af0353 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
dc6df1c
to
489f47a
Compare
489f47a
to
6876998
Compare
Thanks @kurtamohler! gh-70437 also updates the docs, so after whichever one of these PRs lands first, the other one needs an update. |
Was |
It wasn't moved, it's still under |
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.
This looks good, thanks @kurtamohler. Adding tests for non-contiguous input is a good idea. Just two very minor comments from me.
test/test_torch.py
Outdated
@skipMeta | ||
@onlyCUDA | ||
@dtypes(*get_all_dtypes(include_bool=False)) | ||
def test_dlpack_conversion_with_diff_streams(self, device, dtype): | ||
from torch._C import _from_dlpack |
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.
This change is a good cleanup. No change in behavior due to this, because the test bypasses stream handling in from_dlpack
by passing in a capsule rather than a tensor.
One related thing is what we should do with
@mruberry any preference? |
Leave `to_dlpack` in the `torch.utils.dlpack` namespace here. It is present in the main namespace as well, but undocumented there and it's not clear if we want to keep it there - see pytorch#70543 (comment)
6876998
to
da734ed
Compare
@kurtamohler this has accumulated a merge conflict, could you resolve it? The |
da734ed
to
f236b60
Compare
f236b60
to
0af0353
Compare
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.
Thanks @kurtamohler!
@mruberry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Hey @kurtamohler. |
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Thanks for merging @mruberry. Just to confirm: are you happy to see the doc change backported to the 1.11 branch? |
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Summary: Part of pytorch/pytorch#58742 Pull Request resolved: pytorch/pytorch#70543 Reviewed By: soulitzer Differential Revision: D34172475 Pulled By: mruberry fbshipit-source-id: d498764b8651a8b7a19181b3421aeebf28a5db2b (cherry picked from commit 05332f164c4317e46e1242fdae483204e0412ef3)
Part of #58742