ONE - On-device Neural Engine
|
Loads Circle file and provides helpers to access attributes. More...
#include <CircleReader.h>
Public Member Functions | |
CircleReader ()=default | |
CircleOperatorCodes | opcodes () const |
CircleBuffers | buffers () const |
CircleTensors | tensors () const |
CircleOperators | operators () const |
VectorWrapper< int32_t > | inputs () const |
VectorWrapper< int32_t > | outputs () const |
std::string | name () const |
CircleMetadataSet | metadata () const |
uint32_t | num_subgraph () const |
circle::BuiltinOperator | builtin_code (const circle::Operator *op) const |
std::string | opcode_name (const circle::Operator *op) const |
bool | parse (const circle::Model *model) |
bool | parse (const circle::Model *model, const uint8_t *data, const size_t size) |
bool | select_subgraph (uint32_t subgraph) |
const uint8_t * | file_data (uint64_t offset) const |
size_t | file_size (void) const |
Loads Circle file and provides helpers to access attributes.
Definition at line 90 of file CircleReader.h.
|
default |
|
inline |
Definition at line 104 of file CircleReader.h.
References luci::wrap().
Referenced by luci::CircleImportMetadata::CircleImportMetadata(), luci_interpreter::RuntimeGraph::getConstDataByTensor(), and luci_interpreter::Tensor::is_constant_tensor().
circle::BuiltinOperator luci_interpreter::CircleReader::builtin_code | ( | const circle::Operator * | op | ) | const |
Definition at line 316 of file CircleReader.cpp.
References mio::circle::builtin_code_neutral(), and opcodes().
Referenced by luci_interpreter::GraphLoader::checkInplaceOps(), luci_interpreter::RuntimeGraph::configure(), luci_interpreter::RuntimeGraph::execute(), and run().
const uint8_t * luci::CircleReader::file_data | ( | uint64_t | offset | ) | const |
Definition at line 386 of file CircleReader.cpp.
References offset().
|
inline |
Definition at line 125 of file CircleReader.h.
|
inline |
Definition at line 107 of file CircleReader.h.
References luci::wrap().
Referenced by luci_interpreter::RuntimeGraph::configureGraphInput(), luci_interpreter::RuntimeGraph::configureGraphInput(), validate_onnx2circle.OnnxRunner::feed_random_inputs(), luci_interpreter::RuntimeGraph::getInputDataSizeByIndex(), luci_interpreter::RuntimeGraph::getInputTensorByIndex(), luci_interpreter::RuntimeGraph::getNumOfInputTensors(), luci_interpreter::RuntimeGraph::resetOutputTensorsData(), and package.infer.session::set_inputs().
|
inline |
Definition at line 110 of file CircleReader.h.
References luci::wrap().
Referenced by luci::CircleImportMetadata::CircleImportMetadata().
|
inline |
Definition at line 109 of file CircleReader.h.
References luci::fb_string2std_string().
|
inline |
Definition at line 112 of file CircleReader.h.
References luci::wrap().
Referenced by luci_interpreter::ModuleLoader::load(), run(), and select_subgraph().
std::string luci::CircleReader::opcode_name | ( | const circle::Operator * | op | ) | const |
Definition at line 329 of file CircleReader.cpp.
References mio::circle::opcode_name(), and opcodes().
|
inline |
Definition at line 103 of file CircleReader.h.
References luci::wrap().
Referenced by luci::GraphBuilder::build(), luci::GraphBuilderMultiOutput::build(), luci::CircleWhileGraphBuilder::build(), builtin_code(), and opcode_name().
|
inline |
Definition at line 106 of file CircleReader.h.
References luci::wrap().
Referenced by luci_interpreter::GraphLoader::checkInplaceOps(), luci_interpreter::RuntimeGraph::configure(), luci_interpreter::RuntimeGraph::execute(), and run().
|
inline |
Definition at line 108 of file CircleReader.h.
References luci::wrap().
Referenced by luci_interpreter::GraphLoader::checkInplaceOps(), luci_interpreter::RuntimeGraph::execute(), validate_onnx2circle.OnnxRunner::get_outputs(), luci_interpreter::RuntimeGraph::getNumOfOutputTensors(), luci_interpreter::RuntimeGraph::getOutputDataByIndex(), luci_interpreter::RuntimeGraph::getOutputDataSizeByIndex(), luci_interpreter::RuntimeGraph::getOutputTensorByIndex(), package.infer.session::inference(), luci_interpreter::RuntimeGraph::resetOutputTensorsData(), and package.infer.session::set_outputs().
bool luci_interpreter::CircleReader::parse | ( | const circle::Model * | model | ) |
Definition at line 341 of file CircleReader.cpp.
Referenced by luci_interpreter::ModuleLoader::load(), and run().
bool luci::CircleReader::parse | ( | const circle::Model * | model, |
const uint8_t * | data, | ||
const size_t | size | ||
) |
Definition at line 351 of file CircleReader.cpp.
References flatbuffers::data(), and size.
bool luci_interpreter::CircleReader::select_subgraph | ( | uint32_t | subgraph | ) |
Definition at line 366 of file CircleReader.cpp.
References num_subgraph().
Referenced by luci_interpreter::ModuleLoader::load(), run(), and luci_interpreter::RuntimeModule::selectSubgraph().
|
inline |
Definition at line 105 of file CircleReader.h.
References luci::wrap().
Referenced by luci::GraphBuilder::build(), luci::GraphBuilderMultiOutput::build(), luci::CircleWhileGraphBuilder::build(), luci_interpreter::CircleReferencingConstNodeBuilder::build(), luci::CircleConstNodeBuilder::build(), luci_interpreter::GraphLoader::checkInplaceOps(), luci_interpreter::RuntimeGraph::configureGraphInput(), luci_interpreter::RuntimeGraph::configureGraphInput(), luci::create_circlevariable(), luci_interpreter::RuntimeGraph::execute(), luci_interpreter::RuntimeGraph::getCircleTensorByIndex(), luci_interpreter::RuntimeGraph::getInputDataSizeByIndex(), luci_interpreter::RuntimeGraph::getInputTensorByIndex(), luci_interpreter::RuntimeGraph::getOutputDataByIndex(), luci_interpreter::RuntimeGraph::getOutputDataSizeByIndex(), luci_interpreter::RuntimeGraph::getOutputTensorByIndex(), and luci_interpreter::RuntimeGraph::resetOutputTensorsData().