-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add new Python and C++/CUDA Custom Op tutorials #2888
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/2888
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit af4fbe5 with merge base 63f987d ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@svekars is there a way to bypass the pyspelling check? |
This does not test that the gradients are mathematically correct; please write | ||
separate tests for that (either manual ones or torch.autograd.gradcheck). | ||
|
||
.. code-block:: python |
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.
Interesting that this is not the same as the one from the python tutorial
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 wrote them at different times. I can make them the same if we want.
@zou3519 Please fix what's fixable. Words like PIL's you can add to en-wordlist.txt. Things like FakeTensor should be put in backticks ( |
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.
Looks good overall, asking to add what you will learn and prerequisites.
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.
SGTM
I want to land this before PyTorch 2.4 (so we can link to these in PyTorch's nightly documentation) and then have a follow-up PR for 2.4 that actually runs the scripts (so that they can generate outputs). pytorch/pytorch#127443 to remind myself of the above. NB: These two tutorials replace all of the existing custom ops (and cpp extensions) tutorials: - advanced/cpp_extension - advanced/torch_script_custom_ops - advanced/torch_script_custom_classes - advanced/dispatcher In a follow-up PR we will add warnings to all of those tutorials stating that they are deprecated but we will preserve the text just in case people still need them (e.g. if they are not using PyTorch 2.4). Test Plan: - I tested these locally.
* Add new Python and C++/CUDA Custom Op tutorials I want to land this before PyTorch 2.4 (so we can link to these in PyTorch's nightly documentation) and then have a follow-up PR for 2.4 that actually runs the scripts (so that they can generate outputs). pytorch/pytorch#127443 to remind myself of the above. NB: These two tutorials replace all of the existing custom ops (and cpp extensions) tutorials: - advanced/cpp_extension - advanced/torch_script_custom_ops - advanced/torch_script_custom_classes - advanced/dispatcher In a follow-up PR we will add warnings to all of those tutorials stating that they are deprecated but we will preserve the text just in case people still need them (e.g. if they are not using PyTorch 2.4). Test Plan: - I tested these locally. * Fix cpp custom ops tutorial per review * update * update index.rst * Update * update * update
* Add new Python and C++/CUDA Custom Op tutorials I want to land this before PyTorch 2.4 (so we can link to these in PyTorch's nightly documentation) and then have a follow-up PR for 2.4 that actually runs the scripts (so that they can generate outputs). pytorch/pytorch#127443 to remind myself of the above. NB: These two tutorials replace all of the existing custom ops (and cpp extensions) tutorials: - advanced/cpp_extension - advanced/torch_script_custom_ops - advanced/torch_script_custom_classes - advanced/dispatcher In a follow-up PR we will add warnings to all of those tutorials stating that they are deprecated but we will preserve the text just in case people still need them (e.g. if they are not using PyTorch 2.4). Test Plan: - I tested these locally. * Fix cpp custom ops tutorial per review * update * update index.rst * Update * update * update
I want to land this before PyTorch 2.4 (so we can link to these in PyTorch's nightly documentation) and then have a follow-up PR for 2.4 that actually runs the scripts (so that they can generate outputs).
pytorch/pytorch#127443 to remind myself of the above.
NB: These two tutorials replace all of the existing custom ops (and cpp extensions) tutorials:
In a follow-up PR we will add warnings to all of those tutorials stating that they are deprecated but we will preserve the text just in case people still need them (e.g. if they are not using PyTorch 2.4).
Test Plan:
Fixes #ISSUE_NUMBER
Description
Checklist