ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnc Namespace Reference

Namespaces

namespace  cli
 
namespace  opt_util
 
namespace  sir
 

Data Structures

class  AclCppCodeGenerator
 Class for the ACL C++ code generator. It is the entry point to the ACL C++ soft backend. More...
 
class  AclCppException
 objects of this class are to be thrown from ACL C++ soft backend if errors are occurred. More...
 
class  AclCppOpGenerator
 Implements the visitor for the model IR which generates the DOM description translated to C++ source/header files by the ACL soft backend code generators. More...
 
class  ArtifactBinaryExpr
 Represents different types of binary expressions. More...
 
class  ArtifactBlock
 Represents a block of instructions. More...
 
class  ArtifactBreak
 Just represents the break statement. More...
 
class  ArtifactClass
 Represents a class. More...
 
class  ArtifactClassFunction
 A class for member functions. More...
 
class  ArtifactClassMember
 Basic class for both class member variables and memmber functions. More...
 
class  ArtifactClassVariable
 A class member variables. More...
 
class  ArtifactCont
 Just represents the continue statement. More...
 
class  ArtifactDeref
 Represents an entity with semantics of C/C++ dereference (*) operator. More...
 
class  ArtifactEntity
 The base class of the whole artifact entities hierarchy. More...
 
class  ArtifactExpr
 Basic class for all expressions: identifiers, function calls, references etc. More...
 
class  ArtifactFactory
 Factory for some kinds of frequently used artifact DOM objects. More...
 
class  ArtifactForLoop
 Represents for loops. More...
 
class  ArtifactFunction
 Represents a function. More...
 
class  ArtifactFunctionCall
 Represents a function call. More...
 
class  ArtifactGeneratorCppCode
 The ACL C++ artifact source code producer. More...
 
class  ArtifactGeneratorCppDecl
 The ACL C++ artifact header file producer. More...
 
class  ArtifactId
 Type of objects which can be used to reference named entities by their names. More...
 
class  ArtifactIf
 Represents if block. More...
 
class  ArtifactIndent
 Used by code and declaration generators to indent generated text. More...
 
class  ArtifactIndex
 Array index access. More...
 
class  ArtifactLiteral
 Represents literals which should go to the artifact source code as is. More...
 
class  ArtifactModule
 Class representing a module in the ACL C++ soft backend. More...
 
class  ArtifactNamed
 Represents any named entity in the code. More...
 
class  ArtifactRef
 Represents an entity with semantics like C/C++ address of (&) operator. More...
 
class  ArtifactRet
 Just represents return from function statement. More...
 
class  ArtifactUnaryExpr
 
class  ArtifactVariable
 Represents a variable. More...
 
class  CombineTransposes
 This pass combines sequential transposes and removes identity transposes if the combination results in an identity permutation. More...
 
class  ConstantFoldTranspose
 
class  CPPCodeGenerator
 CPPCodeGenerator implements interfaces that provides BaseCodeGenerator for C++ language This includes header file generation, code file generation and variable renaming according to C++ naming requirements. More...
 
class  DataFormatSwitcher
 
class  DeadCodeElimination
 This pass removes operations without uses. Importers currently only generate sConstantOps without uses. More...
 
class  Driver
 Compiler Driver manages the whole pipeline compilation process. More...
 
class  DriverException
 exceptions description class for compiler driver More...
 
class  DumperPass
 Dumps the graph to a dot file named number%.dot where number% is how many times the graph was dumped. More...
 
class  DumpVisitor
 
class  FuseArithmeticOps
 Main purpose of this pass - is to fuse 'Conv->BatchNorm' into 'Conv' Currently 'BatchNorm' split by NNC frontends into 'Scale->Scale->BiasAdd' This optimization performs in two steps (repeated while graph changing): More...
 
class  IArtifactGenerator
 The interface of the artifact source code producer. More...
 
class  InterpreterBackend
 
class  LowerConv2D
 
class  ModelAnalyzer
 Constructs inference sequence for given computational graph, gathers list of variables used in artifact. More...
 
class  Pass
 this class represent an interface for all compiler passes like that frontend, backend etc More...
 
class  PassData
 class that encapsulate value returned and taken by pass More...
 
class  PassException
 objects of this class are to be thrown from Passes if errors are occurred More...
 
class  PassManager
 pass manager class. This class manages running of passes More...
 
class  Serializer
 Serializer of network parameters for soft backend. More...
 
class  SinkRelu
 This pass sinks relu below MaxPooling and Concat nodes. More...
 
class  SinkTranspose
 This pass sinks transposes below Relu and Concat nodes (in that order). ‘concat(relu(tr(x)), relu(tr(y))) -> tr(concat’(relu(x), relu(y)))`. More...
 

Enumerations

enum class  ArtifactCallType { obj , ref , scope }
 Indicates how object on which call is made is treated. In C++ syntax syntax: '.', '->', '::'. More...
 
enum class  ArtifactUnOp {
  preIncr , preDecr , heapNew , heapFree ,
  postIncr , postDecr
}
 Used for the ArtifactUnaryExpr. More...
 
enum class  ArtifactBinOp {
  eq , notEq , less , lessOrEq ,
  great , greatOrEq , assign , plus ,
  minus , mult , div , plusAssign ,
  minusAssign , multAssign , divAssign
}
 Used for the ArtifactBinaryExpr. More...
 

Functions

std::ostream & operator<< (std::ostream &out, const ArtifactIndent &ind)
 
template<typename E >
underlying_type< E >::type etoi (E enum_value)
 Convert enum to it's underlying type.
 
std::vector< size_t > combineAxisOrders (const std::vector< std::size_t > &order1, const std::vector< std::size_t > &order2)
 

Enumeration Type Documentation

◆ ArtifactBinOp

enum class nnc::ArtifactBinOp
strong

Used for the ArtifactBinaryExpr.

Enumerator
eq 
notEq 
less 
lessOrEq 
great 
greatOrEq 
assign 
plus 
minus 
mult 
div 
plusAssign 
minusAssign 
multAssign 
divAssign 

Definition at line 224 of file ArtifactModel.h.

◆ ArtifactCallType

enum class nnc::ArtifactCallType
strong

Indicates how object on which call is made is treated. In C++ syntax syntax: '.', '->', '::'.

Enumerator
obj 
ref 
scope 

Definition at line 43 of file ArtifactModel.h.

44{
45 obj, // '.'
46 ref, // '->'
47 scope // '::'
48};

◆ ArtifactUnOp

enum class nnc::ArtifactUnOp
strong

Used for the ArtifactUnaryExpr.

Enumerator
preIncr 
preDecr 
heapNew 
heapFree 
postIncr 
postDecr 

Definition at line 193 of file ArtifactModel.h.

Function Documentation

◆ combineAxisOrders()

std::vector< size_t > nnc::combineAxisOrders ( const std::vector< std::size_t > &  order1,
const std::vector< std::size_t > &  order2 
)

Definition at line 28 of file CombineTransposes.cpp.

30{
31 assert(order1.size() == order2.size());
32 std::vector<size_t> res(order1.size());
33 for (size_t i = 0; i < order1.size(); i++)
34 {
35 res[order2[order1[i]]] = i;
36 }
37 return res;
38}

Referenced by nnc::CombineTransposes::run().

◆ etoi()

template<typename E >
underlying_type< E >::type nnc::etoi ( enum_value)

Convert enum to it's underlying type.

Template Parameters
EEnum type
Parameters
enum_valueValue of enum
Returns
Integer value that correspond to enumVal

Definition at line 66 of file SBSerializer.cpp.

67{
68 return static_cast<typename underlying_type<E>::type>(enum_value);
69}

◆ operator<<()

std::ostream & nnc::operator<< ( std::ostream &  out,
const ArtifactIndent ind 
)
inline

Definition at line 53 of file ArtifactIndent.h.

54{
55 if (ind.level() > 0)
56 out << std::string(ind.level(), ' ');
57
58 return out;
59}

References nnc::ArtifactIndent::level().