Fix outdated torch_logs tutorial by removing CUDA device check#3770
Fix outdated torch_logs tutorial by removing CUDA device check#3770ManasVardhan wants to merge 2 commits intopytorch:mainfrom
Conversation
The tutorial was wrapped in a CUDA device capability check that caused the entire example to be skipped when built on CI without a compatible GPU. This resulted in the docs showing 'Skipping because torch.compile is not supported on this device' instead of actual log output. torch.compile works on CPU, so this fix removes the device check and uses a dynamic device selection (CUDA if available, otherwise CPU). This ensures the tutorial produces meaningful log output regardless of the build environment. Fixes pytorch/pytorch#137285
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3770
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @ManasVardhan! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
I've signed the CLA. Could you re-run the CLA check? Thanks! |
Fix
The
torch_logs.pytutorial was wrapped in a CUDA device capability check:When built on CI without a compatible GPU, this caused the rendered docs to show only "Skipping because torch.compile is not supported on this device." instead of actual compilation log output.
Changes
cudaif available, otherwisecpu)torch.compileworks on CPU, so the tutorial now produces meaningful log output regardless of build environmentFixes pytorch/pytorch#137285
cc @PaliC @mlazos