|
ONE - On-device Neural Engine
|
#include <GraphLoader.h>
Public Member Functions | |
| GraphLoader (const loco::Graph *graph, RuntimeGraph *runtime_graph, RuntimeToIR &runtime_to_ir, const std::unordered_map< const loco::Graph *, RuntimeGraph * > &graph_to_runtime_graph, std::unordered_map< const loco::Node *, Tensor * > &node_to_tensor, IMemoryManager *memory_manager) | |
| void | loadTensors () |
| void | initInputOutputTensors () const |
| void | loadOperators () |
Static Public Member Functions | |
| static void | checkInplaceOps (CircleReader *reader, RuntimeGraph *runtime_graph) |
Definition at line 31 of file GraphLoader.h.
| luci_interpreter::GraphLoader::GraphLoader | ( | const loco::Graph * | graph, |
| RuntimeGraph * | runtime_graph, | ||
| RuntimeToIR & | runtime_to_ir, | ||
| const std::unordered_map< const loco::Graph *, RuntimeGraph * > & | graph_to_runtime_graph, | ||
| std::unordered_map< const loco::Node *, Tensor * > & | node_to_tensor, | ||
| IMemoryManager * | memory_manager | ||
| ) |
Definition at line 177 of file GraphLoader.cpp.
|
static |
Definition at line 89 of file GraphLoader.cpp.
References luci_interpreter::RuntimeGraph::addInplaceOpIndex(), luci::VectorWrapper< T >::at(), luci::CircleReader::builtin_code(), luci::must_cast(), luci::CircleReader::operators(), luci::CircleReader::outputs(), size, and luci::CircleReader::tensors().
Referenced by luci_interpreter::ModuleLoader::load().
| void luci_interpreter::GraphLoader::initInputOutputTensors | ( | ) | const |
Definition at line 274 of file GraphLoader.cpp.
References luci_interpreter::IMemoryManager::allocate_memory(), loco::input_nodes(), loco::must_cast(), luci::must_cast(), loco::output_nodes(), luci_interpreter::RuntimeGraph::setInputTensors(), and luci_interpreter::RuntimeGraph::setOutputTensors().
Referenced by luci_interpreter::ModuleLoader::load().
| void luci_interpreter::GraphLoader::loadOperators | ( | ) |
Definition at line 295 of file GraphLoader.cpp.
References luci_interpreter::RuntimeGraph::addKernel(), loco::all_nodes(), begin, luci::get_execution_plan(), luci::has_execution_plan(), luci_interpreter::RuntimeToIR::kernel_to_node, loco::must_cast(), luci::must_cast(), luci::CircleNodeExecutionPlan::order_in_plan(), loco::output_nodes(), and loco::postorder_traversal().
Referenced by luci_interpreter::ModuleLoader::load().
| void luci_interpreter::GraphLoader::loadTensors | ( | ) |
Definition at line 187 of file GraphLoader.cpp.
References luci_interpreter::RuntimeGraph::addTensor(), luci_interpreter::IMemoryManager::allocate_memory(), loco::ObjectPool< T >::at(), luci::get_execution_plan(), luci::has_execution_plan(), loco::must_cast(), luci::must_cast(), luci::CircleNode::name(), loco::Graph::nodes(), luci::CircleNode::opcode(), luci_interpreter::AffineQuantization::quantized_dimension, luci::CircleQuantParam::quantized_dimension, luci::CircleNode::quantparam(), luci_interpreter::AffineQuantization::scale, luci::CircleQuantParam::scale, size, luci_interpreter::RuntimeToIR::tensor_to_node, luci_interpreter::AffineQuantization::zero_point, and luci::CircleQuantParam::zerop.
Referenced by luci_interpreter::ModuleLoader::load().