Skip to content

Conversation

hkmatsumoto
Copy link
Contributor

This PR exposes resizable method of StorageImpl to Python frontend to make it accessible for users.

Fixes #119233

Copy link

pytorch-bot bot commented Feb 6, 2024

🔗 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 Failures

As of commit c53f54f with merge base 499040a (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
Contributor

@mikaylagawarecki mikaylagawarecki left a 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

@mikaylagawarecki
Copy link
Contributor

@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

Successfully rebased storage-resizable onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout storage-resizable && git pull --rebase)

@ezyang
Copy link
Contributor

ezyang commented Feb 6, 2024

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 6, 2024
@pytorchmergebot
Copy link
Collaborator

Merge failed

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

If not, please add the topic: 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 team Raised 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:
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood, thanks!

@mikaylagawarecki mikaylagawarecki added release notes: python_frontend python frontend release notes category topic: new features topic category labels Feb 6, 2024
@hkmatsumoto
Copy link
Contributor Author

Force-pushed as I messed up the commit message

@mikaylagawarecki
Copy link
Contributor

@pytorchbot merge

@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

pytorch-bot bot pushed a commit that referenced this pull request Feb 8, 2024
…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
clee2000 pushed a commit that referenced this pull request Feb 14, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: python_frontend python frontend release notes category topic: new features topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a binding for Storage resizable

5 participants