Skip to content

Commit

Permalink
[tflchef] Add ext_offset field to recipe proto (#13702)
Browse files Browse the repository at this point in the history
This will add ext_offset field to recipe proto to generate Buffer data
outside of flatbuffer region.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Aug 19, 2024
1 parent bb4aa34 commit 452cf4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/tflchef/core/src/ModelChef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,9 @@ bool ModelChef::finalize_ext_buffer(void)

void ModelChef::cook(const ::tflchef::ModelRecipe &model_recipe)
{
// use Custom/Buffer offset
_ext_offset = model_recipe.has_ext_offset() ? model_recipe.ext_offset() : false;

prepare_initial_buffer();

gather_operator_codes(model_recipe);
Expand Down
2 changes: 2 additions & 0 deletions compiler/tflchef/proto/tflchef.proto
Original file line number Diff line number Diff line change
Expand Up @@ -719,4 +719,6 @@ message ModelRecipe {
optional uint32 version = 6 [default = 1];
repeated Graph graph = 7;
repeated SignatureDef signature_def = 8;
// store to external and use (Buffer) offset
optional bool ext_offset = 9 [default = false];
}

0 comments on commit 452cf4c

Please sign in to comment.