Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add custom class pt2 tutorial #3431

wants to merge 1 commit into from

Conversation

angelayi
Copy link
Contributor

@angelayi angelayi commented Jul 7, 2025

Copy link

pytorch-bot bot commented Jul 7, 2025

🔗 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 Failures

As of commit a198274 with merge base a96b470 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@angelayi angelayi force-pushed the angelayi/torchbind branch from 06880b9 to be8b159 Compare July 8, 2025 15:41
@angelayi angelayi requested review from zou3519 and ydwu4 July 8, 2025 15:41
@angelayi angelayi marked this pull request as ready for review July 8, 2025 15:41

import torch

torch.ops.load_library("//caffe2/test:test_torchbind_cpp_impl")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this internal stuff?

Copy link
Contributor

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

Copy link
Contributor

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

@zou3519 zou3519 added the torch.compile Torch compile and other relevant tutorials label Jul 8, 2025
@ydwu4
Copy link

ydwu4 commented Jul 9, 2025

Thanks for porting this tutorial! Looks good to me.

@angelayi angelayi force-pushed the angelayi/torchbind branch from ba48f42 to a198274 Compare July 15, 2025 15:39
@angelayi angelayi requested review from svekars and zou3519 July 15, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed module: export new tutorial torch.compile Torch compile and other relevant tutorials
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants