ONE - On-device Neural Engine
|
Data Structures | |
class | CircleImport |
Loads TF lite file and provides helpers to access attributes. More... | |
class | CircleOpBatchMatMul |
circlechef operator builder for batchmatmul More... | |
class | CircleOpBCQFullyConnected |
circlechef operator builder for BCQFullyConnected More... | |
class | CircleOpBCQGather |
circlechef operator builder for BCQGather More... | |
class | CircleOpChef |
Interface for each operators to build circlechef. More... | |
class | CircleOpGRU |
circlechef operator builder for GRU More... | |
class | CircleOpInstanceNorm |
circlechef operator builder for INSTANCE_NORM More... | |
class | CircleOpRegistry |
circlechef operator registry More... | |
class | CircleOpRmsNorm |
circlechef operator builder for RMS_NORM More... | |
class | CircleOpRoPE |
circlechef operator builder for RoPE More... | |
class | GeneratedModel |
class | Logger |
Logger Implementation. More... | |
class | LoggerConfig |
Logger Configuration. More... | |
struct | LoggingContext |
Global logging context. More... | |
Typedefs | |
using | CircleSubGraphs_t = flatbuffers::Vector< flatbuffers::Offset< circle::SubGraph > > |
using | CircleTensors_t = flatbuffers::Vector< flatbuffers::Offset< circle::Tensor > > |
using | CircleBuffers_t = flatbuffers::Vector< flatbuffers::Offset< circle::Buffer > > |
using | CircleOperators_t = flatbuffers::Vector< flatbuffers::Offset< circle::Operator > > |
Functions | |
std::unique_ptr< ModelRecipe > | generate_recipe (const circle::Model *model) |
Create ModelRecipe from circle::Model. | |
bool | write_recipe (const std::string &filename, std::unique_ptr< ModelRecipe > &recipe) |
Write ModelRecipe to file with given name. | |
circlechef::TensorType | as_circlechef_type (const circle::TensorType type) |
circlechef::Activation | as_circlechef_activation (const circle::ActivationFunctionType type) |
circlechef::Padding | as_circlechef_padding (const circle::Padding padding) |
template<typename DT > | |
std::vector< DT > | extract_buffer (const circle::Buffer *buffer) |
extract buffer data to std::vector<DT> | |
template<typename T > | |
std::vector< T > | as_index_vector (const flatbuffers::Vector< T > *flat_array) |
void | set_inputs (CircleImport *import, circlechef::Operation *operation, const circle::Operator *op) |
void | set_outputs (CircleImport *import, circlechef::Operation *operation, const circle::Operator *op) |
GeneratedModel | cook (const ModelRecipe &model_recipe) |
GeneratedModel | cook (const ::circlechef::ModelRecipe &model_recipe) |
Generate a (in-memory) TensorFlow Lite model from a given model recipe. | |
using circlechef::CircleBuffers_t = typedef flatbuffers::Vector<flatbuffers::Offset<circle::Buffer> > |
Definition at line 34 of file CircleImport.h.
using circlechef::CircleOperators_t = typedef flatbuffers::Vector<flatbuffers::Offset<circle::Operator> > |
Definition at line 35 of file CircleImport.h.
using circlechef::CircleSubGraphs_t = typedef flatbuffers::Vector<flatbuffers::Offset<circle::SubGraph> > |
Definition at line 32 of file CircleImport.h.
using circlechef::CircleTensors_t = typedef flatbuffers::Vector<flatbuffers::Offset<circle::Tensor> > |
Definition at line 33 of file CircleImport.h.
circlechef::Activation circlechef::as_circlechef_activation | ( | const circle::ActivationFunctionType | type | ) |
Definition at line 55 of file Convert.cpp.
Referenced by circlechef::CircleOpBCQFullyConnected::build(), circlechef::CircleOpGRU::build(), and circlechef::CircleOpInstanceNorm::build().
circlechef::Padding circlechef::as_circlechef_padding | ( | const circle::Padding | padding | ) |
Definition at line 74 of file Convert.cpp.
circlechef::TensorType circlechef::as_circlechef_type | ( | const circle::TensorType | type | ) |
Definition at line 22 of file Convert.cpp.
Referenced by generate_recipe().
std::vector< T > circlechef::as_index_vector | ( | const flatbuffers::Vector< T > * | flat_array | ) |
Definition at line 43 of file Convert.h.
References flatbuffers::Vector< T >::Get(), and flatbuffers::Vector< T >::size().
Referenced by circlechef::CircleOpBCQFullyConnected::filler(), circlechef::CircleOpBCQGather::filler(), circlechef::CircleOpGRU::filler(), circlechef::CircleOpInstanceNorm::filler(), circlechef::CircleOpRmsNorm::filler(), circlechef::CircleOpRoPE::filler(), generate_recipe(), circlechef::CircleImport::select_sub_graph(), set_inputs(), and set_outputs().
GeneratedModel circlechef::cook | ( | const ::circlechef::ModelRecipe & | model_recipe | ) |
Generate a (in-memory) TensorFlow Lite model from a given model recipe.
Definition at line 529 of file ModelChef.cpp.
GeneratedModel circlechef::cook | ( | const ModelRecipe & | model_recipe | ) |
Referenced by entry(), and entry_stream().
std::vector< DT > circlechef::extract_buffer | ( | const circle::Buffer * | buffer | ) |
extract buffer data to std::vector<DT>
Definition at line 34 of file Convert.h.
std::unique_ptr< ModelRecipe > circlechef::generate_recipe | ( | const circle::Model * | model | ) |
Create ModelRecipe from circle::Model.
This will build ModelRecipe from circle::Model First to check operand filler options by scanning all operators, then translate all operands and operators. Last will set network inputs and outputs.
Definition at line 71 of file RecipeChef.cpp.
References as_circlechef_type(), as_index_vector(), circlechef::CircleImport::buffers(), circlechef::CircleImport::builtin_code(), circlechef::CircleOpRegistry::get(), flatbuffers::Vector< T >::Get(), souschef::TensorFiller::get_tensor_filler(), circlechef::CircleImport::inputs(), circlechef::CircleOpRegistry::lookup(), circlechef::CircleImport::num_subgraph(), circlechef::CircleImport::opcode_name(), circlechef::CircleImport::operators(), circlechef::CircleImport::outputs(), circlechef::CircleImport::select_sub_graph(), set_inputs(), set_outputs(), mio::circle::tensor_name(), and circlechef::CircleImport::tensors().
Referenced by entry().
void circlechef::set_inputs | ( | CircleImport * | import, |
circlechef::Operation * | operation, | ||
const circle::Operator * | op | ||
) |
Definition at line 32 of file RecipeChef.cpp.
References as_index_vector(), and mio::circle::tensor_name().
Referenced by generate_recipe().
void circlechef::set_outputs | ( | CircleImport * | import, |
circlechef::Operation * | operation, | ||
const circle::Operator * | op | ||
) |
Definition at line 52 of file RecipeChef.cpp.
References as_index_vector(), and mio::circle::tensor_name().
Referenced by generate_recipe().
bool circlechef::write_recipe | ( | const std::string & | filename, |
std::unique_ptr< ModelRecipe > & | recipe | ||
) |
Write ModelRecipe to file with given name.
Definition at line 243 of file RecipeChef.cpp.
Referenced by entry().