ONE - On-device Neural Engine
|
#include <KernelBuilderHelper.h>
Public Member Functions | |
KernelBuilderHelper (const std::unordered_map< const loco::Graph *, RuntimeGraph * > &graph_to_runtime_graph, const std::unordered_map< const loco::Node *, Tensor * > &node_to_tensor) | |
const Tensor * | getInputTensor (const loco::Node *node) const |
const Tensor * | getOptionalInputTensor (const loco::Node *node) const |
Tensor * | getOutputTensor (const loco::Node *node) const |
std::vector< Tensor * > | getOutputTensors (const std::vector< const loco::Node * > &nodes) const |
RuntimeGraph * | getRuntimeGraph (const loco::Graph *graph) const |
const std::unordered_map< const loco::Graph *, RuntimeGraph * > & | graph_to_runtime_graph () const |
const std::unordered_map< const loco::Node *, Tensor * > & | node_to_tensor () const |
Definition at line 32 of file KernelBuilderHelper.h.
|
inline |
Definition at line 35 of file KernelBuilderHelper.h.
const Tensor * luci_interpreter::KernelBuilderHelper::getInputTensor | ( | const loco::Node * | node | ) | const |
Definition at line 24 of file KernelBuilderHelper.cpp.
Referenced by luci_interpreter::build_kernel_CircleAbs(), luci_interpreter::build_kernel_CircleAdd(), luci_interpreter::build_kernel_CircleArgMax(), luci_interpreter::build_kernel_CircleAveragePool2D(), luci_interpreter::build_kernel_CircleBatchMatMul(), luci_interpreter::build_kernel_CircleBatchToSpaceND(), luci_interpreter::build_kernel_CircleBroadcastTo(), luci_interpreter::build_kernel_CircleCast(), luci_interpreter::build_kernel_CircleConcatenation(), luci_interpreter::build_kernel_CircleConv2D(), luci_interpreter::build_kernel_CircleCos(), luci_interpreter::build_kernel_CircleCumSum(), luci_interpreter::build_kernel_CircleDepthToSpace(), luci_interpreter::build_kernel_CircleDepthwiseConv2D(), luci_interpreter::build_kernel_CircleDequantize(), luci_interpreter::build_kernel_CircleDiv(), luci_interpreter::build_kernel_CircleElu(), luci_interpreter::build_kernel_CircleEqual(), luci_interpreter::build_kernel_CircleExp(), luci_interpreter::build_kernel_CircleExpandDims(), luci_interpreter::build_kernel_CircleFill(), luci_interpreter::build_kernel_CircleFloor(), luci_interpreter::build_kernel_CircleFloorDiv(), luci_interpreter::build_kernel_CircleFloorMod(), luci_interpreter::build_kernel_CircleFullyConnected(), luci_interpreter::build_kernel_CircleGather(), luci_interpreter::build_kernel_CircleGelu(), luci_interpreter::build_kernel_CircleGreater(), luci_interpreter::build_kernel_CircleGreaterEqual(), luci_interpreter::build_kernel_CircleGRU(), luci_interpreter::build_kernel_CircleHardSwish(), luci_interpreter::build_kernel_CircleIf(), luci_interpreter::build_kernel_CircleInstanceNorm(), luci_interpreter::build_kernel_CircleL2Normalize(), luci_interpreter::build_kernel_CircleL2Pool2D(), luci_interpreter::build_kernel_CircleLeakyRelu(), luci_interpreter::build_kernel_CircleLess(), luci_interpreter::build_kernel_CircleLessEqual(), luci_interpreter::build_kernel_CircleLocalResponseNormalization(), luci_interpreter::build_kernel_CircleLog(), luci_interpreter::build_kernel_CircleLogicalAnd(), luci_interpreter::build_kernel_CircleLogicalNot(), luci_interpreter::build_kernel_CircleLogicalOr(), luci_interpreter::build_kernel_CircleLogistic(), luci_interpreter::build_kernel_CircleLogSoftmax(), luci_interpreter::build_kernel_CircleMaximum(), luci_interpreter::build_kernel_CircleMaxPool2D(), luci_interpreter::build_kernel_CircleMean(), luci_interpreter::build_kernel_CircleMinimum(), luci_interpreter::build_kernel_CircleMirrorPad(), luci_interpreter::build_kernel_CircleMul(), luci_interpreter::build_kernel_CircleNeg(), luci_interpreter::build_kernel_CircleNotEqual(), luci_interpreter::build_kernel_CircleOneHot(), luci_interpreter::build_kernel_CirclePack(), luci_interpreter::build_kernel_CirclePad(), luci_interpreter::build_kernel_CirclePadV2(), luci_interpreter::build_kernel_CirclePow(), luci_interpreter::build_kernel_CirclePRelu(), luci_interpreter::build_kernel_CircleQuantize(), luci_interpreter::build_kernel_CircleReduceMax(), luci_interpreter::build_kernel_CircleReduceProd(), luci_interpreter::build_kernel_CircleRelu(), luci_interpreter::build_kernel_CircleRelu0To1(), luci_interpreter::build_kernel_CircleRelu6(), luci_interpreter::build_kernel_CircleReshape(), luci_interpreter::build_kernel_CircleResizeBilinear(), luci_interpreter::build_kernel_CircleResizeNearestNeighbor(), luci_interpreter::build_kernel_CircleReverseV2(), luci_interpreter::build_kernel_CircleRmsNorm(), luci_interpreter::build_kernel_CircleRoPE(), luci_interpreter::build_kernel_CircleRsqrt(), luci_interpreter::build_kernel_CircleSelect(), luci_interpreter::build_kernel_CircleSelectV2(), luci_interpreter::build_kernel_CircleShape(), luci_interpreter::build_kernel_CircleSin(), luci_interpreter::build_kernel_CircleSlice(), luci_interpreter::build_kernel_CircleSoftmax(), luci_interpreter::build_kernel_CircleSpaceToBatchND(), luci_interpreter::build_kernel_CircleSpaceToDepth(), luci_interpreter::build_kernel_CircleSplit(), luci_interpreter::build_kernel_CircleSplitV(), luci_interpreter::build_kernel_CircleSqrt(), luci_interpreter::build_kernel_CircleSquare(), luci_interpreter::build_kernel_CircleSquaredDifference(), luci_interpreter::build_kernel_CircleSqueeze(), luci_interpreter::build_kernel_CircleStridedSlice(), luci_interpreter::build_kernel_CircleSub(), luci_interpreter::build_kernel_CircleSum(), luci_interpreter::build_kernel_CircleSVDF(), luci_interpreter::build_kernel_CircleTanh(), luci_interpreter::build_kernel_CircleTile(), luci_interpreter::build_kernel_CircleTranspose(), luci_interpreter::build_kernel_CircleTransposeConv(), luci_interpreter::build_kernel_CircleUnidirectionalSequenceLSTM(), luci_interpreter::build_kernel_CircleUnpack(), luci_interpreter::build_kernel_CircleWhile(), and getOptionalInputTensor().
const Tensor * luci_interpreter::KernelBuilderHelper::getOptionalInputTensor | ( | const loco::Node * | node | ) | const |
Definition at line 31 of file KernelBuilderHelper.cpp.
References getInputTensor().
Referenced by luci_interpreter::build_kernel_CircleConv2D(), luci_interpreter::build_kernel_CircleFullyConnected(), luci_interpreter::build_kernel_CircleSVDF(), luci_interpreter::build_kernel_CircleTransposeConv(), and luci_interpreter::build_kernel_CircleUnidirectionalSequenceLSTM().
Tensor * luci_interpreter::KernelBuilderHelper::getOutputTensor | ( | const loco::Node * | node | ) | const |
Definition at line 40 of file KernelBuilderHelper.cpp.
Referenced by luci_interpreter::build_kernel_CircleAbs(), luci_interpreter::build_kernel_CircleAdd(), luci_interpreter::build_kernel_CircleArgMax(), luci_interpreter::build_kernel_CircleAveragePool2D(), luci_interpreter::build_kernel_CircleBatchMatMul(), luci_interpreter::build_kernel_CircleBatchToSpaceND(), luci_interpreter::build_kernel_CircleBroadcastTo(), luci_interpreter::build_kernel_CircleCast(), luci_interpreter::build_kernel_CircleConcatenation(), luci_interpreter::build_kernel_CircleConv2D(), luci_interpreter::build_kernel_CircleCos(), luci_interpreter::build_kernel_CircleCumSum(), luci_interpreter::build_kernel_CircleDepthToSpace(), luci_interpreter::build_kernel_CircleDepthwiseConv2D(), luci_interpreter::build_kernel_CircleDequantize(), luci_interpreter::build_kernel_CircleDiv(), luci_interpreter::build_kernel_CircleElu(), luci_interpreter::build_kernel_CircleEqual(), luci_interpreter::build_kernel_CircleExp(), luci_interpreter::build_kernel_CircleExpandDims(), luci_interpreter::build_kernel_CircleFill(), luci_interpreter::build_kernel_CircleFloor(), luci_interpreter::build_kernel_CircleFloorDiv(), luci_interpreter::build_kernel_CircleFloorMod(), luci_interpreter::build_kernel_CircleFullyConnected(), luci_interpreter::build_kernel_CircleGather(), luci_interpreter::build_kernel_CircleGelu(), luci_interpreter::build_kernel_CircleGreater(), luci_interpreter::build_kernel_CircleGreaterEqual(), luci_interpreter::build_kernel_CircleGRU(), luci_interpreter::build_kernel_CircleHardSwish(), luci_interpreter::build_kernel_CircleInstanceNorm(), luci_interpreter::build_kernel_CircleL2Normalize(), luci_interpreter::build_kernel_CircleL2Pool2D(), luci_interpreter::build_kernel_CircleLeakyRelu(), luci_interpreter::build_kernel_CircleLess(), luci_interpreter::build_kernel_CircleLessEqual(), luci_interpreter::build_kernel_CircleLocalResponseNormalization(), luci_interpreter::build_kernel_CircleLog(), luci_interpreter::build_kernel_CircleLogicalAnd(), luci_interpreter::build_kernel_CircleLogicalNot(), luci_interpreter::build_kernel_CircleLogicalOr(), luci_interpreter::build_kernel_CircleLogistic(), luci_interpreter::build_kernel_CircleLogSoftmax(), luci_interpreter::build_kernel_CircleMaximum(), luci_interpreter::build_kernel_CircleMaxPool2D(), luci_interpreter::build_kernel_CircleMean(), luci_interpreter::build_kernel_CircleMinimum(), luci_interpreter::build_kernel_CircleMirrorPad(), luci_interpreter::build_kernel_CircleMul(), luci_interpreter::build_kernel_CircleNeg(), luci_interpreter::build_kernel_CircleNotEqual(), luci_interpreter::build_kernel_CircleOneHot(), luci_interpreter::build_kernel_CirclePack(), luci_interpreter::build_kernel_CirclePad(), luci_interpreter::build_kernel_CirclePadV2(), luci_interpreter::build_kernel_CirclePow(), luci_interpreter::build_kernel_CirclePRelu(), luci_interpreter::build_kernel_CircleQuantize(), luci_interpreter::build_kernel_CircleReduceMax(), luci_interpreter::build_kernel_CircleReduceProd(), luci_interpreter::build_kernel_CircleRelu(), luci_interpreter::build_kernel_CircleRelu0To1(), luci_interpreter::build_kernel_CircleRelu6(), luci_interpreter::build_kernel_CircleReshape(), luci_interpreter::build_kernel_CircleResizeBilinear(), luci_interpreter::build_kernel_CircleResizeNearestNeighbor(), luci_interpreter::build_kernel_CircleReverseV2(), luci_interpreter::build_kernel_CircleRmsNorm(), luci_interpreter::build_kernel_CircleRoPE(), luci_interpreter::build_kernel_CircleRsqrt(), luci_interpreter::build_kernel_CircleSelect(), luci_interpreter::build_kernel_CircleSelectV2(), luci_interpreter::build_kernel_CircleShape(), luci_interpreter::build_kernel_CircleSin(), luci_interpreter::build_kernel_CircleSlice(), luci_interpreter::build_kernel_CircleSoftmax(), luci_interpreter::build_kernel_CircleSpaceToBatchND(), luci_interpreter::build_kernel_CircleSpaceToDepth(), luci_interpreter::build_kernel_CircleSqrt(), luci_interpreter::build_kernel_CircleSquare(), luci_interpreter::build_kernel_CircleSquaredDifference(), luci_interpreter::build_kernel_CircleSqueeze(), luci_interpreter::build_kernel_CircleStridedSlice(), luci_interpreter::build_kernel_CircleSub(), luci_interpreter::build_kernel_CircleSum(), luci_interpreter::build_kernel_CircleSVDF(), luci_interpreter::build_kernel_CircleTanh(), luci_interpreter::build_kernel_CircleTile(), luci_interpreter::build_kernel_CircleTranspose(), luci_interpreter::build_kernel_CircleTransposeConv(), luci_interpreter::build_kernel_CircleUnidirectionalSequenceLSTM(), and getOutputTensors().
std::vector< Tensor * > luci_interpreter::KernelBuilderHelper::getOutputTensors | ( | const std::vector< const loco::Node * > & | nodes | ) | const |
Definition at line 48 of file KernelBuilderHelper.cpp.
References getOutputTensor().
Referenced by luci_interpreter::build_kernel_CircleIf(), luci_interpreter::build_kernel_CircleSplit(), luci_interpreter::build_kernel_CircleSplitV(), luci_interpreter::build_kernel_CircleUnpack(), and luci_interpreter::build_kernel_CircleWhile().
RuntimeGraph * luci_interpreter::KernelBuilderHelper::getRuntimeGraph | ( | const loco::Graph * | graph | ) | const |
Definition at line 57 of file KernelBuilderHelper.cpp.
Referenced by luci_interpreter::build_kernel_CircleAveragePool2D(), luci_interpreter::build_kernel_CircleBatchMatMul(), luci_interpreter::build_kernel_CircleConv2D(), luci_interpreter::build_kernel_CircleDepthwiseConv2D(), luci_interpreter::build_kernel_CircleFullyConnected(), luci_interpreter::build_kernel_CircleIf(), luci_interpreter::build_kernel_CircleMean(), luci_interpreter::build_kernel_CircleReduceMax(), luci_interpreter::build_kernel_CircleReduceProd(), luci_interpreter::build_kernel_CircleSum(), luci_interpreter::build_kernel_CircleSVDF(), luci_interpreter::build_kernel_CircleTransposeConv(), luci_interpreter::build_kernel_CircleUnidirectionalSequenceLSTM(), and luci_interpreter::build_kernel_CircleWhile().
|
inline |
Definition at line 52 of file KernelBuilderHelper.h.
|
inline |
Definition at line 57 of file KernelBuilderHelper.h.