Skip to content

Commit

Permalink
[luci/import] Revise GraphBuilderContext (#13793)
Browse files Browse the repository at this point in the history
This will revise GraphBuilderContext to store import model has extended buffer.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Aug 28, 2024
1 parent 109d223 commit 1583610
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class GraphBuilderContext
public:
GraphBuilderContext(loco::Graph *g, CircleReader *reader, IndexNodeFinder *nodefinder,
IndexTensorOutputs *tensoroutputs)
: _g(g), _reader(reader), _indexnodefinder(nodefinder), _indextensoroutputs(tensoroutputs)
: _g(g), _reader(reader), _indexnodefinder(nodefinder), _indextensoroutputs(tensoroutputs),
_ext_buffer(false)
{
// DO NOTHING
}
Expand All @@ -86,11 +87,16 @@ class GraphBuilderContext
IndexNodeFinder *nodefinder() { return _indexnodefinder; }
IndexTensorOutputs *tensoroutputs() { return _indextensoroutputs; }

// Buffers are extended mode, which exist outside of flatbuffers area
bool ext_buffer() const { return _ext_buffer; }
void ext_buffer(bool set) { _ext_buffer = set; }

private:
loco::Graph *_g;
CircleReader *_reader;
IndexNodeFinder *_indexnodefinder;
IndexTensorOutputs *_indextensoroutputs;
bool _ext_buffer;
};

} // namespace luci
Expand Down

0 comments on commit 1583610

Please sign in to comment.