|
ONE - On-device Neural Engine
|
Namespaces | |
| namespace | lstm |
| namespace | testing |
Typedefs | |
| using | Activation = luci_interpreter::FusedActFunc |
Variables | |
| const int | max_dim = 4 |
| bool luci_interpreter::kernels::areShapesEqual | ( | const luci_interpreter::RuntimeShape & | input_shape1, |
| const luci_interpreter::RuntimeShape & | input_shape2 | ||
| ) |
Definition at line 89 of file Utils.cpp.
References luci::must_cast().
Referenced by luci_interpreter::execute_kernel_CircleFloorDiv(), luci_interpreter::execute_kernel_CircleFloorMod(), luci_interpreter::execute_kernel_CircleMaximum(), and luci_interpreter::execute_kernel_CircleMinimum().
| void luci_interpreter::kernels::BinaryOpBroadcastSlow | ( | const tflite::RuntimeShape & | unextended_input1_shape, |
| const T * | input1_data, | ||
| const tflite::RuntimeShape & | unextended_input2_shape, | ||
| const T * | input2_data, | ||
| const tflite::RuntimeShape & | unextended_output_shape, | ||
| T * | output_data, | ||
| Op | op | ||
| ) |
Definition at line 31 of file BinaryOpCommon.h.
References desc1, desc2, luci::must_cast(), and SubscriptToIndex().
Referenced by luci_interpreter::kernels::LogicalOr::execute().
|
inline |
Definition at line 78 of file Utils.h.
References circle_eval_diff::TensorShape::dim(), and luci::must_cast().
|
inline |
Definition at line 75 of file Utils.h.
References luci_interpreter::Shape::dim(), and luci::must_cast().
| template void luci_interpreter::kernels::calculateActivationRange | ( | Activation | activation, |
| float * | activation_min, | ||
| float * | activation_max | ||
| ) |
| template void luci_interpreter::kernels::calculateActivationRange | ( | Activation | activation, |
| int32_t * | activation_min, | ||
| int32_t * | activation_max | ||
| ) |
| template void luci_interpreter::kernels::calculateActivationRange | ( | Activation | activation, |
| int64_t * | activation_min, | ||
| int64_t * | activation_max | ||
| ) |
| void luci_interpreter::kernels::calculateActivationRange | ( | Activation | activation, |
| T * | activation_min, | ||
| T * | activation_max | ||
| ) |
Definition at line 52 of file Utils.cpp.
Referenced by luci_interpreter::createConv2DParams(), luci_interpreter::createPoolParams(), luci_interpreter::kernels::L2Pool2D::execute(), and fillArithmeticActivationRange().
| void luci_interpreter::kernels::calculateActivationRangeQuantized | ( | Activation | activation, |
| const circle::Tensor * | output, | ||
| int32_t * | activation_min, | ||
| int32_t * | activation_max | ||
| ) |
Definition at line 207 of file Utils.cpp.
References calculateActivationRangeQuantized(), and size.
| void luci_interpreter::kernels::calculateActivationRangeQuantized | ( | Activation | activation, |
| const Tensor * | output, | ||
| int32_t * | activation_min, | ||
| int32_t * | activation_max | ||
| ) |
Definition at line 119 of file Utils.cpp.
References luci::must_cast().
Referenced by calculateActivationRangeQuantized(), luci_interpreter::createConv2DParams(), luci_interpreter::createPoolParams(), and evalTISOQuantizedKernel().
| void luci_interpreter::kernels::calculateActivationRangeQuantized | ( | Activation | activation, |
| int32_t | output_zero_point, | ||
| float | output_scale, | ||
| DataType | data_type, | ||
| int32_t * | activation_min, | ||
| int32_t * | activation_max | ||
| ) |
Definition at line 177 of file Utils.cpp.
References luci::must_cast().
| int luci_interpreter::kernels::calculateInputRadius | ( | int | input_integer_bits, |
| int | input_left_shift, | ||
| int | total_signed_bits | ||
| ) |
Definition at line 123 of file Utils.cpp.
References luci::must_cast().
| Shape luci_interpreter::kernels::calculateOutputShape | ( | const Tensor * | input, |
| const Tensor * | begin, | ||
| const Tensor * | size | ||
| ) |
Definition at line 37 of file Slice.cpp.
References begin, luci::must_cast(), output_shape, and size.
| luci_interpreter::RuntimeShape luci_interpreter::kernels::calculateShapeForBroadcast | ( | const circle::Tensor * | input1, |
| const circle::Tensor * | input2 | ||
| ) |
Definition at line 265 of file Utils.cpp.
References circle_eval_diff::TensorShape::dim(), LUCI_INTERPRETER_CHECK, luci::must_cast(), output_shape, and luci_interpreter::RuntimeShape::setDim().
| Shape luci_interpreter::kernels::calculateShapeForBroadcast | ( | const Shape & | input1_shape, |
| const Shape & | input2_shape | ||
| ) |
Definition at line 204 of file Utils.cpp.
References LUCI_INTERPRETER_CHECK, luci::must_cast(), luci_interpreter::Shape::num_dims(), and output_shape.
Referenced by luci_interpreter::kernels::Add::configure(), luci_interpreter::kernels::Div::configure(), luci_interpreter::kernels::Equal::configure(), luci_interpreter::kernels::FloorDiv::configure(), luci_interpreter::kernels::FloorMod::configure(), luci_interpreter::kernels::Greater::configure(), luci_interpreter::kernels::GreaterEqual::configure(), luci_interpreter::kernels::Less::configure(), luci_interpreter::kernels::LessEqual::configure(), luci_interpreter::kernels::LogicalAnd::configure(), luci_interpreter::kernels::LogicalOr::configure(), luci_interpreter::kernels::Maximum::configure(), luci_interpreter::kernels::Minimum::configure(), luci_interpreter::kernels::Mul::configure(), luci_interpreter::kernels::NotEqual::configure(), luci_interpreter::kernels::Pow::configure(), luci_interpreter::kernels::PRelu::configure(), luci_interpreter::kernels::Select::configure(), luci_interpreter::kernels::SelectV2::configure(), luci_interpreter::kernels::SquaredDifference::configure(), and luci_interpreter::kernels::Sub::configure().
|
inline |
Definition at line 116 of file BinaryOpCommon.h.
References luci_interpreter::kernels::TISOKernel::input1(), luci_interpreter::kernels::TISOKernel::input2(), LUCI_INTERPRETER_CHECK, and luci_interpreter::kernels::TISOKernel::output().
Referenced by luci_interpreter::configure_kernel_CircleMaximum(), and luci_interpreter::configure_kernel_CircleMinimum().
Definition at line 113 of file Utils.cpp.
References luci::must_cast().
|
inline |
Definition at line 59 of file Utils.h.
References luci::must_cast().
Referenced by luci_interpreter::computeConvPadding(), luci_interpreter::kernels::AveragePool2D::configure(), luci_interpreter::kernels::Conv2D::configure(), luci_interpreter::kernels::DepthwiseConv2D::configure(), luci_interpreter::kernels::L2Pool2D::configure(), luci_interpreter::kernels::MaxPool2D::configure(), luci_interpreter::kernels::TransposeConv::configure(), and luci_interpreter::createPoolParams().
|
inline |
Definition at line 41 of file Utils.h.
References luci::must_cast().
Referenced by luci_interpreter::computeConvPadding(), luci_interpreter::kernels::AveragePool2D::configure(), luci_interpreter::kernels::Conv2D::configure(), luci_interpreter::kernels::DepthwiseConv2D::configure(), luci_interpreter::kernels::L2Pool2D::configure(), luci_interpreter::kernels::MaxPool2D::configure(), luci_interpreter::kernels::TransposeConv::configure(), and luci_interpreter::createPoolParams().
|
inline |
Definition at line 49 of file Utils.h.
References luci::must_cast(), and offset().
| void luci_interpreter::kernels::evalComparisonGeneric | ( | const circle::Tensor * | x, |
| const circle::Tensor * | y, | ||
| const circle::Tensor * | output, | ||
| BaseRuntimeGraph * | runtime_graph, | ||
| bool | FT, T | ||
| ) |
Definition at line 31 of file ComparisonCommon.h.
References luci_interpreter::RuntimeGraph::getConstDataByTensor(), luci_interpreter::RuntimeGraph::getDataByTensor(), getTensorShape(), luci_interpreter_pal::ComparisonParams::is_broadcast, and luci::must_cast().
| void luci_interpreter::kernels::evalTISOInplaceKernel | ( | TISOFunc | tiso_func, |
| TISOBroadcastFunc | tiso_broadcast_func, | ||
| kernels::TISOKernel * | kernel, | ||
| const Options * | options, | ||
| RuntimeShape && | input_shape_1, | ||
| RuntimeShape && | input_shape_2, | ||
| RuntimeShape && | output_shape | ||
| ) |
Definition at line 89 of file BinaryOpCommon.h.
References luci_interpreter::kernels::TISOKernel::input1(), luci_interpreter::kernels::TISOKernel::input2(), luci_interpreter::RuntimeGraph::makeInplaceOperation(), luci::must_cast(), luci_interpreter::kernels::TISOKernel::output(), output_shape, luci_interpreter::kernels::TISOKernel::readInplaceData(), and luci_interpreter::kernels::TISOKernel::runtime_graph().
| void luci_interpreter::kernels::evalTISOInplaceQuantizedKernel | ( | TISOFunc | tiso_func, |
| TISOBroadcastFunc | tiso_broadcast_func, | ||
| kernels::TISOKernel * | kernel, | ||
| const Options * | options | ||
| ) |
Definition at line 195 of file BinaryOpCommon.h.
References luci_interpreter::kernels::TISOKernel::input1(), luci_interpreter::kernels::TISOKernel::input2(), luci_interpreter::RuntimeGraph::makeInplaceOperation(), luci::must_cast(), luci_interpreter::kernels::TISOKernel::output(), luci_interpreter::kernels::TISOKernel::readInplaceData(), and luci_interpreter::kernels::TISOKernel::runtime_graph().
| void luci_interpreter::kernels::evalTISOKernel | ( | TISOFunc | tiso_func, |
| TISOBroadcastFunc | tiso_broadcast_func, | ||
| kernels::TISOKernel * | kernel, | ||
| kernels::TISOData * | kernel_data, | ||
| const Options * | options, | ||
| RuntimeShape && | input_shape_1, | ||
| RuntimeShape && | input_shape_2, | ||
| RuntimeShape && | output_shape | ||
| ) |
Definition at line 61 of file BinaryOpCommon.h.
References luci::luci_actfunc(), luci::must_cast(), output_shape, and luci_interpreter_pal::ProcessBroadcastShapes().
| void luci_interpreter::kernels::evalTISOQuantizedKernel | ( | TISOFunc | tiso_func, |
| TISOBroadcastFunc | tiso_broadcast_func, | ||
| kernels::TISOKernel * | kernel, | ||
| kernels::TISOData * | kernel_data, | ||
| const Options * | options | ||
| ) |
Definition at line 127 of file BinaryOpCommon.h.
References calculateActivationRangeQuantized(), getTensorShape(), luci_interpreter::kernels::TISOKernel::input1(), luci_interpreter::kernels::TISOKernel::input2(), luci_interpreter_pal::ArithmeticParams::left_shift, luci::luci_actfunc(), luci::must_cast(), luci_interpreter::kernels::TISOKernel::output(), luci_interpreter_pal::ProcessBroadcastShapes(), and quantizeMultiplierSmallerThanOneExp().
| void luci_interpreter::kernels::fillArithmeticActivationRange | ( | tflite::ArithmeticParams & | p, |
| Activation | act | ||
| ) |
Fills activation min and max parameters depending on given data type and activation
T is a template parameter, so after optimization this code left with only required if case
| T | data type of arithmetic operation output tensor |
| params | tflite params to fill |
| activation | luci_interpreter::Activation of arithmetic operation |
Definition at line 106 of file Utils.h.
References calculateActivationRange(), luci::must_cast(), and p.
|
inline |
Definition at line 137 of file Utils.h.
References LUCI_INTERPRETER_CHECK, and luci::must_cast().
Referenced by getQuantizedConvolutionMultiplers().
|
inline |
Definition at line 147 of file Utils.h.
References getQuantizedConvolutionMultipler(), and luci::must_cast().
Referenced by luci_interpreter::kernels::PRelu::configure(), luci_interpreter::kernels::TransposeConv::configure(), and luci_interpreter::createConv2DParams().
| const T * luci_interpreter::kernels::getTensorData | ( | const uint8_t * | tensor_data | ) |
Definition at line 158 of file Utils.h.
References luci::must_cast().
Definition at line 163 of file Utils.h.
References luci::must_cast().
|
inline |
Definition at line 121 of file Utils.h.
References luci_interpreter::RuntimeGraph::getDynamicShapeTensor(), and luci::must_cast().
Referenced by luci_interpreter_pal::lstm_internal::calculateLstmGate().
| luci_interpreter::RuntimeShape luci_interpreter::kernels::getTensorRuntimeShape | ( | const circle::Tensor * | circle_tensor, |
| BaseRuntimeGraph * | runtime_graph | ||
| ) |
Definition at line 29 of file Utils.cpp.
References luci_interpreter::RuntimeGraph::getDynamicShapeTensor(), getTensorShape(), luci::must_cast(), and luci_interpreter::RuntimeShape::resize().
Referenced by luci_interpreter::evalInteger(), luci_interpreter::execute_kernel_CircleAbs(), luci_interpreter::execute_kernel_CircleAdd(), luci_interpreter::execute_kernel_CircleArgMax(), luci_interpreter::execute_kernel_CircleArgMin(), luci_interpreter::execute_kernel_CircleBatchToSpaceND(), luci_interpreter::execute_kernel_CircleBroadcastTo(), luci_interpreter::execute_kernel_CircleCast(), luci_interpreter::execute_kernel_CircleCeil(), luci_interpreter::execute_kernel_CircleCos(), luci_interpreter::execute_kernel_CircleDepthToSpace(), luci_interpreter::execute_kernel_CircleDequantize(), luci_interpreter::execute_kernel_CircleDiv(), luci_interpreter::execute_kernel_CircleElu(), luci_interpreter::execute_kernel_CircleExp(), luci_interpreter::execute_kernel_CircleFloorDiv(), luci_interpreter::execute_kernel_CircleFloorMod(), luci_interpreter::execute_kernel_CircleGatherND(), luci_interpreter::execute_kernel_CircleL2Normalize(), luci_interpreter::execute_kernel_CircleLeakyRelu(), luci_interpreter::execute_kernel_CircleLog(), luci_interpreter::execute_kernel_CircleLogistic(), luci_interpreter::execute_kernel_CircleLogSoftmax(), luci_interpreter::execute_kernel_CircleMaximum(), luci_interpreter::execute_kernel_CircleMinimum(), luci_interpreter::execute_kernel_CircleMul(), luci_interpreter::execute_kernel_CirclePRelu(), luci_interpreter::execute_kernel_CircleQuantize(), luci_interpreter::execute_kernel_CircleRelu(), luci_interpreter::execute_kernel_CircleRelu6(), luci_interpreter::execute_kernel_CircleResizeNearestNeighbor(), luci_interpreter::execute_kernel_CircleRound(), luci_interpreter::execute_kernel_CircleRsqrt(), luci_interpreter::execute_kernel_CircleSin(), luci_interpreter::execute_kernel_CircleSpaceToBatchND(), luci_interpreter::execute_kernel_CircleSpaceToDepth(), luci_interpreter::execute_kernel_CircleSqrt(), luci_interpreter::execute_kernel_CircleSquare(), luci_interpreter::execute_kernel_CircleSquaredDifference(), luci_interpreter::execute_kernel_CircleSub(), luci_interpreter::execute_kernel_CircleTanh(), and luci_interpreter::execute_kernel_CircleZerosLike().
|
inline |
Definition at line 106 of file Utils.h.
References luci::must_cast().
Definition at line 194 of file Utils.h.
References luci_interpreter::Shape::dim(), luci::must_cast(), and luci_interpreter::Shape::num_dims().
Referenced by luci_interpreter::kernels::AveragePool2D::configure(), luci_interpreter::kernels::BatchMatMul::configure(), luci_interpreter::kernels::Conv2D::configure(), luci_interpreter::kernels::DepthwiseConv2D::configure(), luci_interpreter::kernels::GRU::configure(), luci_interpreter::kernels::StridedSlice::configure(), luci_interpreter::configure_kernel_CircleFloor(), luci_interpreter::configure_kernel_CircleLogicalNot(), luci_interpreter::configure_kernel_CircleResizeBilinear(), luci_interpreter::configure_kernel_CircleSquare(), luci_interpreter::configure_kernel_CircleSqueeze(), evalComparisonGeneric(), evalTISOQuantizedKernel(), luci_interpreter::kernels::BatchMatMul::execute(), luci_interpreter::kernels::BatchToSpaceND::execute(), luci_interpreter::kernels::CumSum::execute(), luci_interpreter::kernels::DepthToSpace::execute(), luci_interpreter::kernels::Dequantize::execute(), luci_interpreter::kernels::Elu::execute(), luci_interpreter::kernels::Fill::execute(), luci_interpreter::kernels::HardSwish::execute(), luci_interpreter::kernels::L2Pool2D::execute(), luci_interpreter::kernels::LocalResponseNormalization::execute(), luci_interpreter::kernels::LogicalOr::execute(), luci_interpreter::kernels::Pad::execute(), luci_interpreter::kernels::PadV2::execute(), luci_interpreter::kernels::Quantize::execute(), luci_interpreter::kernels::ResizeBilinear::execute(), luci_interpreter::kernels::ResizeNearestNeighbor::execute(), luci_interpreter::kernels::ReverseV2::execute(), luci_interpreter::kernels::Slice::execute(), luci_interpreter::kernels::SpaceToBatchND::execute(), luci_interpreter::kernels::SpaceToDepth::execute(), luci_interpreter::kernels::StridedSlice::execute(), luci_interpreter::kernels::Transpose::execute(), luci_interpreter::execute_kernel_CircleAveragePool2D(), luci_interpreter::execute_kernel_CircleFloor(), luci_interpreter::execute_kernel_CircleL2Pool2D(), luci_interpreter::execute_kernel_CircleLogicalAnd(), luci_interpreter::execute_kernel_CircleLogicalNot(), luci_interpreter::execute_kernel_CircleLogicalOr(), luci_interpreter::execute_kernel_CircleMaxPool2D(), luci_interpreter::execute_kernel_CircleMean(), luci_interpreter::execute_kernel_CircleNeg(), luci_interpreter::execute_kernel_CirclePadCommon(), luci_interpreter::execute_kernel_CircleResizeBilinear(), luci_interpreter::execute_kernel_CircleSlice(), luci_interpreter::execute_kernel_CircleStridedSlice(), luci_interpreter::execute_kernel_CircleTranspose(), getTensorRuntimeShape(), TransposeRowsColumns(), and luci_interpreter::kernels::VectorOfTensors< T, is_const >::VectorOfTensors().
| TfLiteFusedActivation luci_interpreter::kernels::getTfLiteActivation | ( | Activation | activation | ) |
Definition at line 30 of file Utils.cpp.
References luci::must_cast(), luci::NONE, luci::RELU, luci::RELU6, luci::RELU_N1_TO_1, luci::SIGN_BIT, and luci::TANH.
| void luci_interpreter::kernels::matrixScalarMultiplyAccumulate | ( | const int8_t * | matrix, |
| int32_t | scalar, | ||
| int32_t | n_row, | ||
| int32_t | n_col, | ||
| int32_t * | output | ||
| ) |
Definition at line 75 of file Utils.cpp.
References luci::must_cast().
| void luci_interpreter::kernels::quantizeMultiplier | ( | double | double_multiplier, |
| int32_t * | quantized_multiplier, | ||
| int * | shift | ||
| ) |
Definition at line 157 of file Utils.cpp.
References luci::must_cast().
Referenced by luci_interpreter::kernels::LeakyRelu::configure(), luci_interpreter::kernels::PRelu::configure(), luci_interpreter::kernels::Relu::configure(), luci_interpreter::kernels::Relu0To1::configure(), luci_interpreter::kernels::Relu6::configure(), luci_interpreter::createConv2DParams(), quantizeMultipliers(), and quantizeMultiplierSmallerThanOneExp().
|
inline |
Definition at line 170 of file Utils.h.
References luci::must_cast(), and quantizeMultiplier().
Referenced by luci_interpreter::kernels::PRelu::configure(), and luci_interpreter::kernels::TransposeConv::configure().
| void luci_interpreter::kernels::quantizeMultiplierSmallerThanOneExp | ( | double | double_multiplier, |
| int32_t * | quantized_multiplier, | ||
| int * | left_shift | ||
| ) |
Definition at line 193 of file Utils.cpp.
References luci::must_cast(), and quantizeMultiplier().
Referenced by luci_interpreter::kernels::Equal::configure(), luci_interpreter::kernels::Greater::configure(), luci_interpreter::kernels::GreaterEqual::configure(), luci_interpreter::kernels::Less::configure(), luci_interpreter::kernels::LessEqual::configure(), luci_interpreter::kernels::NotEqual::configure(), and evalTISOQuantizedKernel().
| void luci_interpreter::kernels::TransposeRowsColumns | ( | const Tensor * | tensor_in, |
| Tensor * | tensor_out | ||
| ) |
Definition at line 124 of file BatchMatMul.cpp.
References getTensorShape(), and luci::must_cast().
Referenced by luci_interpreter::kernels::BatchMatMul::execute().
| const int luci_interpreter::kernels::max_dim = 4 |
Definition at line 29 of file Slice.cpp.
Referenced by luci_interpreter::kernels::Slice::configure(), and luci_interpreter::kernels::Slice::execute().