Skip to content

Commit

Permalink
[luci/export] Split exportModule method (#13864)
Browse files Browse the repository at this point in the history
This will split exportModule method to prepare two pass execution.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Sep 1, 2024
1 parent e0d6140 commit d96ddd3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/luci/export/src/CircleExporterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ void CircleExporterImpl::exportModule(Module *module)
// prepare model data
prepareModelData(_builder, md);

exportModuleData(module, md);
}

void CircleExporterImpl::exportModuleData(Module *module, SerializedModelData &md)
{
std::vector<flatbuffers::Offset<circle::SubGraph>> subgraph_vec;

for (size_t g = 0; g < module->size(); ++g)
Expand Down
5 changes: 5 additions & 0 deletions compiler/luci/export/src/CircleExporterImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ class CircleExporterImpl
*/
void exportModule(Module *module);

/**
* @brief implementation that writes Module into internal buffer
*/
void exportModuleData(Module *module, SerializedModelData &md);

private:
flatbuffers::FlatBufferBuilder _builder;
};
Expand Down

0 comments on commit d96ddd3

Please sign in to comment.