Skip to content

Conversation

@alphacrash
Copy link

@alphacrash alphacrash commented Aug 19, 2025

@pytorch-bot
Copy link

pytorch-bot bot commented Aug 19, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 923df88 with merge base 496adf9 (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 Aug 19, 2025
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 19, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: alphacrash / name: SUD (923df88)

@alphacrash
Copy link
Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Aug 19, 2025
@alphacrash alphacrash marked this pull request as ready for review August 19, 2025 05:34
@janeyx99 janeyx99 requested a review from Skylion007 August 20, 2025 22:36
@janeyx99 janeyx99 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 20, 2025
@alphacrash
Copy link
Author

alphacrash commented Aug 21, 2025

Based on checks I saw, I removed the unused import and fixed the linting issue using lintrunner -a for the files I have commited.

I am not sure what I can do for bc_linter fail, it would be helpful if I can get some guidance on that.

Saw that issue is marked as closed, do let me know if PR is no longer required, will close it. Thanks!

@Quantum-Kayak
Copy link

Thanks for cleaning this up — moving to torch.types.Device improves clarity and reduces redundancy across the codebase. It also makes future refactoring easier by relying on the canonical type directly.

One small note: if _device was used in contexts that might touch backward compatibility tracking, that could be what’s triggering the bc_linterfailure. If you haven't already, might be worth double-checking that this change doesn’t alter any externally visible annotations or serialized schema, especially in __init__.py or module-level exports. If it’s purely internal, a BC note might not be needed — could be flagged for review instead.

Appreciate the attention to detail here. Looks close to ready once the BC issue is clarified.

@alphacrash
Copy link
Author

Since the change is intentional, can bc_linter be suppressed?
If not, please do suggest any code changes I can add.

@janeyx99 janeyx99 added the suppress-bc-linter Suppresses the failures of API backward-compatibility linter (Lint/bc_linter) label Sep 16, 2025
@janeyx99
Copy link
Contributor

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 16, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

@pytorch-bot pytorch-bot bot removed the ciflow/trunk Trigger trunk jobs on your pull request label Oct 14, 2025
@alphacrash
Copy link
Author

I merged the latest main into this branch to fix merge conflicts.
The error from test fail in last merge attempt seems to be some infra issue.

@janeyx99 - Can you please try merge again

@janeyx99
Copy link
Contributor

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 16, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@EikanWang
Copy link
Collaborator

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Rebase failed due to Command git -C /home/runner/work/pytorch/pytorch rebase refs/remotes/origin/viable/strict pull/160945/head returned non-zero exit code 1

Rebasing (1/2)
Auto-merging torch/cpu/__init__.py
CONFLICT (content): Merge conflict in torch/cpu/__init__.py
Auto-merging torch/mtia/__init__.py
Auto-merging torch/xpu/__init__.py
CONFLICT (content): Merge conflict in torch/xpu/__init__.py
error: could not apply 7bfdfd64ee0... Removed redundant type aliases of _device
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Could not apply 7bfdfd64ee0... # Removed redundant type aliases of _device

Raised by https://github.com/pytorch/pytorch/actions/runs/18792996465

@EikanWang
Copy link
Collaborator

@alphacrash , could you help rebase this PR?

@alphacrash alphacrash force-pushed the remove-redundant-type-aliases-_device branch from a1fe099 to e7973c6 Compare November 5, 2025 15:10
@pytorch-bot pytorch-bot bot removed the ciflow/trunk Trigger trunk jobs on your pull request label Nov 5, 2025
@alphacrash alphacrash force-pushed the remove-redundant-type-aliases-_device branch from e7973c6 to 923df88 Compare November 5, 2025 15:13
@alphacrash
Copy link
Author

@EikanWang, sorry for the delay. Rebased the PR.

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 suppress-bc-linter Suppresses the failures of API backward-compatibility linter (Lint/bc_linter) 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.

7 participants