Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Lettensor_a.new_tensor() be ontensor_a.device by default#144958

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@oraluben
Copy link
Contributor

@oralubenoraluben commentedJan 16, 2025
edited by pytorch-botbot
Loading

Fixes#144957
Closes#73838 cc@albanD@ezyang

Currently,tensor_a.new_tensor() will return a on-cpu tensor no matter where istensor_a. This differs from the document and is a side-effect of#41984.

See#144957 how current logic breaks dynamo.

This PR restore the documented behavior and add tests fornew_tensor.

imzhuhl reacted with thumbs up emoji
@pytorch-bot
Copy link

pytorch-botbot commentedJan 16, 2025
edited
Loading

🔗 Helpful Links

🧪 See artifacts and rendered test results athud.pytorch.org/pr/144958

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit8868a78 with merge based2a77f4 (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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

@oraluben
Copy link
ContributorAuthor

@pytorchbot label "topic: bc breaking"

pytorch-bot[bot] reacted with thumbs up emoji

@oralubenoralubenforce-pushed thetensor-new_tensor-device branch from00bcb32 to101652bCompareJanuary 16, 2025 10:47
@mikaylagawareckimikaylagawarecki added the triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module labelJan 22, 2025
Copy link
Contributor

@ezyangezyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice catch

@ezyang
Copy link
Contributor

@pytorchbot merge

pytorch-bot[bot] reacted with thumbs up emoji

@pytorch-botpytorch-botbot added the ciflow/trunkTrigger trunk jobs on your pull request labelJan 24, 2025
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs arelease notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting withrelease notes:.

If not, please add thetopic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra teamRaised byworkflow job

@pytorch-botpytorch-botbottemporarily deployed to upload-benchmark-resultsJanuary 24, 2025 17:27 Inactive
@pytorch-botpytorch-botbottemporarily deployed to upload-benchmark-resultsJanuary 24, 2025 17:27 Inactive
@pytorch-botpytorch-botbottemporarily deployed to upload-benchmark-resultsJanuary 24, 2025 17:27 Inactive
@ezyangezyang added the module: python frontendFor issues relating to PyTorch's Python frontend labelJan 24, 2025
@ezyang
Copy link
Contributor

@pytorchbot merge

pytorch-bot[bot] reacted with thumbs up emoji

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs arelease notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting withrelease notes:.

If not, please add thetopic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra teamRaised byworkflow job

@ezyangezyang added the release notes: python_frontendpython frontend release notes category labelJan 24, 2025
@ezyang
Copy link
Contributor

@pytorchbot merge

pytorch-bot[bot] reacted with thumbs up emoji

@pytorchmergebot
Copy link
Collaborator

Merge started

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

Learn more about merging in thewiki.

Questions? Feedback? Please reach out to thePyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@oralubenoraluben deleted the tensor-new_tensor-device branchJanuary 25, 2025 09:33
nWEIdia pushed a commit to nWEIdia/pytorch that referenced this pull requestJan 27, 2025
…ch#144958)Fixespytorch#144957Closespytorch#73838 cc@albanD@ezyangCurrently, `tensor_a.new_tensor()` will return a on-cpu tensor no matter where is `tensor_a`. This differs from the document and is a side-effect ofpytorch#41984.Seepytorch#144957 how current logic breaks dynamo.This PR restore the documented behavior and add tests for `new_tensor`.Pull Requestresolved:pytorch#144958Approved by:https://github.com/ezyang
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ezyangezyangezyang approved these changes

Assignees

No one assigned

Labels

ciflow/trunkTrigger trunk jobs on your pull requestMergedmodule: python frontendFor issues relating to PyTorch's Python frontendopen sourcerelease notes: python_frontendpython frontend release notes categorytopic: bc breakingtopic categorytriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Milestone

No milestone

5 participants

@oraluben@ezyang@pytorchmergebot@pytorchbot@mikaylagawarecki

[8]ページ先頭

©2009-2025 Movatter.jp