ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::CircleGatherGraphBuilder Class Reference

#include <CircleGather.h>

Collaboration diagram for luci::CircleGatherGraphBuilder:

Public Member Functions

bool validate (const ValidateArgs &args) const final
 
- Public Member Functions inherited from luci::GraphBuilder
virtual ~GraphBuilder ()=default
 
bool validate (const ValidateArgs &args, size_t input_cnt) const
 
CircleNodebuild (const circle::OperatorT &op, GraphBuilderContext *context) const final
 
- Public Member Functions inherited from luci::GraphBuilderBase
virtual ~GraphBuilderBase ()=default
 

Detailed Description

Definition at line 25 of file CircleGather.h.

Member Function Documentation

◆ validate()

bool luci::CircleGatherGraphBuilder::validate ( const ValidateArgs args) const
finalvirtual

Implements luci::GraphBuilderBase.

Definition at line 27 of file CircleGather.cpp.

28{
29 if (!GraphBuilder::validate(args, 2))
30 return false;
31
32 const auto &inputs = args.op.inputs;
33 const auto *options = args.op.builtin_options.AsGatherOptions();
34
35 int32_t axis = options->axis;
36
37 if (axis < 0)
38 axis += inputs.size();
39
40 if (axis < 0)
41 return false;
42
43 // TODO do indices type check
44 // TODO do axis check when shape information is given
45
46 return true;
47}
bool validate(const ValidateArgs &args, size_t input_cnt) const
args
Definition infer.py:21

References luci::GraphBuilder::validate().


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