Skip to content

Updated deprecated use_cuda profiler argument to use_device#3818

Open
GavinWongYF wants to merge 1 commit intopytorch:mainfrom
GavinWongYF:fix-deprecations-3816
Open

Updated deprecated use_cuda profiler argument to use_device#3818
GavinWongYF wants to merge 1 commit intopytorch:mainfrom
GavinWongYF:fix-deprecations-3816

Conversation

@GavinWongYF
Copy link
Copy Markdown

Fixes #3816

Description

Original tutorial used the to-be deprecated use_cuda argument in torch.autograd.profiler.profile. This PR updates to the use_device argument, setting it to device.type (either "cpu" or "cuda") to preserve existing behaviour.

Checklist

  • The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 4, 2026

🔗 Helpful Links

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

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.

@meta-cla meta-cla bot added the cla signed label Apr 4, 2026
@GavinWongYF GavinWongYF changed the title Updated deprecated use_gpu profiler argument to use_device Updated deprecated use_cuda profiler argument to use_device Apr 4, 2026
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.

[CI] Deprecated API usage in tutorials

1 participant