-
Notifications
You must be signed in to change notification settings - Fork 796
[slimtensor] Storage and SharedPtr for CPU owning mode #16383
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
This diff introduces the foundation for tensor storage management in the SlimTensor migration:
- util/SharedPtr.h - A lightweight, non-thread-safe shared pointer optimized for single-threaded tensor operations.
- core/Storage.h - The MaybeOwningStorage class that manages tensor data memory:
- DeviceTraits<CPU> specialization with allocate(), free(), memcpy() using malloc/free
- Owning mode for CPU device (CUDA and non-owning mode added later)
- Storage type alias as SharedPtr<MaybeOwningStorage>
- Move semantics for efficient resource transfer
- clone() and copy_() methods for data management
Differential Revision: [D89747980](https://our.internmc.facebook.com/intern/diff/D89747980/)
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16383
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 7 Unrelated FailuresAs of commit 169c8f2 with merge base 9ba1b5d ( NEW FAILURE - The following job has failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
This diff introduces the foundation for tensor storage management in the SlimTensor migration:
- util/SharedPtr.h - A lightweight, non-thread-safe shared pointer optimized for single-threaded tensor operations.
- core/Storage.h - The MaybeOwningStorage class that manages tensor data memory:
- DeviceTraits<CPU> specialization with allocate(), free(), memcpy() using malloc/free
- Owning mode for CPU device (CUDA and non-owning mode added later)
- Storage type alias as SharedPtr<MaybeOwningStorage>
- Move semantics for efficient resource transfer
- clone() and copy_() methods for data management
Differential Revision: [D89747980](https://our.internmc.facebook.com/intern/diff/D89747980/)
[ghstack-poisoned]
This diff introduces the foundation for tensor storage management in the SlimTensor migration:
- util/SharedPtr.h - A lightweight, non-thread-safe shared pointer optimized for single-threaded tensor operations.
- core/Storage.h - The MaybeOwningStorage class that manages tensor data memory:
- DeviceTraits<CPU> specialization with allocate(), free(), memcpy() using malloc/free
- Owning mode for CPU device (CUDA and non-owning mode added later)
- Storage type alias as SharedPtr<MaybeOwningStorage>
- Move semantics for efficient resource transfer
- clone() and copy_() methods for data management
Differential Revision: [D89747980](https://our.internmc.facebook.com/intern/diff/D89747980/)
[ghstack-poisoned]
JacobSzwejbka
left a comment
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.
Review automatically exported from Phabricator review in Meta.
This diff introduces the foundation for tensor storage management in the SlimTensor migration:
- util/SharedPtr.h - A lightweight, non-thread-safe shared pointer optimized for single-threaded tensor operations.
- core/Storage.h - The MaybeOwningStorage class that manages tensor data memory:
- DeviceTraits<CPU> specialization with allocate(), free(), memcpy() using malloc/free
- Owning mode for CPU device (CUDA and non-owning mode added later)
- Storage type alias as SharedPtr<MaybeOwningStorage>
- Move semantics for efficient resource transfer
- clone() and copy_() methods for data management
Differential Revision: [D89747980](https://our.internmc.facebook.com/intern/diff/D89747980/)
[ghstack-poisoned]
This diff introduces the foundation for tensor storage management in the SlimTensor migration:
- util/SharedPtr.h - A lightweight, non-thread-safe shared pointer optimized for single-threaded tensor operations.
- core/Storage.h - The MaybeOwningStorage class that manages tensor data memory:
- DeviceTraits<CPU> specialization with allocate(), free(), memcpy() using malloc/free
- Owning mode for CPU device (CUDA and non-owning mode added later)
- Storage type alias as SharedPtr<MaybeOwningStorage>
- Move semantics for efficient resource transfer
- clone() and copy_() methods for data management
Differential Revision: [D89747980](https://our.internmc.facebook.com/intern/diff/D89747980/)
[ghstack-poisoned]
This diff introduces the foundation for tensor storage management in the SlimTensor migration:
- util/SharedPtr.h - A lightweight, non-thread-safe shared pointer optimized for single-threaded tensor operations.
- core/Storage.h - The MaybeOwningStorage class that manages tensor data memory:
- DeviceTraits<CPU> specialization with allocate(), free(), memcpy() using malloc/free
- Owning mode for CPU device (CUDA and non-owning mode added later)
- Storage type alias as SharedPtr<MaybeOwningStorage>
- Move semantics for efficient resource transfer
- clone() and copy_() methods for data management
Differential Revision: [D89747980](https://our.internmc.facebook.com/intern/diff/D89747980/)
[ghstack-poisoned]
eed3c04
into
gh/gasoonjia/74/base
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #16383 by @Gasoonjia ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/gasoonjia/74/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/74/head Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/gasoonjia/73/orig Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/74/orig Differential Revision: [D89747980](https://our.internmc.facebook.com/intern/diff/D89747980/) @diff-train-skip-merge --------- Co-authored-by: gasoonjia <[email protected]>
Stack from ghstack (oldest at bottom):
This diff introduces the foundation for tensor storage management in the SlimTensor migration:
Differential Revision: D89747980