8000 [AUTOCAST] FEAT: Allow passing a `torch.device` object to autocast by guillemc23 · Pull Request #153539 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[AUTOCAST] FEAT: Allow passing a torch.device object to autocast #153539

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

Conversation

guillemc23
Copy link
@guillemc23 guillemc23 commented May 14, 2025

Allow passing a torch.device object to the autocast constructor. It simply gets the torch.device.type in case the device_type is an instance of torch.device.

cc @mcarilli @ptrblck @leslie-fang-intel @jgong5

Copy link
pytorch-bot bot commented May 14, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 98cfa4b with merge base 2344eca (image):
💚 Looks good so far! There are no failures yet. 💚

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

Copy link
linux-foundation-easycla bot commented May 14, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

@guillemc23
Copy link
Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label May 14, 2025
@jerryzh168 jerryzh168 requested review from wschin and ezyang May 16, 2025 17:08
@jerryzh168 jerryzh168 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: amp (automated mixed precision) autocast open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
31B4
0