ONE - On-device Neural Engine
|
Namespaces | |
namespace | operation |
namespace | train |
namespace | verifier |
Data Structures | |
class | CachedData |
class | Coordinates |
Class to represent position(offset) of tensor. Assume that the front is higher dimensional. i.g. N: 0, C: 1, H: 2, W: 3 for NCHW layout. More... | |
struct | Data |
struct | Dilation |
struct | ExplicitPadding |
class | ExternalData |
struct | FeatureShape |
Structure to have values of dimensions for feature. More... | |
class | Graph |
struct | IGraph |
struct | IOperation |
class | LayoutSet |
class | MMapedData |
class | Model |
struct | ModelEdge |
struct | ModelEdgeEqual |
struct | ModelEdgeHash |
struct | ModelEdges |
Struct to gather model I/O information in multimodel NN package Model I/O will have role one of below. More... | |
class | NNPkg |
class | Operand |
class | OperandConstraint |
class | OperandIndexSequence |
class | OperandInfo |
Class to save tensor's shape and type. More... | |
class | Operands |
class | Operation |
class | OperationDumper |
class | OperationIndexSet |
class | Operations |
class | OperationValidator |
struct | OperationVisitor |
struct | Padding |
struct | Quantization |
struct | Shape |
struct | Sparsity |
Structure for Sparse Tensor. More... | |
struct | Stride |
class | TypeInfo |
Typedefs | |
using | OperationIndex = ::onert::util::Index< uint32_t, OperationIndexTag > |
using | OperandIndex = ::onert::util::Index< uint32_t, OperandIndexTag > |
using | IOIndex = ::onert::util::Index< uint32_t, IOIndexTag > |
using | SubgraphIndex = ::onert::util::Index< uint16_t, SubgraphIndexTag > |
using | ModelIndex = ::onert::util::Index< uint16_t, ModelIndexTag > |
using | OriginIndex = ::onert::util::Index< uint32_t, OriginIndexTag > |
using | IODesc = std::tuple< ModelIndex, SubgraphIndex, IOIndex > |
using | ModelEdgeSet = std::unordered_set< ir::ModelEdge, ir::ModelEdgeHash, ir::ModelEdgeEqual > |
template<typename T > | |
using | OperandIndexMap = std::unordered_map< OperandIndex, T > |
template<typename T > | |
using | OperationIndexMap = std::unordered_map< OperationIndex, T > |
Enumerations | |
enum class | DataType { FLOAT32 = 0 , INT32 = 1 , UINT32 = 2 , QUANT_UINT8_ASYMM = 3 , BOOL8 = 4 , UINT8 = 5 , QUANT_INT8_SYMM = 6 , FLOAT16 = 7 , INT64 = 8 , QUANT_INT8_ASYMM = 9 , QUANT_INT16_ASYMM = 10 , QUANT_INT8_SYMM_PER_CHANNEL = 11 , QUANT_INT16_SYMM = 12 , QUANT_GGML_Q4_0 = 13 , QUANT_GGML_Q8_0 = 14 } |
enum class | Activation { NONE = 0 , RELU = 1 , RELU1 = 2 , RELU6 = 3 , TANH = 4 , SIGMOID = 5 } |
enum class | FullyConnectedWeightsFormat { Default = 0 , Shuffled4x16Int8 = 1 , Shuffled16x1Float32 = 127 } |
enum class | Layout { UNKNOWN = 0 , NHWC , NCHW } |
enum class | PermuteType { NHWC_TO_NCHW , NCHW_TO_NHWC , COPY } |
enum class | OpCode { Invalid , OP , COUNT } |
enum class | Remove { DUPLICATED = 1 , UNDEFINED = 2 } |
enum class | MemAllocType { STATIC , DYNAMIC } |
enum class indicating when the memory for a tensor is allocated More... | |
enum class | PaddingType { EXPLICIT = 0 , SAME = 1 , VALID = 2 } |
Functions | |
Coordinates | convertCoordinates (const Coordinates &coords, const PermuteType &type) |
Convert coordinate for layout change. | |
size_t | sizeOfDataType (DataType data_type) |
template<typename IndexType > | |
std::ostream & | _index_print_impl (std::ostream &o, const std::string &prefix, IndexType index) |
std::ostream & | operator<< (std::ostream &o, const OperationIndex &i) |
std::ostream & | operator<< (std::ostream &o, const OperandIndex &i) |
std::ostream & | operator<< (std::ostream &o, const IOIndex &i) |
std::ostream & | operator<< (std::ostream &o, const SubgraphIndex &i) |
std::ostream & | operator<< (std::ostream &o, const ModelIndex &i) |
std::ostream & | operator<< (std::ostream &o, const OriginIndex &i) |
std::string | to_string (Layout layout) |
std::ostream & | operator<< (std::ostream &o, const IODesc &od) |
const char * | toString (OpCode opcode) |
OpCode | toOpCode (const std::string str) |
std::string | to_string (const PaddingType type) |
Converts a internal padding type to const char*. | |
const ExplicitPadding | calculatePadding (const Padding &padding, const FeatureShape &ifm_shape, const FeatureShape &ofm_shape, const Stride &stride, uint32_t kw, uint32_t kh, uint32_t dwf=1, uint32_t dhf=1) |
bool | operator== (const Shape &lhs, const Shape &rhs) |
bool | operator!= (const Shape &lhs, const Shape &rhs) |
Shape | convertShape (const Shape &shape, const PermuteType &type) |
Converts shape when its rank is 4. | |
bool | rankMaybeUnspecified (const ir::Shape &shape) |
Find out if tha rank in this shape is "maybe" unspecified. Note that when rank == 0, shape could represent scalar or unspecified rank. | |
bool | operator== (const TypeInfo &lhs, const TypeInfo &rhs) |
bool | operator!= (const TypeInfo &lhs, const TypeInfo &rhs) |
std::ostream & | operator<< (std::ostream &o, const OperandIndexSequence &operand_seq) |
std::unique_ptr< Operation > | clone (const IOperation &operation) |
using onert::ir::IODesc = typedef std::tuple<ModelIndex, SubgraphIndex, IOIndex> |
using onert::ir::IOIndex = typedef ::onert::util::Index<uint32_t, IOIndexTag> |
using onert::ir::ModelEdgeSet = typedef std::unordered_set<ir::ModelEdge, ir::ModelEdgeHash, ir::ModelEdgeEqual> |
using onert::ir::ModelIndex = typedef ::onert::util::Index<uint16_t, ModelIndexTag> |
using onert::ir::OperandIndex = typedef ::onert::util::Index<uint32_t, OperandIndexTag> |
using onert::ir::OperandIndexMap = typedef std::unordered_map<OperandIndex, T> |
Definition at line 29 of file OperandIndexMap.h.
using onert::ir::OperationIndex = typedef ::onert::util::Index<uint32_t, OperationIndexTag> |
using onert::ir::OperationIndexMap = typedef std::unordered_map<OperationIndex, T> |
Definition at line 29 of file OperationIndexMap.h.
using onert::ir::OriginIndex = typedef ::onert::util::Index<uint32_t, OriginIndexTag> |
using onert::ir::SubgraphIndex = typedef ::onert::util::Index<uint16_t, SubgraphIndexTag> |
|
strong |
|
strong |
Definition at line 27 of file DataType.h.
|
strong |
Enumerator | |
---|---|
Default | |
Shuffled4x16Int8 | |
Shuffled16x1Float32 |
Definition at line 49 of file InternalType.h.
|
strong |
|
strong |
enum class indicating when the memory for a tensor is allocated
Definition at line 37 of file OperandInfo.h.
|
strong |
|
strong |
|
strong |
Enumerator | |
---|---|
NHWC_TO_NCHW | |
NCHW_TO_NHWC | |
COPY |
|
strong |
Enumerator | |
---|---|
DUPLICATED | |
UNDEFINED |
Definition at line 30 of file OperandIndexSequence.h.
std::ostream & onert::ir::_index_print_impl | ( | std::ostream & | o, |
const std::string & | prefix, | ||
IndexType | index | ||
) |
Definition at line 50 of file Index.h.
Referenced by operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), and operator<<().
const ExplicitPadding onert::ir::calculatePadding | ( | const Padding & | padding, |
const FeatureShape & | ifm_shape, | ||
const FeatureShape & | ofm_shape, | ||
const Stride & | stride, | ||
uint32_t | kw, | ||
uint32_t | kh, | ||
uint32_t | dwf = 1 , |
||
uint32_t | dhf = 1 |
||
) |
Definition at line 133 of file Padding.cc.
References EXPLICIT, onert::ir::Padding::param, SAME, onert::ir::Padding::type, and VALID.
Referenced by onert::backend::acl_common::kernelGenPool2D(), onert::backend::cpu::ops::ConvolutionLayer::run(), onert::backend::ruy::ops::ConvolutionLayer::run(), onert::backend::train::KernelGenerator::visit(), onert::backend::train::KernelGenerator::visit(), and onert::backend::train::KernelGenerator::visit().
std::unique_ptr< Operation > onert::ir::clone | ( | const IOperation & | operation | ) |
Definition at line 60 of file OperationCloner.cc.
References onert::ir::IOperation::accept().
Referenced by onert::ir::Operations::Operations(), and onert::ir::train::TrainableGraph::TrainableGraph().
Coordinates onert::ir::convertCoordinates | ( | const Coordinates & | coords, |
const PermuteType & | type | ||
) |
Convert coordinate for layout change.
[in] | coord | Coordinates to be converted |
[in] | type | Permutation type to be applied to coordinates |
Definition at line 26 of file Coordinates.cc.
References coords, COPY, NCHW_TO_NHWC, NHWC_TO_NCHW, and onert::ir::Coordinates::set().
Shape onert::ir::convertShape | ( | const Shape & | shape, |
const PermuteType & | type | ||
) |
Converts shape when its rank is 4.
Definition at line 69 of file Shape.cc.
References COPY, NCHW_TO_NHWC, and NHWC_TO_NCHW.
Referenced by onert::backend::builtin::kernel::PermuteLayer::run().
Definition at line 44 of file TypeInfo.cc.
|
inline |
|
inline |
Definition at line 70 of file Index.h.
References _index_print_impl().
|
inline |
Definition at line 80 of file Index.h.
References _index_print_impl().
|
inline |
Definition at line 65 of file Index.h.
References _index_print_impl().
std::ostream & onert::ir::operator<< | ( | std::ostream & | o, |
const OperandIndexSequence & | operand_seq | ||
) |
Definition at line 70 of file OperandIndexSequence.cc.
|
inline |
Definition at line 60 of file Index.h.
References _index_print_impl().
|
inline |
Definition at line 85 of file Index.h.
References _index_print_impl().
|
inline |
Definition at line 75 of file Index.h.
References _index_print_impl().
Definition at line 24 of file TypeInfo.cc.
References onert::ir::TypeInfo::scale(), onert::ir::TypeInfo::type(), and onert::ir::TypeInfo::zero_point().
|
inline |
size_t onert::ir::sizeOfDataType | ( | DataType | data_type | ) |
Definition at line 29 of file DataType.cc.
Referenced by onert::backend::builtin::UserTensor::applyShape(), onert::exec::EdgeTensor::applyShape(), onert::ir::Operand::operandSize(), onert::backend::builtin::kernel::PermuteLayer::optimize(), and onert::ir::OperandInfo::total_size().
|
inline |
Converts a internal padding type to const char*.
[in] | type | Padding type to be converted |
Definition at line 102 of file Padding.cc.
|
inline |
OpCode onert::ir::toOpCode | ( | const std::string | str | ) |
const char * onert::ir::toString | ( | OpCode | opcode | ) |
Definition at line 26 of file OpCode.cc.
References COUNT, and Invalid.
Referenced by onert::ir::IOperation::name(), onert::ir::operation::Pool2D::name(), and onert::ir::operation::Reduce::name().