Skip to content
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

aux funcs in OMTrainingInterpreter #13263

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions onert-micro/onert-micro/include/OMTrainingInterpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ class OMTrainingInterpreter

// Load current status from checkpoint and save it in current model and in current config
OMStatus loadCheckpoint(OMConfig &config, const char *load_path);

OMStatus run() { return _training_runtime_module.run(); }
OMStatus allocateInputs() { return _training_runtime_module.allocateInputs(); }

void *getInputData(uint32_t position);
void *getInputDataAt(uint32_t position);
void *getOutputDataAt(uint32_t position);
};

} // namespace onert_micro
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ class OMTrainingRuntimeModule : public OMRuntimeModule
// Load checkpoints data and save it in model data and in config
// To check checkpoint file format please see https://github.com/Samsung/ONE/discussions/13037
OMStatus loadCheckpointData(OMConfig &config, const char *data);

void *getInputData(int32_t index);
};

} // namespace core
Expand Down
15 changes: 15 additions & 0 deletions onert-micro/onert-micro/src/OMTrainingInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,18 @@ OMStatus OMTrainingInterpreter::saveCheckpoint(const OMConfig &config, const cha

return Ok;
}

void *OMTrainingInterpreter::getInputDataAt(uint32_t position)
{
return _training_runtime_module.getInputDataAt(position);
}

void *OMTrainingInterpreter::getOutputDataAt(uint32_t position)
{
return _training_runtime_module.getOutputDataAt(position);
}

void *OMTrainingInterpreter::getInputData(uint32_t position)
{
return _training_runtime_module.getInputData(position);
}
5 changes: 5 additions & 0 deletions onert-micro/onert-micro/src/core/OMTrainingRuntimeModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,8 @@ OMStatus OMTrainingRuntimeModule::loadCheckpointData(OMConfig &config, const cha

return status;
}

void *OMTrainingRuntimeModule::getInputData(int32_t index)
{
return _training_handler.getInputData(index);
}
Loading