17#ifndef __CIRCLE_EXPORTER_UTILS_H__
18#define __CIRCLE_EXPORTER_UTILS_H__
22#include "circle_schema_generated.h"
28#include <unordered_map>
32namespace circle_detail
55template <>
struct hash<
exo::circle_detail::OpCode>
64namespace circle_detail
77 circle::DataFormat
_data_format{circle::DataFormat::DataFormat_CHANNELS_LAST};
88 std::vector<flatbuffers::Offset<circle::Operator>>
_operators;
89 std::vector<flatbuffers::Offset<circle::Tensor>>
_tensors;
90 std::vector<flatbuffers::Offset<circle::Buffer>>
_buffers;
Logical unit of computation.
Stride configuration for N-dimensional spatial operations.
void registerGraphIOName(loco::Graph *graph, SerializedModelData &gd)
Register graph input and output names to SerializedModelData.
circle::Padding getOpPadding(const loco::Padding2D *pad, const loco::Stride< 2 > *stride, const ShapeDescription &ifm, const ShapeDescription &ofm)
TFLTensorIndex get_tensor_index(loco::Node *node)
void set_tensor_index(loco::Node *node, const TFLTensorIndex &tensor_id)
circle::ActivationFunctionType to_circle_actfunc(locoex::FusedActFunc func)
circle::BuiltinOperator opcode
bool operator==(const OpCode &rhs) const
SerializedModelData(const SerializedModelData &)=delete
uint32_t registerBuiltinOpcode(circle::BuiltinOperator builtin_code)
if opcode is not registered in table of opcodes add it
std::unordered_map< loco::Pull *, std::string > _pull_to_name
SerializedModelData()=default
std::unordered_map< OpCode, std::string > _custom_operator_codes
std::vector< flatbuffers::Offset< circle::Tensor > > _tensors
std::vector< flatbuffers::Offset< circle::Operator > > _operators
std::vector< flatbuffers::Offset< circle::Buffer > > _buffers
std::unordered_map< loco::Push *, std::string > _push_to_name
std::unordered_map< OpCode, uint32_t > _operator_codes
uint32_t registerCustomOpcode(const std::string &custom_op)
Record the information of T/F Lite SubGraph and its mapping to loco.
std::vector< int32_t > _outputs
SubGraph output tensor id.
circle::DataFormat _data_format
@DataFormat for SubGraph
std::vector< int32_t > _inputs
SubGraph input tensor id.
size_t operator()(const exo::circle_detail::OpCode &x) const