/frameworks/ml/nn/common/include/ |
D | Operations.h | 43 struct Shape; 45 bool floorFloat16(const _Float16* inputData, _Float16* outputData, const Shape& shape); 46 bool floorFloat32(const float* inputData, float* outputData, const Shape& shape); 48 bool depthwiseConvFloat16(const _Float16* inputData, const Shape& inputShape, 49 const _Float16* filterData, const Shape& filterShape, 50 const _Float16* biasData, const Shape& biasShape, int32_t paddingLeft, 54 _Float16* outputData, const Shape& outputShape); 55 bool depthwiseConvFloat32(const float* inputData, const Shape& inputShape, const float* filterData, 56 const Shape& filterShape, const float* biasData, const Shape& biasShape, 61 const Shape& outputShape); [all …]
|
D | OperationsUtils.h | 47 struct Shape { struct 80 virtual Shape getInputShape(uint32_t index) const = 0; 85 virtual Shape getOutputShape(uint32_t index) const = 0; 95 virtual Shape getInputShape(uint32_t index) const = 0; 101 virtual Shape getOutputShape(uint32_t index) const = 0; 105 virtual bool setOutputShape(uint32_t index, const Shape& shape) = 0; 140 bool SameShape(const Shape& in1, const Shape& in2); 143 bool SetShape(const Shape& in, Shape* out); 147 uint32_t getNumberOfElements(const Shape& shape); 148 uint32_t getNumberOfElements(const Shape& shape, size_t firstAxisInclusive, [all …]
|
D | CpuOperationUtils.h | 34 inline tflite::Dims<4> convertShapeToDims(const Shape& shape) { in convertShapeToDims() 55 inline tflite::RuntimeShape convertShapeToTflshape(const Shape& shape) { in convertShapeToTflshape() 117 inline bool convertNchwToNhwc(const T* nchw, const Shape& nchwShape, std::vector<T>* nhwc, in convertNchwToNhwc() 118 Shape* nhwcShape) { in convertNchwToNhwc() 139 inline bool convertNhwcToNchw(const std::vector<T>& nhwc, const Shape& nhwcShape, T* nchw) { in convertNhwcToNchw() 161 bool initialize(const T* data, const Shape& shape) { in initialize() 171 const Shape& getNhwcShape() { return mShape; } in getNhwcShape() 176 Shape mShape; 185 bool initialize(T* data, const Shape& shape) { in initialize() 198 const Shape& getNhwcShape() { return mShape; } in getNhwcShape() [all …]
|
/frameworks/ml/nn/common/operations/ |
D | Reshape.cpp | 34 bool copyData(const void* inputData, const Shape& inputShape, void* outputData, in copyData() 35 const Shape& outputShape) { in copyData() 43 bool depthToSpaceGeneric(const T* inputData, const Shape& inputShape, int32_t blockSize, in depthToSpaceGeneric() 44 T* outputData, const Shape& outputShape) { in depthToSpaceGeneric() 50 template bool depthToSpaceGeneric<float>(const float* inputData, const Shape& inputShape, 52 const Shape& outputShape); 53 template bool depthToSpaceGeneric<_Float16>(const _Float16* inputData, const Shape& inputShape, 55 const Shape& outputShape); 56 template bool depthToSpaceGeneric<uint8_t>(const uint8_t* inputData, const Shape& inputShape, 58 const Shape& outputShape); [all …]
|
D | SimpleMath.cpp | 33 bool meanFloat16(_Float16* inputData, const Shape& inputShape, const int32_t* axis, in meanFloat16() 34 const Shape& axisShape, bool keepDims, _Float16* outputData, in meanFloat16() 35 const Shape& outputShape) { in meanFloat16() 48 bool meanGeneric(T* inputData, const Shape& inputShape, const int32_t* axis, const Shape& axisShape, in meanGeneric() 49 bool keepDims, T* outputData, const Shape& outputShape) { in meanGeneric() 77 template bool meanGeneric<float, float>(float* inputData, const Shape& inputShape, 78 const int32_t* axis, const Shape& axisShape, bool keepDims, 79 float* outputData, const Shape& outputShape); 80 template bool meanGeneric<uint8_t, int32_t>(uint8_t* inputData, const Shape& inputShape, 81 const int32_t* axis, const Shape& axisShape, [all …]
|
D | RNN.cpp | 49 bool RNN::Prepare(const Operation& operation, RunTimeOperandInfo* operands, Shape* hiddenStateShape, in Prepare() 50 Shape* outputShape) { in Prepare() 72 const Shape& inputShape = input->shape(); in Prepare() 120 bool RNN::RNNStep(const T* inputData, const Shape& inputShape, const T* hiddenStateInputData, in RNNStep() 121 const T* biasData, const T* weightsData, const Shape& weightsShape, in RNNStep() 122 const T* recurrentWeightsData, const Shape& recurrentWeightsShape, in RNNStep() 126 Shape dummyShape; in RNNStep() 140 bool RNN::RNNStep(const T* inputData, const Shape& inputShape, const T* auxInputData, in RNNStep() 141 const Shape& auxInputShape, const T* hiddenStateInputData, const T* biasData, in RNNStep() 142 const T* weightsData, const Shape& weightsShape, const T* auxWeightsData, in RNNStep() [all …]
|
D | Activation.cpp | 52 bool reluFloat(const T* inputData, const Shape& inputShape, T* outputData, const Shape& outputShape, in reluFloat() 62 template bool reluFloat<float>(const float* inputData, const Shape& inputShape, float* outputData, 63 const Shape& outputShape, float reluMin, float reluMax); 64 template bool reluFloat<_Float16>(const _Float16* inputData, const Shape& inputShape, 65 _Float16* outputData, const Shape& outputShape, float reluMin, 69 bool relu1Float(const T* inputData, const Shape& inputShape, T* outputData, in relu1Float() 70 const Shape& outputShape) { in relu1Float() 73 template bool relu1Float<float>(const float* inputData, const Shape& inputShape, float* outputData, 74 const Shape& outputShape); 75 template bool relu1Float<_Float16>(const _Float16* inputData, const Shape& inputShape, [all …]
|
D | RNN.h | 29 struct Shape; 36 Shape* hiddenStateShape, Shape* outputShape); 50 static bool RNNStep(const T* inputData, const Shape& inputShape, const T* hiddenStateInputData, 51 const T* biasData, const T* weightsData, const Shape& weightsShape, 52 const T* recurrentWeightsData, const Shape& recurrentWeightsShape, 56 static bool RNNStep(const T* inputData, const Shape& inputShape, const T* auxInputData, 57 const Shape& auxInputShape, const T* hiddenStateInputData, 58 const T* biasData, const T* weightsData, const Shape& weightsShape, 59 const T* auxWeightsData, const Shape& auxWeightsShape, 60 const T* recurrentWeightsData, const Shape& recurrentWeightsShape,
|
D | Split.cpp | 30 bool splitGeneric(const Scalar* inputData, const Shape& inputShape, int32_t axis, in splitGeneric() 32 const std::vector<Shape>& outputShapes) { in splitGeneric() 56 bool splitFloat16(const _Float16* inputData, const Shape& inputShape, int32_t axis, in splitFloat16() 58 const std::vector<Shape>& outputShapes) { in splitFloat16() 63 bool splitFloat32(const float* inputData, const Shape& inputShape, int32_t axis, in splitFloat32() 65 const std::vector<Shape>& outputShapes) { in splitFloat32() 70 bool splitQuant8(const uint8_t* inputData, const Shape& inputShape, int32_t axis, in splitQuant8() 72 const std::vector<Shape>& outputShapes) { in splitQuant8() 77 bool splitQuant8Signed(const int8_t* inputData, const Shape& inputShape, int32_t axis, in splitQuant8Signed() 79 const std::vector<Shape>& outputShapes) { in splitQuant8Signed() [all …]
|
D | GroupedConv2D.cpp | 46 bool groupedConvFloat32(const float* inputData, const Shape& inputShape, const float* filterData, in groupedConvFloat32() 47 const Shape& filterShape, const float* biasData, const Shape& biasShape, in groupedConvFloat32() 51 const Shape& outputShape) { in groupedConvFloat32() 104 bool groupedConvQuant8(const T* inputData, const Shape& inputShape, const T* filterData, in groupedConvQuant8() 105 const Shape& filterShape, const int32_t* biasData, const Shape& biasShape, in groupedConvQuant8() 109 const Shape& outputShape) { in groupedConvQuant8() 181 template bool groupedConvQuant8<int8_t>(const int8_t* inputData, const Shape& inputShape, 182 const int8_t* filterData, const Shape& filterShape, 183 const int32_t* biasData, const Shape& biasShape, 188 const Shape& outputShape); [all …]
|
D | FullyConnected.cpp | 55 bool fullyConnectedFloat32(const float* inputData, const Shape& inputShape, in fullyConnectedFloat32() 56 const float* weightsData, const Shape& weightsShape, in fullyConnectedFloat32() 57 const float* biasData, const Shape& biasShape, int32_t activation, in fullyConnectedFloat32() 58 float* outputData, const Shape& outputShape) { in fullyConnectedFloat32() 85 bool fullyConnectedFloat16(const _Float16* inputData, const Shape& inputShape, in fullyConnectedFloat16() 86 const _Float16* weightsData, const Shape& weightsShape, in fullyConnectedFloat16() 87 const _Float16* biasData, const Shape& biasShape, int32_t activation, in fullyConnectedFloat16() 88 _Float16* outputData, const Shape& outputShape) { in fullyConnectedFloat16() 106 bool fullyConnectedQuant8(const uint8_t* inputData, const Shape& inputShape, in fullyConnectedQuant8() 107 const uint8_t* weightsData, const Shape& weightsShape, in fullyConnectedQuant8() [all …]
|
D | Pow.cpp | 35 bool evalGeneric(const T* baseData, const Shape& baseShape, const T* exponentData, in evalGeneric() 36 const Shape& exponentShape, T* outputData, const Shape& outputShape) { in evalGeneric() 62 bool prepare(const Shape& baseShape, const Shape& exponentShape, Shape* output) { in prepare() 70 bool eval(const void* baseData, const Shape& baseShape, const void* exponentData, in eval() 71 const Shape& exponentShape, void* outputData, const Shape& outputShape) { in eval()
|
D | MaximumMinimum.cpp | 37 bool evalGeneric(const T* aData, const Shape& aShape, const T* bData, const Shape& bShape, in evalGeneric() 38 bool isMinimum, T* outputData, const Shape& outputShape) { in evalGeneric() 63 bool evalQuant8(const T* aData, const Shape& aShape, const T* bData, const Shape& bShape, in evalQuant8() 64 bool isMinimum, T* outputData, const Shape& outputShape) { in evalQuant8() 92 bool prepare(const Shape& in1, const Shape& in2, Shape* out) { in prepare() 97 bool eval(const void* in1, const Shape& shape1, const void* in2, const Shape& shape2, in eval() 98 bool isMinimum, void* output, const Shape& outputShape) { in eval()
|
D | Pow.h | 26 bool prepare(const Shape& in1, const Shape& in2, Shape* output); 28 bool eval(const void* baseData, const Shape& baseShape, const void* exponentData, 29 const Shape& exponentShape, void* outputData, const Shape& outputShape);
|
D | MaximumMinimum.h | 26 bool prepare(const Shape& in1, const Shape& in2, Shape* output); 28 bool eval(const void* in1, const Shape& shape1, const void* in2, const Shape& shape2, 29 bool isMinimum, void* output, const Shape& outputShape);
|
D | Broadcast.cpp | 74 const float* in1, const Shape& shape1, const float* in2, const Shape& shape2, 75 int32_t activation, float* out, const Shape& shapeOut)>; 77 bool binaryOperationFloat16(const _Float16* in1, const Shape& shape1, const _Float16* in2, in binaryOperationFloat16() 78 const Shape& shape2, int32_t activation, _Float16* out, in binaryOperationFloat16() 79 const Shape& shapeOut, binaryFunctionFloat32 operationFloat32) { in binaryOperationFloat16() 93 bool addFloat32(const float* in1, const Shape& shape1, const float* in2, const Shape& shape2, in addFloat32() 94 int32_t activation, float* out, const Shape& shapeOut) { in addFloat32() 120 bool addFloat16(const _Float16* in1, const Shape& shape1, const _Float16* in2, const Shape& shape2, in addFloat16() 121 int32_t activation, _Float16* out, const Shape& shapeOut) { in addFloat16() 127 bool addQuant8(const T* in1, const Shape& shape1, const T* in2, const Shape& shape2, in addQuant8() [all …]
|
D | GenerateProposals.cpp | 59 inline bool bboxTransformFloat32(const float* roiData, const Shape& roiShape, in bboxTransformFloat32() 60 const float* bboxDeltasData, const Shape& bboxDeltasShape, in bboxTransformFloat32() 61 const int32_t* batchesData, const Shape& batchesShape, in bboxTransformFloat32() 62 const float* imageInfoData, const Shape& imageInfoDataShape, in bboxTransformFloat32() 63 float* outputData, const Shape& outputShape) { in bboxTransformFloat32() 109 inline bool bboxTransformFloat16(const _Float16* roiData, const Shape& roiShape, in bboxTransformFloat16() 110 const _Float16* bboxDeltasData, const Shape& bboxDeltasShape, in bboxTransformFloat16() 111 const int32_t* batchesData, const Shape& batchesShape, in bboxTransformFloat16() 112 const _Float16* imageInfoData, const Shape& imageInfoDataShape, in bboxTransformFloat16() 113 _Float16* outputData, const Shape& outputShape) { in bboxTransformFloat16() [all …]
|
D | LSTM.h | 47 struct Shape; 53 bool Prepare(const hal::Operation& operation, RunTimeOperandInfo* operands, Shape* scratchShape, 54 Shape* outputStateShape, Shape* cellStateShape, Shape* outputShape); 108 const LSTMParams& params, const float* input_buffer, const Shape& input_shape, 111 const Shape& input_to_output_weights_shape, 116 const Shape& recurrent_to_output_weights_shape, 133 const LSTMParams& params, const _Float16* input_buffer, const Shape& input_shape, 138 const Shape& input_to_output_weights_shape, 143 const Shape& recurrent_to_output_weights_shape, 161 const LSTMParams& params, const float* input_buffer, const Shape& input_shape, [all …]
|
D | BidirectionalSequenceRNN.cpp | 67 void transposeFirstTwoDims(const T* input, const Shape& inputShape, T* output) { in transposeFirstTwoDims() 82 Shape removeFirstDim(const Shape& input) { in removeFirstDim() 83 Shape output = input; in removeFirstDim() 125 Shape inputShape = context->getInputShape(kInputTensor); in executeTyped() 128 Shape fwWeightsShape = context->getInputShape(kFwWeightsTensor); in executeTyped() 130 Shape fwRecurrentWeightsShape = context->getInputShape(kFwRecurrentWeightsTensor); in executeTyped() 135 Shape bwWeightsShape = context->getInputShape(kBwWeightsTensor); in executeTyped() 137 Shape bwRecurrentWeightsShape = context->getInputShape(kBwRecurrentWeightsTensor); in executeTyped() 156 Shape auxInputShape = context->getInputShape(kAuxInputTensor); in executeTyped() 157 Shape fwAuxWeightsShape = context->getInputShape(kFwAuxWeightsTensor); in executeTyped() [all …]
|
D | Pooling.cpp | 79 Shape inputShape = context->getInputShape(kInputTensor); in initialize() 103 tflite::PoolParams toTfliteParam(const Shape& output) const { in toTfliteParam() 139 bool averagePoolNhwc(const float* inputData, const Shape& inputShape, const PoolingParam& param, in averagePoolNhwc() 140 float* outputData, const Shape& outputShape) { in averagePoolNhwc() 149 bool averagePoolNhwc(const _Float16* inputData, const Shape& inputShape, const PoolingParam& param, in averagePoolNhwc() 150 _Float16* outputData, const Shape& outputShape) { in averagePoolNhwc() 162 bool averagePoolNhwc(const uint8_t* inputData, const Shape& inputShape, const PoolingParam& param, in averagePoolNhwc() 163 uint8_t* outputData, const Shape& outputShape) { in averagePoolNhwc() 172 bool averagePoolNhwc(const int8_t* inputData, const Shape& inputShape, const PoolingParam& param, in averagePoolNhwc() 173 int8_t* outputData, const Shape& outputShape) { in averagePoolNhwc() [all …]
|
D | QLSTM.cpp | 178 const Shape inputShape = context->getInputShape(kInputTensor); in prepare() 185 const Shape inputToOutputShape = context->getInputShape(kInputToOutputWeightsTensor); in prepare() 190 const Shape recurrentToOutputShape = context->getInputShape(kRecurrentToOutputWeightsTensor); in prepare() 196 const Shape inputToInputShape = context->getInputShape(kInputToInputWeightsTensor); in prepare() 202 const Shape inputToForgetShape = context->getInputShape(kInputToForgetWeightsTensor); in prepare() 206 const Shape inputToCellShape = context->getInputShape(kInputToCellWeightsTensor); in prepare() 212 const Shape recurrentToInputShape = context->getInputShape(kRecurrentToInputWeightsTensor); in prepare() 218 const Shape recurrentToForgetShape = context->getInputShape(kRecurrentToForgetWeightsTensor); in prepare() 222 const Shape recurrentToCellShape = context->getInputShape(kRecurrentToCellWeightsTensor); in prepare() 236 const Shape cellToInputShape = context->getInputShape(kCellToInputWeightsTensor); in prepare() [all …]
|
D | Tile.h | 26 bool prepare(const Shape& input, const int32_t* multiples, const Shape& multiplesShape, 27 Shape* output); 29 bool eval(const uint8_t* inputData, const Shape& inputShape, const int32_t* multiples, 30 uint8_t* outputData, const Shape& outputShape);
|
D | HeatmapMaxKeypoint.cpp | 88 inline bool heatmapMaxKeypointFloat32Nhwc(const float* heatmap, const Shape& heatmapShape, in heatmapMaxKeypointFloat32Nhwc() 89 const float* boxes, const Shape& boxesShape, in heatmapMaxKeypointFloat32Nhwc() 90 float* outputScoreData, const Shape& outputScoreShape, in heatmapMaxKeypointFloat32Nhwc() 92 const Shape& outputKeypointShape, float fpAtol, in heatmapMaxKeypointFloat32Nhwc() 167 inline bool heatmapMaxKeypointFloat32(const float* heatmap, const Shape& heatmapShape, in heatmapMaxKeypointFloat32() 168 const float* boxes, const Shape& boxesShape, bool layout, in heatmapMaxKeypointFloat32() 169 float* outputScoreData, const Shape& outputScoreShape, in heatmapMaxKeypointFloat32() 170 float* outputKeypointData, const Shape& outputKeypointShape, in heatmapMaxKeypointFloat32() 173 Shape heatmapShape_nhwc; in heatmapMaxKeypointFloat32() 178 const Shape& heatmapShape_tmp = layout ? heatmapShape_nhwc : heatmapShape; in heatmapMaxKeypointFloat32() [all …]
|
D | UnidirectionalSequenceLSTM.cpp | 197 const Shape inputShape = context->getInputShape(kInputTensor); in prepare() 205 const Shape inputToOutputShape = context->getInputShape(kInputToOutputWeightsTensor); in prepare() 210 const Shape recurrentToOutputShape = context->getInputShape(kRecurrentToOutputWeightsTensor); in prepare() 216 const Shape inputToInputShape = context->getInputShape(kInputToInputWeightsTensor); in prepare() 222 const Shape inputToForgetShape = context->getInputShape(kInputToForgetWeightsTensor); in prepare() 226 const Shape inputToCellShape = context->getInputShape(kInputToCellWeightsTensor); in prepare() 232 const Shape recurrentToInputShape = context->getInputShape(kRecurrentToInputWeightsTensor); in prepare() 238 const Shape recurrentToForgetShape = context->getInputShape(kRecurrentToForgetWeightsTensor); in prepare() 242 const Shape recurrentToCellShape = context->getInputShape(kRecurrentToCellWeightsTensor); in prepare() 256 const Shape cellToInputShape = context->getInputShape(kCellToInputWeightsTensor); in prepare() [all …]
|
/frameworks/ml/nn/common/ |
D | OperationsUtils.cpp | 50 void CalculateActivationRangeImpl(int32_t activation, const Shape& outputShape, int32_t qmin, in CalculateActivationRangeImpl() 116 bool SameShape(const Shape& in1, const Shape& in2) { in SameShape() 128 bool SetShape(const Shape& in, Shape* out) { in SetShape() 136 uint32_t getNumberOfElements(const Shape& shape) { in getNumberOfElements() 144 uint32_t getNumberOfElements(const Shape& shape, size_t firstAxisInclusive, in getNumberOfElements() 156 uint32_t getNumberOfDimensions(const Shape& shape) { in getNumberOfDimensions() 160 uint32_t getSizeOfDimension(const Shape& shape, uint32_t dimensionIdx) { in getSizeOfDimension() 165 uint32_t hasKnownRank(const Shape& shape) { in hasKnownRank() 258 bool GetQuantizedConvolutionMultipler(const Shape& inputShape, const Shape& filterShape, in GetQuantizedConvolutionMultipler() 259 const Shape& biasShape, const Shape& outputShape, in GetQuantizedConvolutionMultipler() [all …]
|