-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add custom class pt2 tutorial #3431
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3431
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit a198274 with merge base a96b470 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
06880b9
to
be8b159
Compare
advanced_source/custom_class_pt2.rst
Outdated
|
||
import torch | ||
|
||
torch.ops.load_library("//caffe2/test:test_torchbind_cpp_impl") |
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.
is this internal stuff?
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.
probably, I hope the OSS buck/bazel target for torch isn't caffe2 lol
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.
So it would be nice if we had some sample code someone could download that had the C++ extension set up with it. Then it would be clearer exactly what needs to be loaded (via load_library, or an import statement). But I'm happy to ship some version of this as-is without that because it already helps alot
Thanks for porting this tutorial! Looks good to me. |
ba48f42
to
a198274
Compare
Porting over part of https://docs.google.com/document/d/1xUfRsqyQp3CUqpHaPjG3APxx9gHEKjQ3ISYi5jtKpuk/edit?tab=t.0
preview: https://docs-preview.pytorch.org/pytorch/tutorials/3431/advanced/custom_class_pt2.html
cc @williamwen42 @msaroufim @anijain2305 @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @suo @ydwu4