Skip to content

Add tutorial for swap_tensors in nn.Module #2824

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

Merged
merged 22 commits into from
Apr 19, 2024
Merged

Conversation

mikaylagawarecki
Copy link
Contributor

as title

Copy link

pytorch-bot bot commented Apr 4, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/2824

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 7dff2ed with merge base 2c231da (image):
💚 Looks good so far! There are no failures yet. 💚

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

@mikaylagawarecki mikaylagawarecki changed the base branch from 2.3-RC-TEST to main April 4, 2024 20:59
@mikaylagawarecki mikaylagawarecki changed the base branch from main to 2.3-RC-TEST April 4, 2024 21:02
@mikaylagawarecki mikaylagawarecki force-pushed the swap branch 3 times, most recently from ae7bfca to 05995f9 Compare April 5, 2024 20:33
Copy link
Contributor

@svekars svekars left a comment

Choose a reason for hiding this comment

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

Thanks so much @mikaylagawarecki! Looks great - I added a few editorial suggestions - feel free to add/ignore as needed.

Copy link
Contributor

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Very cool! Small suggestions only.

# Notably, the existing approach does not work in these cases:
#
# * when using ``__torch_dispatch__`` subclasses
# * when ``param`` and ``new_param`` do not have the same type
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to define "type" here.

Copy link
Contributor Author

@mikaylagawarecki mikaylagawarecki Apr 11, 2024

Choose a reason for hiding this comment

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

Updated to say "Python type()", do you think this is sufficiently expressive?

@mikaylagawarecki mikaylagawarecki requested a review from albanD April 11, 2024 20:52
Copy link
Contributor

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Sounds good! Thanks!

@svekars svekars deleted the branch pytorch:main April 19, 2024 15:59
@svekars svekars closed this Apr 19, 2024
@svekars svekars reopened this Apr 19, 2024
@svekars svekars changed the base branch from 2.3-RC-TEST to main April 19, 2024 16:26
@svekars svekars merged commit f2e2a6d into pytorch:main Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants