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

CUSTOM in Circle. More...

#include <CircleCustom.h>

Collaboration diagram for luci::CircleCustom:

Public Member Functions

 CircleCustom (uint32_t arity, uint32_t out)
 
uint32_t numInputs (void) const
 
uint32_t numOutputs (void) const
 
Nodeinputs (uint32_t index) const
 
void inputs (uint32_t index, Node *node)
 
const std::vector< uint8_t > & custom_options (void) const
 
void custom_options (const std::vector< uint8_t > &custom_options)
 
const std::string & custom_code (void) const
 
void custom_code (const std::string &custom_code)
 
- Public Member Functions inherited from luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::CUSTOM > >
 VariadicArityNode (uint32_t arity)
 
virtual ~VariadicArityNode ()=default
 
uint32_t arity (void) const final
 
loco::Nodearg (uint32_t n) const final
 
void drop (void) final
 
- Public Member Functions inherited from luci::CircleNodeImpl< CircleOpcode::CUSTOM >
virtual ~CircleNodeImpl ()=default
 
uint32_t opnum (void) const final
 
CircleOpcode opcode (void) const final
 
- Public Member Functions inherited from luci::CircleNode
virtual ~CircleNode ()=default
 
const loco::Dialectdialect (void) const final
 Return "Dialect" identifier that this node belongs to.
 
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
 
- 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.
 

Additional Inherited Members

- Protected Member Functions inherited from luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::CUSTOM > >
loco::Useat (uint32_t n) const
 

Detailed Description

CUSTOM in Circle.

Definition at line 29 of file CircleCustom.h.

Constructor & Destructor Documentation

◆ CircleCustom()

luci::CircleCustom::CircleCustom ( uint32_t  arity,
uint32_t  out 
)
inline

Definition at line 32 of file CircleCustom.h.

33 : VariadicArityNode<CircleNodeImpl<CircleOpcode::CUSTOM>>(arity), _output_count(out)
34 {
35 // NOTE Custom can have 0 input or 0 output but not both
36 assert(arity != 0 || out != 0);
37 }
uint32_t arity(void) const final
Return the number of arguments.

References luci::VariadicArityNode< CircleNodeImpl< CircleOpcode::CUSTOM > >::arity().

Member Function Documentation

◆ custom_code() [1/2]

void luci::CircleCustom::custom_code ( const std::string &  custom_code)
inline

Definition at line 55 of file CircleCustom.h.

55{ _custom_code = custom_code; }
const std::string & custom_code(void) const

References custom_code().

Referenced by custom_code().

◆ custom_code() [2/2]

const std::string & luci::CircleCustom::custom_code ( void  ) const
inline

◆ custom_options() [1/2]

void luci::CircleCustom::custom_options ( const std::vector< uint8_t > &  custom_options)
inline

Definition at line 49 of file CircleCustom.h.

50 {
51 _custom_options = custom_options;
52 }
const std::vector< uint8_t > & custom_options(void) const

References custom_options().

◆ custom_options() [2/2]

const std::vector< uint8_t > & luci::CircleCustom::custom_options ( void  ) const
inline

Definition at line 48 of file CircleCustom.h.

48{ return _custom_options; }

Referenced by custom_options(), and luci::CloneNodeLet< CN::ABC >::visit().

◆ inputs() [1/2]

Node * luci::CircleCustom::inputs ( uint32_t  index) const
inline

◆ inputs() [2/2]

void luci::CircleCustom::inputs ( uint32_t  index,
Node node 
)
inline

◆ numInputs()

uint32_t luci::CircleCustom::numInputs ( void  ) const
inline

◆ numOutputs()

uint32_t luci::CircleCustom::numOutputs ( void  ) const
inline

Definition at line 41 of file CircleCustom.h.

41{ return _output_count; }

Referenced by luci::is_onnx_dequantize_linear(), luci::is_onnx_quantize_linear(), and luci::CloneNodeLet< CN::ABC >::visit().


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