-
Notifications
You must be signed in to change notification settings - Fork 961
Implement load_into for mmap data loader #11561
Copy link
Copy link
Closed
Labels
good first issueGood for newcomersGood for newcomersmodule: runtimeIssues related to the core runtime and code under runtime/Issues related to the core runtime and code under runtime/module: trainingIssues related to training models on edge devicesIssues related to training models on edge devices
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersmodule: runtimeIssues related to the core runtime and code under runtime/Issues related to the core runtime and code under runtime/module: trainingIssues related to training models on edge devicesIssues related to training models on edge devices
Type
Projects
Status
Done
Status
Done
🚀 The feature, motivation and pitch
load_into is used if mutable state has a meaningful initial value. This primarily happens with on-device training but could also happen if some model had read before write state that we serialized an initial value for.
For this task we need to implement this function https://github.com/pytorch/executorch/blob/main/runtime/core/data_loader.h#L111 in https://github.com/pytorch/executorch/blob/main/extension/data_loader/mmap_data_loader.h
example of implementation in filedataloader https://github.com/pytorch/executorch/blob/main/extension/data_loader/file_data_loader.h#L75
Then add a corresponding test to https://github.com/pytorch/executorch/blob/main/extension/data_loader/test/mmap_data_loader_test.cpp
Alternatives
No response
Additional context
No response
RFC (Optional)
No response
cc @larryliu0820 @lucylq