Uh oh!
There was an error while loading. Please reload this page.
Implement load_into for SharedPtrDataLoader and add test (#11562) - #11707
Implement load_into for SharedPtrDataLoader and add test (#11562)#11707Tanish2101 wants to merge 7 commits into
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. ❌ 17 New Failures, 1 Unrelated FailureAs of commit 5b4770d with merge base ef79c3e ( NEW FAILURES - The following jobs have failed:
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. |
facebook-github-bot
commented
Jun 15, 2025
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 cla@meta.com. Thanks! |
Tanish2101
commented
Jun 15, 2025
@pytorchbot label "release notes: none" |
Tanish2101
commented
Jun 15, 2025
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. |
facebook-github-bot
commented
Jun 15, 2025
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
mergennachin
commented
Jun 16, 2025
Hi @Tanish2101 Thank you for the contribution. Looks like @keyprocedure has started the PR for the same task (#11654) |
Tanish2101
commented
Jun 16, 2025
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 ? |
Tanish2101
commented
Jun 16, 2025
So now what should I do? means should I close the pull request which I have created for this issue? Let me know @mergennachin |
| return size_; | ||
| } | ||
| ET_NODISCARD executorch::runtime::Error SharedPtrDataLoader::load_into( |
There was a problem hiding this comment.
Can you merge the declaration and implementation?
There was a problem hiding this comment.
I have merged the 'load_into' function declaration and implemention as suggested by you, please review it.
I have merge the declaration and implementation of 'load_into' function.
JacobSzwejbka
left a comment
There was a problem hiding this comment.
Letting CI run, but looks good. Thanks for contributing!
JacobSzwejbka
commented
Jun 27, 2025
All of the failures looked like infra issues so rerunning the jobs |
- Replaced non-existent with in implementation. - Updated the corresponding unit test to match the corrected error. - Ensures correctness and prevents enum resolution error during compilation.
Tanish2101
commented
Jun 28, 2025
Fixed: Changed invalid error code Error::OutOfBounds to Error::InvalidArgument in both implementation and test. OutOfBounds is not part of the executorch::runtime::Error enum |
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
lucylq
commented
Nov 4, 2025
Hi @Tanish2101 , are you still working on this? See that it's approved, do you want to rebase and merge? |
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
kirklandsign
commented
Mar 16, 2026
Hi @Tanish2101 mind updating the branch? |
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():