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

#include <CircleTile.h>

Collaboration diagram for luci::CircleTileGraphBuilder:

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 CircleTile.h.

Member Function Documentation

◆ validate()

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

Implements luci::GraphBuilderBase.

Definition at line 26 of file CircleTile.cpp.

27{
28 if (!GraphBuilder::validate(args, 2))
29 return false;
30
31 auto inputs = args.op.inputs;
32 auto outputs = args.op.outputs;
33 // Multiples (inputs.at(1)) must be one of the following types
34 // int32, int64
35 const auto tensors = args.reader.tensors();
36 const auto tensor = tensors.at(inputs.at(1));
37 assert(tensor != nullptr);
38 switch (tensor->type())
39 {
40 case circle::TensorType_INT32:
41 case circle::TensorType_INT64:
42 break;
43 default:
44 return false;
45 }
46
47 // Type of input and output must be the same
48 assert(tensors.at(inputs.at(0)) != nullptr && tensors.at(outputs[0]) != nullptr);
49 if (tensors.at(inputs.at(0))->type() != tensors.at(outputs[0])->type())
50 return false;
51
52 return true;
53}
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: