-
Notifications
You must be signed in to change notification settings - Fork 595
Implement load_into for SharedPtrDataLoader and add test (#11562) #11707
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11707
Note: Links to docs will display an error until the docs builds have been completed. ❌ 6 New FailuresAs of commit fea2310 with merge base 56392aa ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Hi @Tanish2101! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
@pytorchbot label "release notes: none" |
Hi @JacobSzwejbka, I created a PR for this issue. This is the first time I am contributing to executorch. Please Let me know if there are any changes required. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Hi @Tanish2101 Thank you for the contribution. Looks like @keyprocedure has started the PR for the same task (#11654) |
I have implemented the load_into() function for shared_ptr data loader so the implementation done by @keyprocedure for mmap data loader is sufficient? means there is no need for seperate implementation for shared_ptr ? |
So now what should I do? means should I close the pull request which I have created for this issue? Let me know @mergennachin |
|
||
ET_NODISCARD executorch::runtime::Result<size_t> size() const override { | ||
return size_; | ||
} | ||
|
||
ET_NODISCARD executorch::runtime::Error SharedPtrDataLoader::load_into( |
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.
Can you merge the declaration and implementation?
Summary:
Implemented the load_into method for SharedPtrDataLoader to support copying preallocated buffer data into a target buffer. This enables use cases where mutable model state has a meaningful initial value (e.g., on-device training or serialized read-before-write data).
Fixes
Fixes #11562
Test plan:
Added a unit test in shared_ptr_data_loader_test.cpp to verify that load_into():