8000 Clean PR: Replace _device_t with torch.types.Device and fix lint issues (#152952) by sanjai-11 · Pull Request #153493 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Clean PR: Replace _device_t with torch.types.Device and fix lint issues (#152952) #153493

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

sanjai-11
Copy link
@sanjai-11 sanjai-11 commented May 13, 2025

Fixes #152952

This PR removes redundant type aliases for _device_t and replaces them with torch.types.Device in several PyTorch modules where applicable. This improves type clarity and consistency across the codebase and aligns with recent efforts to modernize type annotations.

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168

Copy link
pytorch-bot bot commented May 13, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit dd112a4 with merge base 9df9d9d (image):
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label May 13, 2025
@sanjai-11
Copy link
Author

@pytorchbot label "topic: not user facing"

@cyyever cyyever requested a review from albanD May 15, 2025 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cpu CPU specific problem (e.g., perf, algorithm) open source topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove redundant type aliases of _device for torch.Device
3 participants
0