ONE - On-device Neural Engine
|
Namespaces | |
namespace | FeatureLayouts |
namespace | KernelLayouts |
Data Structures | |
class | Add |
Element-wise addition. More... | |
class | Arg |
Base class for NN model arguments (Input/Output) More... | |
class | AvgPool2D |
2D Average Pooling More... | |
class | Bag |
A collection of (abstracted) elements of the same type. More... | |
class | BagManager |
class | BinaryOp |
Op with two arguments. More... | |
class | Block |
A unit of (grouped) instructions. More... | |
class | BlockIndex |
A BlockIndex denotes the index of a block in a block list. More... | |
class | BlockManager |
class | ConcatF |
Concatenate two feature maps. More... | |
class | Conv2D |
2D Convolution over 3D Feature Map with 4D kernel More... | |
class | Copy |
Index-wise element transfer between two objects. More... | |
struct | Data |
Core coco entity for constant weights. More... | |
class | Def |
class | Dep |
A Dep represents the edge between a Bag and its dependent Object. More... | |
class | Div |
Element-wise division. More... | |
struct | DLinkedList |
class | ElemID |
class | Entity |
A base class for IR entities. More... | |
class | EntityBuilder |
A base class for IR entity builders. More... | |
struct | EntityManager |
Meta (lifetime) manager interface. More... | |
class | Eval |
Evaluate an Object from a given Op. More... | |
struct | FeatureLayout |
A FeatureLayout connects each feature index to a Bag element. More... | |
class | FeatureObject |
FeatureMap values (used in CNN) More... | |
class | FeatureShape |
The shape of a feature map. More... | |
class | Input |
class | InputManager |
class | Instr |
Base interface on explicit computation steps in coco IR. More... | |
class | InstrIndex |
A InstrIndex denotes the index of an instruction in an instruction list. More... | |
class | InstrManager |
struct | KernelLayout |
A KernelLayout connectes each kernel index to an element (in a bag) More... | |
class | KernelObject |
Convolution Kernel (in CNN) values. More... | |
class | Load |
Load an Object. More... | |
struct | Locatable |
Return the associated instruction if exists. More... | |
class | MaxPool2D |
2D Max Pooling More... | |
class | Module |
Top-level element of coco IR which represents a neural network. More... | |
class | Mul |
Element-wise multiplication. More... | |
class | Object |
Base interface on all typed NN values. More... | |
class | ObjectManager |
struct | Op |
Base interface on all supported NN operations. More... | |
class | OpManager |
class | Output |
class | OutputManager |
class | Padding2D |
class | PadF |
Introduce padding area. More... | |
class | Part |
A Part represents the edge between a child Op and its parent Op. More... | |
struct | PlainWeightContext |
Non-quantized (plain) Weight Data Accessor. More... | |
class | PtrList |
class | PtrManager |
class | Read |
A Read represents an edge between a Bag and its Reader. More... | |
class | ReLU |
Apply ReLU over elements. More... | |
class | ReLU6 |
Apply ReLU6 over elements. More... | |
class | Shuffle |
Generic element transfer. More... | |
class | Span |
A Span is a non-owing reference to a memory chunk. More... | |
class | Sqrt |
Apply Sqrt over elements. More... | |
class | Step |
A Step denotes the edge between Op and Instr. More... | |
class | Stride2D |
class | Sub |
Element-wise subtraction. More... | |
class | UnaryOp |
Op with a single argument. More... | |
class | Update |
A Update represents an edge between a Bag and its Updater. More... | |
class | Use |
class | Window2D |
Typedefs | |
using | BlockList = DLinkedList< Block, Module >::Head |
using | DepSet = std::set< Dep * > |
using | InputList = PtrList< Input > |
using | InstrList = coco::DLinkedList< Instr, Block >::Head |
using | ObjectSet = std::set< Object * > |
using | OutputList = PtrList< Output > |
using | ReadSet = std::set< Read * > |
using | UpdateSet = std::set< Update * > |
using | UseSet = std::set< Use * > |
Functions | |
ObjectSet | dependent_objects (const Bag *) |
Return a set of objects that depends on a given bag. | |
Bag::ReaderSet | readers (const Bag *) |
Return a set of readers that reads a given bag. | |
Bag::UpdaterSet | updaters (const Bag *) |
Return a set of updaters that updates a given bag. | |
bool | operator== (const ElemID &lhs, const ElemID &rhs) |
bool | operator< (const ElemID &lhs, const ElemID &rhs) |
template<typename T > | |
bool | isa (const Instr *ins) |
Return true if a given instruction is of T type. | |
template<typename T > | |
T * | safe_cast (Instr *ins) |
Cast as a derived instruction. | |
template<typename T > | |
bool | isa (const Object *) |
Check whether a given object is of type T. | |
template<typename T > | |
T * | cast (Object *) |
Cast a generic object as a specific one. | |
template<typename T > | |
T * | safe_cast (Object *) |
Cast a generic object as a specific one. | |
Object::Producer * | producer (const Object *) |
Return the producer of a given object if it exists. | |
Object::ConsumerSet | consumers (const Object *) |
Return a set of consumers of a given object. | |
Op * | root (Op *) |
Return the root Op from a given Op node. | |
template<> | |
bool | isa< FeatureObject > (const Object *o) |
template<> | |
bool | isa< KernelObject > (const Object *o) |
template<> | |
FeatureObject * | cast (Object *o) |
template<> | |
KernelObject * | cast (Object *o) |
template<> | |
FeatureObject * | safe_cast (Object *o) |
template<> | |
KernelObject * | safe_cast (Object *o) |
using coco::BlockList = typedef DLinkedList<Block, Module>::Head |
using coco::DepSet = typedef std::set<Dep *> |
using coco::InputList = typedef PtrList<Input> |
Definition at line 27 of file InputList.h.
using coco::InstrList = typedef coco::DLinkedList<Instr, Block>::Head |
using coco::ObjectSet = typedef std::set<Object *> |
Definition at line 27 of file ObjectSet.h.
using coco::OutputList = typedef PtrList<Output> |
Definition at line 27 of file OutputList.h.
using coco::ReadSet = typedef std::set<Read *> |
using coco::UpdateSet = typedef std::set<Update *> |
Definition at line 27 of file UpdateSet.h.
using coco::UseSet = typedef std::set<Use *> |
T * coco::cast | ( | Object * | ) |
FeatureObject * coco::cast | ( | Object * | o | ) |
Definition at line 88 of file Object.cpp.
References coco::Object::asFeature(), and cast().
KernelObject * coco::cast | ( | Object * | o | ) |
Definition at line 96 of file Object.cpp.
References coco::Object::asKernel(), and cast().
Object::ConsumerSet coco::consumers | ( | const Object * | obj | ) |
Return a set of consumers of a given object.
Definition at line 65 of file Object.cpp.
Referenced by readers().
Return a set of objects that depends on a given bag.
Definition at line 87 of file Bag.cpp.
Referenced by readers(), and updaters().
bool coco::isa | ( | const Instr * | ins | ) |
bool coco::isa | ( | const Object * | ) |
Check whether a given object is of type T.
The example below shows how to use this "isa<T>" helper: auto obj = new FeatureObject{};
if (isa<FeatureObject>()) { std::cout << "FeatureObject" << std::endl; }
bool coco::isa< FeatureObject > | ( | const Object * | o | ) |
Casting Helpers
TODO Use Macro to reduce code duplication
Definition at line 85 of file Object.cpp.
References coco::Object::asFeature().
bool coco::isa< KernelObject > | ( | const Object * | o | ) |
Definition at line 23 of file ElemID.cpp.
References operator<(), and coco::ElemID::value().
Referenced by operator<().
Definition at line 22 of file ElemID.cpp.
References coco::ElemID::value().
Object::Producer * coco::producer | ( | const Object * | obj | ) |
Return the producer of a given object if it exists.
Definition at line 55 of file Object.cpp.
References coco::Def::producer().
Referenced by enco::eliminate_dead_object(), enco::eliminate_indirect_copy(), enco::reduce_duplicated_object(), and updaters().
Bag::ReaderSet coco::readers | ( | const Bag * | b | ) |
Return a set of readers that reads a given bag.
Definition at line 102 of file Bag.cpp.
References consumers(), and dependent_objects().
Referenced by enco::fold_constants(), enco::generate_bypass_shuffle(), enco::hoist_object(), and enco::readers().
Return the root Op from a given Op node.
Definition at line 144 of file Op.cpp.
References coco::Op::up().
T * coco::safe_cast | ( | Instr * | ins | ) |
Cast as a derived instruction.
Definition at line 153 of file Instr.h.
T * coco::safe_cast | ( | Object * | ) |
Cast a generic object as a specific one.
Unlike "cast<T>", "safe_cast<T>" accepts any object pointer
FeatureObject * coco::safe_cast | ( | Object * | o | ) |
Definition at line 104 of file Object.cpp.
References coco::Object::asFeature().
KernelObject * coco::safe_cast | ( | Object * | o | ) |
Definition at line 110 of file Object.cpp.
References coco::Object::asKernel().
Bag::UpdaterSet coco::updaters | ( | const Bag * | b | ) |
Return a set of updaters that updates a given bag.
Definition at line 125 of file Bag.cpp.
References dependent_objects(), and producer().
Referenced by enco::eliminate_dead_bag(), enco::generate_bypass_shuffle(), and enco::updaters().