-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add Python binding resizable
to class {Untyped,Typed}Storage
#119286
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/119286
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit c53f54f with merge base 499040a ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok other than one comment.
fyi @ezyang since you created the issue
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
2f8e29a
to
50592a7
Compare
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
self.assertEqual((sizeof_100 - sizeof_empty) // (sizeof_10 - sizeof_empty), 10) | ||
self.assertEqual((sizeof_100 - sizeof_empty) % (sizeof_10 - sizeof_empty), 0) | ||
|
||
def test_resizable(self) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test might need to be decorated with @skipIfTorchDynamo() looks like it fails on the dynamo shard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reproduced this behavior with @torch.compile
on local machine so @skipIfTorchDynamo
should be the way to go.
For my info, when JIT compiled, does x.numpy()
allocates another chunk of memory with the content of x
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When JIT compiled, we actually transparently avoid the conversion to numpy entirely. So that's why this happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood, thanks!
e85ec5d
to
c53f54f
Compare
Force-pushed as I messed up the commit message |
@pytorchbot merge |
Merge startedYour 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 |
…9286) This PR exposes `resizable` method of `StorageImpl` to Python frontend to make it accessible for users. Fixes #119233 Pull Request resolved: #119286 Approved by: https://github.com/ezyang, https://github.com/mikaylagawarecki
…9286) This PR exposes `resizable` method of `StorageImpl` to Python frontend to make it accessible for users. Fixes #119233 Pull Request resolved: #119286 Approved by: https://github.com/ezyang, https://github.com/mikaylagawarecki
This PR exposes
resizable
method ofStorageImpl
to Python frontend to make it accessible for users.Fixes #119233