ONE - On-device Neural Engine
|
Represents an output of a node. More...
#include <Operation.h>
Public Member Functions | |
Output (Operation *node, std::size_t index) | |
~Output ()=default | |
Output (const Output &)=delete | |
Output (Output &&)=delete | |
Output & | operator= (const Output &)=delete |
Output & | operator= (Output &&)=delete |
Operation * | getNode () |
Returns the node this is an output of. | |
const Operation * | getNode () const |
std::size_t | getIndex () const |
Returns the index of this output among all the outputs of the node. | |
const std::vector< Use > & | getUses () const |
Returns the inputs that consume this output. | |
void | addUse (Use use) |
Adds the specified use to the uses of this output. | |
void | removeUse (Use use) |
Removes the specified use from the uses of this output. | |
void | replaceAllUsesWith (Output *new_def) |
Replace the defs of all uses of this output with the specified def. | |
const TensorType & | getType () const |
Gets the type of this output. | |
void | setType (const TensorType &type) |
Sets the type of this output. | |
DataType | getElementType () const |
const Shape & | getShape () const |
void | setShape (const Shape &shape) |
const std::string & | getName () const |
void | setName (const std::string &name) |
void | setQuantization (const mir::AffineQuantization &quant) |
Set AffineQuantization to Ouput. | |
Represents an output of a node.
Definition at line 59 of file Operation.h.
|
inline |
Definition at line 62 of file Operation.h.
|
default |
|
delete |
|
delete |
|
inline |
Adds the specified use to the uses of this output.
Definition at line 82 of file Operation.h.
Referenced by replaceAllUsesWith().
|
inline |
Definition at line 98 of file Operation.h.
References getType().
Referenced by mir::ops::SqueezeOp::inferOutputTypes(), setQuantization(), mir2loco::Transformer::visit(), and mir2loco::Transformer::visit().
|
inline |
Returns the index of this output among all the outputs of the node.
Definition at line 76 of file Operation.h.
|
inline |
Definition at line 104 of file Operation.h.
Referenced by mir2loco::Transformer::visit(), and mir2loco::Transformer::visit().
|
inline |
Returns the node this is an output of.
Definition at line 72 of file Operation.h.
Referenced by mir_onnx::foldConstants(), and nnc::CombineTransposes::run().
|
inline |
Definition at line 73 of file Operation.h.
|
inline |
Definition at line 99 of file Operation.h.
References getType().
Referenced by mir::Operation::getInputShape(), mir::Operation::getOutputShape(), setQuantization(), mir2loco::Transformer::visit(), mir2loco::Transformer::visit(), mir2loco::Transformer::visit(), and mir2loco::Transformer::visit().
|
inline |
Gets the type of this output.
Definition at line 91 of file Operation.h.
Referenced by mir_interpreter::AvgPool2DImpl< uint8_t >::run(), mir_interpreter::DepthwiseConv2DImpl< uint8_t >::run(), mir_interpreter::MaxPool2DImpl< uint8_t >::run(), and mir_interpreter::FullyConnectedImpl< uint8_t >::run().
|
inline |
Returns the inputs that consume this output.
Definition at line 79 of file Operation.h.
Referenced by nnc::opt_util::removeNodeIfUnused().
void mir::Operation::Output::removeUse | ( | Use | use | ) |
Removes the specified use from the uses of this output.
Definition at line 26 of file Operation.cpp.
Referenced by mir::Graph::removeNode().
void mir::Operation::Output::replaceAllUsesWith | ( | Output * | new_def | ) |
Replace the defs of all uses of this output with the specified def.
Definition at line 32 of file Operation.cpp.
References addUse().
|
inline |
Definition at line 105 of file Operation.h.
|
inline |
Set AffineQuantization to Ouput.
Definition at line 108 of file Operation.h.
References getElementType(), getShape(), and setType().
|
inline |
Definition at line 102 of file Operation.h.
References mir::TensorType::getElementType(), and setType().
|
inline |
Sets the type of this output.
Definition at line 95 of file Operation.h.
Referenced by mir::Operation::setOutputType(), setQuantization(), and setShape().