ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::CircleNode Struct Referenceabstract

#include <CircleNodeDecl.h>

Collaboration diagram for luci::CircleNode:

Public Member Functions

virtual ~CircleNode ()=default
 
const loco::Dialectdialect (void) const final
 Return "Dialect" identifier that this node belongs to.
 
virtual CircleOpcode opcode (void) const =0
 
template<typename T >
accept (CircleNodeVisitorBase< T > *) const
 
template<typename T >
accept (CircleNodeMutableVisitorBase< T > *)
 
NodeName name (void) const
 
void name (const NodeName &name)
 
CircleQuantParamquantparam (void) const
 
void quantparam (std::unique_ptr< CircleQuantParam > &&quantparam)
 
SparsityParamsparsityparam (void) const
 
void sparsityparam (std::unique_ptr< SparsityParam > &&sparsityparam)
 
ShapeStatus shape_status (void) const
 
void shape_status (ShapeStatus ss)
 
int32_t op_version (void) const
 
void op_version (int32_t op_version)
 
- Public Member Functions inherited from loco::Node
 Node ()=default
 
 Node (const Node &)=delete
 
 Node (Node &&)=delete
 
virtual ~Node ()
 
Graphgraph (void)
 
const Graphgraph (void) const
 
virtual uint32_t opnum (void) const =0
 
virtual uint32_t arity (void) const =0
 Return the number of arguments.
 
virtual Nodearg (uint32_t N) const =0
 Access N-th argument node.
 
virtual void drop (void)=0
 Drop all the reference of arguments.
 
- Public Member Functions inherited from loco::AnnotatedItem< NodeAnnotation >
 AnnotatedItem ()=default
 
virtual ~AnnotatedItem ()=default
 
const T * annot (void) const
 Retrieve a stored annotation of type T.
 
void annot (std::unique_ptr< T > &&p)
 Attach or remove a new annotation of type T.
 

Detailed Description

Constructor & Destructor Documentation

◆ ~CircleNode()

virtual luci::CircleNode::~CircleNode ( )
virtualdefault

Member Function Documentation

◆ accept() [1/2]

template<typename T >
T luci::CircleNode::accept ( CircleNodeMutableVisitorBase< T > *  v)

Definition at line 50 of file CircleNodeImpl.h.

51{
52 switch (this->opcode())
53 {
54#define CIRCLE_NODE(OPCODE, CLASS) \
55 \
56 case CircleOpcode::OPCODE: \
57 return v->visit(dynamic_cast<CLASS *>(this));
58#define CIRCLE_VNODE CIRCLE_NODE
59
60#include "CircleNodes.lst"
61#undef CIRCLE_VNODE
62#undef CIRCLE_NODE
63
64 default:
65 break;
66 }
67
68 INTERNAL_EXN("CircleNode::accept(CircleNodeMutableVisitorBase) not handled");
69}
#define INTERNAL_EXN(msg)
@ brief throw internal exception with message
Definition InternalExn.h:25
virtual CircleOpcode opcode(void) const =0

References INTERNAL_EXN, and opcode().

◆ accept() [2/2]

template<typename T >
T luci::CircleNode::accept ( CircleNodeVisitorBase< T > *  v) const

Definition at line 29 of file CircleNodeImpl.h.

30{
31 switch (this->opcode())
32 {
33#define CIRCLE_NODE(OPCODE, CLASS) \
34 \
35 case CircleOpcode::OPCODE: \
36 return v->visit(dynamic_cast<const CLASS *>(this));
37#define CIRCLE_VNODE CIRCLE_NODE
38
39#include "CircleNodes.lst"
40#undef CIRCLE_VNODE
41#undef CIRCLE_NODE
42
43 default:
44 break;
45 }
46
47 INTERNAL_EXN("CircleNode::accept(CircleNodeVisitorBase) not handled");
48}

References INTERNAL_EXN, and opcode().

Referenced by luci::circle_builtin_operator(), luci::circle_builtin_options(), luci::clone_connect(), luci::clone_node(), luci::tinf::Rule::infer(), luci::sinf::Rule::infer(), luci::opcode_name(), dalgona::PythonHooks::postOperatorExecute(), dalgona::PythonHooks::preOperatorExecute(), luci::validate_name(), luci::validate_unique_name(), luci::VerifyQuantizedBiasScale::verify(), luci::VerifyQuantizedNodeTypeBase< Qtype, Btype >::verify(), and luci::OperationExporterRule::visit().

◆ dialect()

const loco::Dialect * luci::CircleNode::dialect ( void  ) const
finalvirtual

Return "Dialect" identifier that this node belongs to.

dialect() SHOULD return a valid pointer.

Implements loco::Node.

Definition at line 23 of file CircleNode.cpp.

23{ return CircleDialect::get(); }
static loco::Dialect * get(void)

References luci::CircleDialect::get().

◆ name() [1/2]

void luci::CircleNode::name ( const NodeName name)
inline

Definition at line 50 of file CircleNodeDecl.h.

50{ _name = name; }
NodeName name(void) const

References name().

Referenced by name().

◆ name() [2/2]

NodeName luci::CircleNode::name ( void  ) const
inline
Examples
/github/workspace/compiler/luci/pass/src/RemoveUnnecessaryTransposeNetPass.cpp, and /github/workspace/compiler/luci/pass/src/SubstituteExpandDimsToReshapePass.cpp.

Definition at line 49 of file CircleNodeDecl.h.

49{ return _name; }

Referenced by luci::CircleWhileGraphBuilder::build(), luci_interpreter::KernelBuilder::build(), luci::ConstantFoldingAddTestGraph::ConstantFoldingAddTestGraph(), luci::ConstantFoldingTestGraph::ConstantFoldingTestGraph(), luci::copy_common_attributes(), luci::copy_tensor_attributes(), circle_eval_diff::createEmptyTensor(), luci::dump(), luci::IndexNodeFinder::enroll(), entry(), fme_apply::get_input(), luci_interpreter::Interpreter::getOutputTensorSize(), luci::PGroups::group_of(), luci::tinf::Rule::infer(), luci::sinf::Rule::infer(), luci_interpreter::GraphLoader::loadTensors(), record_minmax::numElements(), dalgona::outputPyArray(), dalgona::outputsPyArray(), record_minmax::MinMaxObserver::postTensorWrite(), luci::produce_pgroups(), luci_interpreter::Interpreter::readOutputTensor(), record_hessian::HessianComputer::recordHessian(), luci::QuantizeDequantizeWeightsPass::run(), luci::QuantizeDequantizeWeightsWithGPTQPass::run(), luci::QuantizeWithMinMaxPass::run(), prunner::PModelsRunner::run(), dalgona::Dalgona::runAnalysisWithRandomInput(), prunner::PModelsRunner::save_outputs(), fme_apply::set_input(), luci::validate_name(), luci::validate_unique_name(), dalgona::PostOperatorHook::visit(), dalgona::PreOperatorHook::visit(), luci::sinf::Algorithm::visit(), dalgona::PostOperatorHook::visit(), dalgona::PreOperatorHook::visit(), dalgona::PostOperatorHook::visit(), dalgona::PreOperatorHook::visit(), dalgona::PostOperatorHook::visit(), dalgona::PreOperatorHook::visit(), dalgona::PostOperatorHook::visit(), dalgona::PreOperatorHook::visit(), dalgona::PostOperatorHook::visit(), dalgona::PreOperatorHook::visit(), dalgona::PostOperatorHook::visit(), dalgona::PreOperatorHook::visit(), luci::QuantizeActivation::visit(), luci::warn_accuracy_with_range(), and luci_interpreter::Interpreter::writeInputTensor().

◆ op_version() [1/2]

void luci::CircleNode::op_version ( int32_t  op_version)
inline

Definition at line 68 of file CircleNodeDecl.h.

68{ _op_version = op_version; }
int32_t op_version(void) const

References op_version().

Referenced by op_version().

◆ op_version() [2/2]

int32_t luci::CircleNode::op_version ( void  ) const
inline

◆ opcode()

virtual CircleOpcode luci::CircleNode::opcode ( void  ) const
pure virtual

Implemented in luci::CircleNodeImpl< Code >, luci::CircleNodeImpl< CircleOpcode::ABS >, luci::CircleNodeImpl< CircleOpcode::ADD >, luci::CircleNodeImpl< CircleOpcode::ADD_N >, luci::CircleNodeImpl< CircleOpcode::ARG_MAX >, luci::CircleNodeImpl< CircleOpcode::ARG_MIN >, luci::CircleNodeImpl< CircleOpcode::AVERAGE_POOL_2D >, luci::CircleNodeImpl< CircleOpcode::BATCH_MATMUL >, luci::CircleNodeImpl< CircleOpcode::BATCH_TO_SPACE_ND >, luci::CircleNodeImpl< CircleOpcode::BCQ_FULLY_CONNECTED >, luci::CircleNodeImpl< CircleOpcode::BCQ_GATHER >, luci::CircleNodeImpl< CircleOpcode::BIDIRECTIONAL_SEQUENCE_LSTM >, luci::CircleNodeImpl< CircleOpcode::BROADCAST_TO >, luci::CircleNodeImpl< CircleOpcode::CAST >, luci::CircleNodeImpl< CircleOpcode::CEIL >, luci::CircleNodeImpl< CircleOpcode::CIRCLEBIDIRECTIONAL_SEQUENCE_LSTM_OUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLECONST >, luci::CircleNodeImpl< CircleOpcode::CIRCLECUSTOMOUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLEIFOUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLEINPUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLENONMAXSUPPRESSIONV4OUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLENONMAXSUPPRESSIONV5OUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLEOUTPUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLEOUTPUTDUMMY >, luci::CircleNodeImpl< CircleOpcode::CIRCLEOUTPUTEXCLUDE >, luci::CircleNodeImpl< CircleOpcode::CIRCLESPLITOUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLESPLITVOUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLETOPKV2OUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLEUNIQUEOUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLEUNPACKOUT >, luci::CircleNodeImpl< CircleOpcode::CIRCLEVARIABLE >, luci::CircleNodeImpl< CircleOpcode::CIRCLEWHILEOUT >, luci::CircleNodeImpl< CircleOpcode::CONCATENATION >, luci::CircleNodeImpl< CircleOpcode::CONV_2D >, luci::CircleNodeImpl< CircleOpcode::COS >, luci::CircleNodeImpl< CircleOpcode::CUMSUM >, luci::CircleNodeImpl< CircleOpcode::CUSTOM >, luci::CircleNodeImpl< CircleOpcode::DENSIFY >, luci::CircleNodeImpl< CircleOpcode::DEPTH_TO_SPACE >, luci::CircleNodeImpl< CircleOpcode::DEPTHWISE_CONV_2D >, luci::CircleNodeImpl< CircleOpcode::DEQUANTIZE >, luci::CircleNodeImpl< CircleOpcode::DIV >, luci::CircleNodeImpl< CircleOpcode::ELU >, luci::CircleNodeImpl< CircleOpcode::EQUAL >, luci::CircleNodeImpl< CircleOpcode::EXP >, luci::CircleNodeImpl< CircleOpcode::EXPAND_DIMS >, luci::CircleNodeImpl< CircleOpcode::FAKE_QUANT >, luci::CircleNodeImpl< CircleOpcode::FILL >, luci::CircleNodeImpl< CircleOpcode::FLOOR >, luci::CircleNodeImpl< CircleOpcode::FLOOR_DIV >, luci::CircleNodeImpl< CircleOpcode::FLOOR_MOD >, luci::CircleNodeImpl< CircleOpcode::FULLY_CONNECTED >, luci::CircleNodeImpl< CircleOpcode::GATHER >, luci::CircleNodeImpl< CircleOpcode::GATHER_ND >, luci::CircleNodeImpl< CircleOpcode::GELU >, luci::CircleNodeImpl< CircleOpcode::GREATER >, luci::CircleNodeImpl< CircleOpcode::GREATER_EQUAL >, luci::CircleNodeImpl< CircleOpcode::GRU >, luci::CircleNodeImpl< CircleOpcode::HARD_SWISH >, luci::CircleNodeImpl< CircleOpcode::IF >, luci::CircleNodeImpl< CircleOpcode::L2_NORMALIZATION >, luci::CircleNodeImpl< CircleOpcode::L2_POOL_2D >, luci::CircleNodeImpl< CircleOpcode::LEAKY_RELU >, luci::CircleNodeImpl< CircleOpcode::LESS >, luci::CircleNodeImpl< CircleOpcode::LESS_EQUAL >, luci::CircleNodeImpl< CircleOpcode::LOCAL_RESPONSE_NORMALIZATION >, luci::CircleNodeImpl< CircleOpcode::LOG >, luci::CircleNodeImpl< CircleOpcode::LOG_SOFTMAX >, luci::CircleNodeImpl< CircleOpcode::LOGICAL_AND >, luci::CircleNodeImpl< CircleOpcode::LOGICAL_NOT >, luci::CircleNodeImpl< CircleOpcode::LOGICAL_OR >, luci::CircleNodeImpl< CircleOpcode::LOGISTIC >, luci::CircleNodeImpl< CircleOpcode::MATRIX_DIAG >, luci::CircleNodeImpl< CircleOpcode::MATRIX_SET_DIAG >, luci::CircleNodeImpl< CircleOpcode::MAX_POOL_2D >, luci::CircleNodeImpl< CircleOpcode::MAXIMUM >, luci::CircleNodeImpl< CircleOpcode::MEAN >, luci::CircleNodeImpl< CircleOpcode::MINIMUM >, luci::CircleNodeImpl< CircleOpcode::MIRROR_PAD >, luci::CircleNodeImpl< CircleOpcode::MUL >, luci::CircleNodeImpl< CircleOpcode::NEG >, luci::CircleNodeImpl< CircleOpcode::NON_MAX_SUPPRESSION_V4 >, luci::CircleNodeImpl< CircleOpcode::NON_MAX_SUPPRESSION_V5 >, luci::CircleNodeImpl< CircleOpcode::NOT_EQUAL >, luci::CircleNodeImpl< CircleOpcode::ONE_HOT >, luci::CircleNodeImpl< CircleOpcode::PACK >, luci::CircleNodeImpl< CircleOpcode::PAD >, luci::CircleNodeImpl< CircleOpcode::PADV2 >, luci::CircleNodeImpl< CircleOpcode::POW >, luci::CircleNodeImpl< CircleOpcode::PRELU >, luci::CircleNodeImpl< CircleOpcode::QUANTIZE >, luci::CircleNodeImpl< CircleOpcode::RANGE >, luci::CircleNodeImpl< CircleOpcode::RANK >, luci::CircleNodeImpl< CircleOpcode::REDUCE_ANY >, luci::CircleNodeImpl< CircleOpcode::REDUCE_MAX >, luci::CircleNodeImpl< CircleOpcode::REDUCE_MIN >, luci::CircleNodeImpl< CircleOpcode::REDUCE_PROD >, luci::CircleNodeImpl< CircleOpcode::RELU >, luci::CircleNodeImpl< CircleOpcode::RELU6 >, luci::CircleNodeImpl< CircleOpcode::RELU_0_TO_1 >, luci::CircleNodeImpl< CircleOpcode::RELU_N1_TO_1 >, luci::CircleNodeImpl< CircleOpcode::RESHAPE >, luci::CircleNodeImpl< CircleOpcode::RESIZE_BILINEAR >, luci::CircleNodeImpl< CircleOpcode::RESIZE_NEAREST_NEIGHBOR >, luci::CircleNodeImpl< CircleOpcode::REVERSE_SEQUENCE >, luci::CircleNodeImpl< CircleOpcode::REVERSE_V2 >, luci::CircleNodeImpl< CircleOpcode::RMS_NORM >, luci::CircleNodeImpl< CircleOpcode::ROPE >, luci::CircleNodeImpl< CircleOpcode::ROUND >, luci::CircleNodeImpl< CircleOpcode::RSQRT >, luci::CircleNodeImpl< CircleOpcode::SCATTER_ND >, luci::CircleNodeImpl< CircleOpcode::SEGMENT_SUM >, luci::CircleNodeImpl< CircleOpcode::SELECT >, luci::CircleNodeImpl< CircleOpcode::SELECT_V2 >, luci::CircleNodeImpl< CircleOpcode::SHAPE >, luci::CircleNodeImpl< CircleOpcode::SIN >, luci::CircleNodeImpl< CircleOpcode::SLICE >, luci::CircleNodeImpl< CircleOpcode::SOFTMAX >, luci::CircleNodeImpl< CircleOpcode::SPACE_TO_BATCH_ND >, luci::CircleNodeImpl< CircleOpcode::SPACE_TO_DEPTH >, luci::CircleNodeImpl< CircleOpcode::SPARSE_TO_DENSE >, luci::CircleNodeImpl< CircleOpcode::SPLIT >, luci::CircleNodeImpl< CircleOpcode::SPLIT_V >, luci::CircleNodeImpl< CircleOpcode::SQRT >, luci::CircleNodeImpl< CircleOpcode::SQUARE >, luci::CircleNodeImpl< CircleOpcode::SQUARED_DIFFERENCE >, luci::CircleNodeImpl< CircleOpcode::SQUEEZE >, luci::CircleNodeImpl< CircleOpcode::STRIDED_SLICE >, luci::CircleNodeImpl< CircleOpcode::SUB >, luci::CircleNodeImpl< CircleOpcode::SUM >, luci::CircleNodeImpl< CircleOpcode::SVDF >, luci::CircleNodeImpl< CircleOpcode::TANH >, luci::CircleNodeImpl< CircleOpcode::TILE >, luci::CircleNodeImpl< CircleOpcode::TOPK_V2 >, luci::CircleNodeImpl< CircleOpcode::TRANSPOSE >, luci::CircleNodeImpl< CircleOpcode::TRANSPOSE_CONV >, luci::CircleNodeImpl< CircleOpcode::UNIDIRECTIONAL_SEQUENCE_LSTM >, luci::CircleNodeImpl< CircleOpcode::UNIQUE >, luci::CircleNodeImpl< CircleOpcode::UNPACK >, luci::CircleNodeImpl< CircleOpcode::WHERE >, luci::CircleNodeImpl< CircleOpcode::WHILE >, and luci::CircleNodeImpl< CircleOpcode::ZEROS_LIKE >.

Referenced by accept(), accept(), luci::activation_qtype(), add_mode_option(), add_padding_option(), luci_interpreter::KernelBuilder::build(), luci::pass::Expression::build(), luci::fuse_activation_function(), luci::fuse_add_with_conv(), fme_apply::get_input(), luci_interpreter::GraphLoader::loadTensors(), dalgona::multi_out_node(), luci::pass::operator==(), dalgona::outputPyArray(), record_minmax::MinMaxObserver::postTensorWrite(), record_hessian::HessianComputer::recordHessian(), luci::FuseActivationFunctionPass::run(), fme_apply::set_input(), luci::validate_unique_name(), dalgona::PostOperatorHook::visit(), dalgona::PreOperatorHook::visit(), and luci::QuantizeActivation::visit().

◆ quantparam() [1/2]

void luci::CircleNode::quantparam ( std::unique_ptr< CircleQuantParam > &&  quantparam)
inline

Definition at line 53 of file CircleNodeDecl.h.

54 {
55 _quantparam = std::move(quantparam);
56 }
CircleQuantParam * quantparam(void) const

References quantparam().

◆ quantparam() [2/2]

◆ shape_status() [1/2]

void luci::CircleNode::shape_status ( ShapeStatus  ss)
inline

Definition at line 65 of file CircleNodeDecl.h.

65{ _shape_status = ss; }

◆ shape_status() [2/2]

ShapeStatus luci::CircleNode::shape_status ( void  ) const
inline

◆ sparsityparam() [1/2]

void luci::CircleNode::sparsityparam ( std::unique_ptr< SparsityParam > &&  sparsityparam)
inline

Definition at line 59 of file CircleNodeDecl.h.

60 {
61 _sparsityparam = std::move(sparsityparam);
62 }
SparsityParam * sparsityparam(void) const

References sparsityparam().

◆ sparsityparam() [2/2]

SparsityParam * luci::CircleNode::sparsityparam ( void  ) const
inline

Definition at line 58 of file CircleNodeDecl.h.

58{ return _sparsityparam.get(); }

Referenced by luci::copy_common_attributes(), luci::copy_tensor_attributes(), luci::SparsifyTensorPass::sparsify_tensor(), and sparsityparam().


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