ONE - On-device Neural Engine
Loading...
Searching...
No Matches
exo::test Namespace Reference

Data Structures

class  ExampleGraph
 
class  ExampleGraph< ExampleGraphType::ConstGen_ReLU >
 Class to creates the following: More...
 
class  ExampleGraph< ExampleGraphType::FeatureBiasAdd >
 Class to create the following: More...
 
class  ExampleGraph< ExampleGraphType::FilterEncode_FilterDecode >
 Class to creates the following: More...
 
class  ExampleGraph< ExampleGraphType::TFLTranspose >
 Class to create the following: More...
 
class  ExampleGraph< ExampleGraphType::Transpose >
 Class to creates the following: More...
 
class  TestGraph
 
class  TypeShapeReadyPhase
 Phase for test, that is used to test pass. This phase initially adds TypeInferencePass and ShapeInferencePass. More...
 

Enumerations

enum class  ExampleGraphType {
  FeatureBiasAdd , ConstGen_ReLU , FilterEncode_FilterDecode , Transpose ,
  TFLTranspose
}
 

Functions

template<typename LocoNodeT >
LocoNodeT * get_only_succ (loco::Node *parent)
 Get the only succ object of type LocoNodeT. (The name only succ comes from English word only child.) parent must have 1 succ only. When there is no succ of type LocoNodeT, nullptr will be returned.
 
template<typename T >
T * find_first_node_bytype (loco::Graph *g)
 

Enumeration Type Documentation

◆ ExampleGraphType

enum class exo::test::ExampleGraphType
strong
Enumerator
FeatureBiasAdd 
ConstGen_ReLU 
FilterEncode_FilterDecode 
Transpose 
TFLTranspose 

Definition at line 191 of file TestGraph.h.

192{
193 FeatureBiasAdd,
196 Transpose,
197
199};

Function Documentation

◆ find_first_node_bytype()

template<typename T >
T * exo::test::find_first_node_bytype ( loco::Graph g)
inline

Definition at line 91 of file TestHelper.h.

92{
93 T *first_node = nullptr;
94 loco::Graph::NodeContext *nodes = g->nodes();
95 uint32_t count = nodes->size();
96
97 for (uint32_t i = 0; i < count; ++i)
98 {
99 first_node = dynamic_cast<T *>(nodes->at(i));
100 if (first_node != nullptr)
101 break;
102 }
103
104 return first_node;
105}
T * at(uint32_t n) const
Access N-th object.
Definition ObjectPool.h:41
uint32_t size(void) const
Return the number of objects.
Definition ObjectPool.h:38

References loco::ObjectPool< T >::at(), and loco::ObjectPool< T >::size().

◆ get_only_succ()

template<typename LocoNodeT >
LocoNodeT * exo::test::get_only_succ ( loco::Node parent)
inline

Get the only succ object of type LocoNodeT. (The name only succ comes from English word only child.) parent must have 1 succ only. When there is no succ of type LocoNodeT, nullptr will be returned.

Definition at line 83 of file TestHelper.h.

84{
85 auto succs = loco::succs(parent);
86 EXO_ASSERT(succs.size() == 1, "parent has more than 1 succs.");
87
88 return dynamic_cast<LocoNodeT *>(*succs.begin());
89}
#define EXO_ASSERT(condition, msg)
Definition Check.h:28
std::set< Node * > succs(const Node *node)
Enumerate all the successors of a given node.
Definition Node.cpp:46

References EXO_ASSERT, and loco::succs().