ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::CloneNode Class Referencefinal

#include <CircleCloneNode.h>

Collaboration diagram for luci::CloneNode:

Public Member Functions

 CloneNode (loco::Graph *graph)
 
luci::CircleNodevisit (const luci::CircleBCQFullyConnected *) final
 
luci::CircleNodevisit (const luci::CircleBCQGather *) final
 
luci::CircleNodevisit (const luci::CircleInstanceNorm *) final
 
luci::CircleNodevisit (const luci::CircleGRU *) final
 
luci::CircleNodevisit (const luci::CircleRmsNorm *) final
 
luci::CircleNodevisit (const luci::CircleRoPE *) final
 
luci::CircleNodevisit (const luci::CircleCustomOut *) final
 
luci::CircleNodevisit (const luci::CircleIfOut *) final
 
luci::CircleNodevisit (const luci::CircleNonMaxSuppressionV4Out *) final
 
luci::CircleNodevisit (const luci::CircleNonMaxSuppressionV5Out *) final
 
luci::CircleNodevisit (const luci::CircleOutputDummy *) final
 
luci::CircleNodevisit (const luci::CircleOutputExclude *) final
 
luci::CircleNodevisit (const luci::CircleSplitOut *) final
 
luci::CircleNodevisit (const luci::CircleSplitVOut *) final
 
luci::CircleNodevisit (const luci::CircleTopKV2Out *) final
 
luci::CircleNodevisit (const luci::CircleUniqueOut *) final
 
luci::CircleNodevisit (const luci::CircleUnpackOut *) final
 
luci::CircleNodevisit (const luci::CircleVariable *) final
 
luci::CircleNodevisit (const luci::CircleWhileOut *) final
 
luci::CircleNodevisit (const luci::CircleNode *) final
 Default fallback.
 
- Public Member Functions inherited from luci::CircleNodeVisitor< luci::CircleNode * >
virtual ~CircleNodeVisitor ()=default
 
- Public Member Functions inherited from luci::CircleNodeVisitorBase< T >
virtual ~CircleNodeVisitorBase ()=default
 

Protected Attributes

loco::Graph_graph = nullptr
 

Detailed Description

Definition at line 251 of file CircleCloneNode.h.

Constructor & Destructor Documentation

◆ CloneNode()

luci::CloneNode::CloneNode ( loco::Graph graph)
inline

Definition at line 254 of file CircleCloneNode.h.

254: _graph(graph){};
loco::Graph * _graph

Member Function Documentation

◆ visit() [1/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleBCQFullyConnected node)
final

Definition at line 22 of file CircleBCQFullyConnected.cpp.

23{
25 return nullptr;
26
28 if (cloned != nullptr)
29 {
31 cloned->weights_hidden_size(node->weights_hidden_size());
32 }
33 return cloned;
34}
NodeContext * nodes(void)
Definition Graph.h:218
Derived * create(Args &&...args)
Definition NodePool.h:37
BCQ_FULLY_CONNECTED in Circle.

References _graph, loco::NodePool::create(), luci::CircleNodeMixin< CircleNodeTrait::FusedActFunc >::fusedActivationFunction(), loco::Graph::nodes(), luci::UNDEFINED, and luci::CircleBCQFullyConnected::weights_hidden_size().

◆ visit() [2/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleBCQGather node)
final

Definition at line 22 of file CircleBCQGather.cpp.

23{
24 auto *cloned = _graph->nodes()->create<luci::CircleBCQGather>();
25 if (cloned != nullptr)
26 {
27 cloned->axis(node->axis());
28 cloned->input_hidden_size(node->input_hidden_size());
29 }
30 return cloned;
31}
BCQ_GATHER in Circle.
int32_t input_hidden_size(void) const
int32_t axis(void) const

References _graph, luci::CircleBCQGather::axis(), loco::NodePool::create(), luci::CircleBCQGather::input_hidden_size(), and loco::Graph::nodes().

◆ visit() [3/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleCustomOut node)
final

Definition at line 22 of file CircleCustomOut.cpp.

23{
24 auto *cloned = _graph->nodes()->create<luci::CircleCustomOut>();
25 if (cloned != nullptr)
26 cloned->index(node->index());
27 return cloned;
28}
Virtual CIRCLECUSTOMOUT in Circle.
int32_t index(void) const

References _graph, loco::NodePool::create(), luci::CircleCustomOut::index(), and loco::Graph::nodes().

◆ visit() [4/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleGRU node)
final

Definition at line 22 of file CircleGRU.cpp.

23{
25 return nullptr;
26
27 auto *cloned = _graph->nodes()->create<luci::CircleGRU>();
28 if (cloned != nullptr)
29 {
31 cloned->returnSequences(node->returnSequences());
32 cloned->timeMajor(node->timeMajor());
33 }
34 return cloned;
35}
GRU in Circle.
Definition CircleGRU.h:32
bool timeMajor() const
Definition CircleGRU.h:59
FusedActFunc fusedActivationFunction() const
Definition CircleGRU.h:53
bool returnSequences() const
Definition CircleGRU.h:56

References _graph, loco::NodePool::create(), luci::CircleGRU::fusedActivationFunction(), loco::Graph::nodes(), luci::CircleGRU::returnSequences(), luci::CircleGRU::timeMajor(), and luci::UNDEFINED.

◆ visit() [5/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleIfOut node)
final

Definition at line 100 of file CircleIfOut.cpp.

101{
102 auto *cloned = _graph->nodes()->create<luci::CircleIfOut>();
103 if (cloned != nullptr)
104 cloned->index(node->index());
105 return cloned;
106}
Virtual CIRCLEIFOUT in Circle.
Definition CircleIfOut.h:32
int32_t index(void) const
Definition CircleIfOut.h:38

References _graph, loco::NodePool::create(), luci::CircleIfOut::index(), and loco::Graph::nodes().

◆ visit() [6/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleInstanceNorm node)
final

Definition at line 22 of file CircleInstanceNorm.cpp.

23{
25 return nullptr;
26
27 auto *cloned = _graph->nodes()->create<luci::CircleInstanceNorm>();
28 if (cloned != nullptr)
29 {
31 cloned->epsilon(node->epsilon());
32 }
33 return cloned;
34}
INSTANCE_NORM in Circle.

References _graph, loco::NodePool::create(), luci::CircleInstanceNorm::epsilon(), luci::CircleNodeMixin< CircleNodeTrait::FusedActFunc >::fusedActivationFunction(), loco::Graph::nodes(), and luci::UNDEFINED.

◆ visit() [7/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleNode )
finalvirtual

Default fallback.

Reimplemented from luci::CircleNodeVisitor< luci::CircleNode * >.

Definition at line 22 of file CircleCloneNode.cpp.

23{
24#define CNVISIT_GRP(GRP) \
25 { \
26 CloneNodeLet<CN::GRP> cn(_graph); \
27 auto cloned = node->accept(&cn); \
28 if (cloned != nullptr) \
29 return cloned; \
30 }
31
39
40#undef CNVISIT_GRP
41
42 return nullptr;
43}
#define CNVISIT_GRP(GRP)

References luci::ABC, CNVISIT_GRP, luci::DEF, luci::GHIJ, luci::KLMN, luci::OPQR, luci::STUV, and luci::WXYZ.

◆ visit() [8/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleNonMaxSuppressionV4Out node)
final

Definition at line 22 of file CircleNonMaxSuppressionV4Out.cpp.

23{
25 if (cloned != nullptr)
26 cloned->index(node->index());
27 return cloned;
28}
Virtual NONMAXSUPPRESSIONV4OUT in Circle.

References _graph, loco::NodePool::create(), luci::CircleNonMaxSuppressionV4Out::index(), and loco::Graph::nodes().

◆ visit() [9/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleNonMaxSuppressionV5Out node)
final

Definition at line 22 of file CircleNonMaxSuppressionV5Out.cpp.

23{
25 if (cloned != nullptr)
26 cloned->index(node->index());
27 return cloned;
28}
Virtual NONMAXSUPPRESSIONV5OUT in Circle.

References _graph, loco::NodePool::create(), luci::CircleNonMaxSuppressionV5Out::index(), and loco::Graph::nodes().

◆ visit() [10/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleOutputDummy )
final

Definition at line 22 of file CircleOutputDummy.cpp.

23{
25}
Temporary DummyNode used with dangle CircleNode.

References _graph, loco::NodePool::create(), and loco::Graph::nodes().

◆ visit() [11/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleOutputExclude )
final

Definition at line 22 of file CircleOutputExclude.cpp.

23{
25}
CircleOutputExclude is used to specifying not exported nodes.

References _graph, loco::NodePool::create(), and loco::Graph::nodes().

◆ visit() [12/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleRmsNorm node)
final

Definition at line 22 of file CircleRmsNorm.cpp.

23{
24 auto *cloned = _graph->nodes()->create<luci::CircleRmsNorm>();
25 if (cloned != nullptr)
26 {
27 cloned->epsilon(node->epsilon());
28 }
29 return cloned;
30}
RMS_NORM in Circle.
float epsilon() const

References _graph, loco::NodePool::create(), luci::CircleRmsNorm::epsilon(), and loco::Graph::nodes().

◆ visit() [13/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleRoPE node)
final

Definition at line 22 of file CircleRoPE.cpp.

23{
24 if (node->mode() == luci::RoPEMode::UNDEFINED)
25 return nullptr;
26
27 auto *cloned = _graph->nodes()->create<luci::CircleRoPE>();
28
29 return cloned;
30}
ROPE in Circle.
Definition CircleRoPE.h:33
RoPEMode mode() const
Definition CircleRoPE.h:46

References _graph, loco::NodePool::create(), luci::CircleRoPE::mode(), loco::Graph::nodes(), and luci::UNDEFINED.

◆ visit() [14/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleSplitOut node)
final

Definition at line 22 of file CircleSplitOut.cpp.

23{
24 auto *cloned = _graph->nodes()->create<luci::CircleSplitOut>();
25 if (cloned != nullptr)
26 cloned->index(node->index());
27 return cloned;
28}
Virtual CIRCLESPLITOUT in Circle.
int32_t index(void) const

References _graph, loco::NodePool::create(), luci::CircleSplitOut::index(), and loco::Graph::nodes().

◆ visit() [15/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleSplitVOut node)
final

Definition at line 22 of file CircleSplitVOut.cpp.

23{
24 auto *cloned = _graph->nodes()->create<luci::CircleSplitVOut>();
25 if (cloned != nullptr)
26 cloned->index(node->index());
27 return cloned;
28}
Virtual CIRCLESPLITVOUT in Circle.
int32_t index(void) const

References _graph, loco::NodePool::create(), luci::CircleSplitVOut::index(), and loco::Graph::nodes().

◆ visit() [16/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleTopKV2Out node)
final

Definition at line 22 of file CircleTopKV2Out.cpp.

23{
24 auto *cloned = _graph->nodes()->create<luci::CircleTopKV2Out>();
25 if (cloned != nullptr)
26 cloned->index(node->index());
27 return cloned;
28}
Virtual CIRCLETOPKV2OUT in Circle.
int32_t index(void) const

References _graph, loco::NodePool::create(), luci::CircleTopKV2Out::index(), and loco::Graph::nodes().

◆ visit() [17/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleUniqueOut node)
final

Definition at line 22 of file CircleUniqueOut.cpp.

23{
24 auto *cloned = _graph->nodes()->create<luci::CircleUniqueOut>();
25 if (cloned != nullptr)
26 cloned->index(node->index());
27 return cloned;
28}
Virtual CIRCLEUNIQUEOUT in Circle.
int32_t index(void) const

References _graph, loco::NodePool::create(), luci::CircleUniqueOut::index(), and loco::Graph::nodes().

◆ visit() [18/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleUnpackOut node)
final

Definition at line 22 of file CircleUnpackOut.cpp.

23{
24 auto *cloned = _graph->nodes()->create<luci::CircleUnpackOut>();
25 if (cloned != nullptr)
26 cloned->index(node->index());
27 return cloned;
28}
Virtual CIRCLEUNPACKOUT in Circle.
int32_t index(void) const

References _graph, loco::NodePool::create(), luci::CircleUnpackOut::index(), and loco::Graph::nodes().

◆ visit() [19/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleVariable )
final

Definition at line 22 of file CircleVariable.cpp.

23{
25}
Virtual CircleVariable in Circle for 'variable' Tensor.

References _graph, loco::NodePool::create(), and loco::Graph::nodes().

◆ visit() [20/20]

luci::CircleNode * luci::CloneNode::visit ( const luci::CircleWhileOut node)
final

Definition at line 22 of file CircleWhileOut.cpp.

23{
24 auto *cloned = _graph->nodes()->create<luci::CircleWhileOut>();
25 if (cloned != nullptr)
26 cloned->index(node->index());
27 return cloned;
28}
Virtual CIRCLEWHILEOUT in Circle.
int32_t index(void) const

References _graph, loco::NodePool::create(), luci::CircleWhileOut::index(), and loco::Graph::nodes().

Field Documentation

◆ _graph

loco::Graph* luci::CloneNode::_graph = nullptr
protected

The documentation for this class was generated from the following files: