Home
last modified time | relevance | path

Searched refs:NN_RET_CHECK (Results 1 – 25 of 59) sorted by relevance

123

/frameworks/ml/nn/common/operations/
DLogicalAndOr.cpp48 NN_RET_CHECK(outputShapeIndexed.indexToFlatIndex(curIndex, &outputFlatIndex)); in compute()
50 NN_RET_CHECK(aShapeIndexed.broadcastedIndexToFlatIndex(curIndex, &aFlatIndex)); in compute()
52 NN_RET_CHECK(bShapeIndexed.broadcastedIndexToFlatIndex(curIndex, &bFlatIndex)); in compute()
56 NN_RET_CHECK(outputShapeIndexed.nextIndexInplace(&curIndex, &lastIndex)); in compute()
67 NN_RET_CHECK(inputType == OperandType::TENSOR_BOOL8) in validate()
69 NN_RET_CHECK(validateInputTypes(context, {inputType, inputType})); in validate()
70 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
78 NN_RET_CHECK(calculateBroadcastedShape(input1, input2, &output)); in prepare()
DQLSTM.cpp143 NN_RET_CHECK(validateInputTypes(context, inExpectedTypes)); in validate()
152 NN_RET_CHECK(validateOutputTypes(context, outExpectedTypes)); in validate()
174 NN_RET_CHECK(!context->isOmittedInput(tensor)) in prepare()
233 NN_RET_CHECK(cifgWeightsAllOrNone); in prepare()
262 NN_RET_CHECK(peepholeWeightsAllOrNone); in prepare()
265 NN_RET_CHECK(hasTensor(context, kInputGateBiasTensor)); in prepare()
270 NN_RET_CHECK(!hasTensor(context, kInputGateBiasTensor)) in prepare()
331 NN_RET_CHECK(!hasTensor(context, kInputLayerNormTensor)) in prepare()
339 NN_RET_CHECK(layerNormWeightsAllOrNoneCifg); in prepare()
349 NN_RET_CHECK(layerNormWeightsAllOrNone); in prepare()
[all …]
DPooling.cpp257 NN_RET_CHECK(input.initialize(inputData, inputShape)); in averagePool()
258 NN_RET_CHECK(output.initialize(outputData, outputShape)); in averagePool()
259 NN_RET_CHECK(averagePoolNhwc(input.getNhwcBuffer(), input.getNhwcShape(), param, in averagePool()
261 NN_RET_CHECK(output.commit()); in averagePool()
270 NN_RET_CHECK(input.initialize(inputData, inputShape)); in l2Pool()
271 NN_RET_CHECK(output.initialize(outputData, outputShape)); in l2Pool()
272 NN_RET_CHECK(l2PoolNhwc(input.getNhwcBuffer(), input.getNhwcShape(), param, in l2Pool()
274 NN_RET_CHECK(output.commit()); in l2Pool()
283 NN_RET_CHECK(input.initialize(inputData, inputShape)); in maxPool()
284 NN_RET_CHECK(output.initialize(outputData, outputShape)); in maxPool()
[all …]
DResizeImageOps.cpp143 NN_RET_CHECK(resizeImageOpNhwc(opType, inputData_float32.data(), inputShape, alignCorners, in resizeImageOpNhwc()
155 NN_RET_CHECK(input.initialize(inputData, inputShape)); in resizeImageOp()
156 NN_RET_CHECK(output.initialize(outputData, outputShape)); in resizeImageOp()
157 NN_RET_CHECK(resizeImageOpNhwc(opType, input.getNhwcBuffer(), input.getNhwcShape(), in resizeImageOp()
160 NN_RET_CHECK(output.commit()); in resizeImageOp()
177 NN_RET_CHECK(numInputs >= kNumInputs - 1 && numInputs <= kNumInputs + kNumOptionalInputs); in validate()
179 NN_RET_CHECK(numInputs >= kNumInputs && numInputs <= kNumInputs + kNumOptionalInputs); in validate()
187 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validate()
193 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
196 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_3)); in validate()
[all …]
DElementwise.cpp92 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validate()
95 NN_RET_CHECK(validateInputTypes(context, {inputType})); in validate()
96 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
104 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validateAbs()
107 NN_RET_CHECK(validateInputTypes(context, {inputType})); in validateAbs()
108 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validateAbs()
118 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validateFloor()
121 NN_RET_CHECK(validateInputTypes(context, {inputType})); in validateFloor()
122 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validateFloor()
137 NN_RET_CHECK(SetShape(input, &output)); in prepare()
[all …]
DFullyConnected.cpp121 NN_RET_CHECK(GetQuantizedConvolutionMultipler(inputShape, weightsShape, biasShape, outputShape, in fullyConnectedQuant8()
124 NN_RET_CHECK(QuantizeMultiplier(realMultiplier, &outputMultiplier, &exponent)); in fullyConnectedQuant8()
159 NN_RET_CHECK(GetQuantizedConvolutionMultipler(inputShape, weightsShape, biasShape, outputShape, in fullyConnectedQuant8()
161 NN_RET_CHECK(QuantizeMultiplier(realMultiplier, &outputMultiplier, &outputShift)); in fullyConnectedQuant8()
187 NN_RET_CHECK(weights.type == input.type); in validateShapes()
190 NN_RET_CHECK(bias.type == OperandType::TENSOR_INT32); in validateShapes()
192 NN_RET_CHECK(bias.type == input.type); in validateShapes()
230 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_0)); in validate()
238 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
255 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
[all …]
DRoiPooling.cpp84 NN_RET_CHECK(roiInfo[0] >= 0); in roiPoolingNhwc()
85 NN_RET_CHECK(roiInfo[1] >= 0); in roiPoolingNhwc()
86 NN_RET_CHECK(roiInfo[2] >= 0); in roiPoolingNhwc()
87 NN_RET_CHECK(roiInfo[3] >= 0); in roiPoolingNhwc()
88 NN_RET_CHECK(roiInfo[0] * widthScale <= inWidth); in roiPoolingNhwc()
89 NN_RET_CHECK(roiInfo[1] * heightScale <= inHeight); in roiPoolingNhwc()
90 NN_RET_CHECK(roiInfo[2] * widthScale <= inWidth); in roiPoolingNhwc()
91 NN_RET_CHECK(roiInfo[3] * heightScale <= inHeight); in roiPoolingNhwc()
92 NN_RET_CHECK(roiInfo[0] <= roiInfo[2]); in roiPoolingNhwc()
93 NN_RET_CHECK(roiInfo[1] <= roiInfo[3]); in roiPoolingNhwc()
[all …]
DPRelu.cpp56 NN_RET_CHECK(outputShapeIndexed.indexToFlatIndex(curIndex, &outputFlatIndex)); in eval()
58 NN_RET_CHECK(aShapeIndexed.broadcastedIndexToFlatIndex(curIndex, &aFlatIndex)); in eval()
60 NN_RET_CHECK(bShapeIndexed.broadcastedIndexToFlatIndex(curIndex, &bFlatIndex)); in eval()
64 NN_RET_CHECK(outputShapeIndexed.nextIndexInplace(&curIndex, &lastIndex)); in eval()
105 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validate()
110 NN_RET_CHECK(validateInputTypes(context, {inputType, inputType})); in validate()
111 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
122 NN_RET_CHECK(input.type == alpha.type); in prepare()
124 NN_RET_CHECK(calculateBroadcastedShape(input, alpha, &output)); in prepare()
DChannelShuffle.cpp67 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validate()
76 NN_RET_CHECK(validateInputTypes(context, {inputType, OperandType::INT32, OperandType::INT32})); in validate()
77 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
89 NN_RET_CHECK(handleNegativeAxis(input, &axis)); in prepare()
90 NN_RET_CHECK(numGroups > 0); in prepare()
91 NN_RET_CHECK(getSizeOfDimension(input, axis) % numGroups == 0); in prepare()
98 NN_RET_CHECK(handleNegativeAxis(context->getInputShape(kInputTensor), &axis)); in execute()
DRoiAlign.cpp88 NN_RET_CHECK(roiInfo[0] >= 0); in roiAlignNhwc()
89 NN_RET_CHECK(roiInfo[1] >= 0); in roiAlignNhwc()
90 NN_RET_CHECK(roiInfo[2] >= 0); in roiAlignNhwc()
91 NN_RET_CHECK(roiInfo[3] >= 0); in roiAlignNhwc()
92 NN_RET_CHECK(roiInfo[0] * widthScale <= inWidth); in roiAlignNhwc()
93 NN_RET_CHECK(roiInfo[1] * heightScale <= inHeight); in roiAlignNhwc()
94 NN_RET_CHECK(roiInfo[2] * widthScale <= inWidth); in roiAlignNhwc()
95 NN_RET_CHECK(roiInfo[3] * heightScale <= inHeight); in roiAlignNhwc()
96 NN_RET_CHECK(roiInfo[0] <= roiInfo[2]); in roiAlignNhwc()
97 NN_RET_CHECK(roiInfo[1] <= roiInfo[3]); in roiAlignNhwc()
[all …]
DTranspose.cpp82 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_1)); in validate()
84 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
86 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_3)); in validate()
100 NN_RET_CHECK(!context->isOmittedInput(kInputTensor)); in prepare()
101 NN_RET_CHECK(!context->isOmittedOutput(kOutputTensor)); in prepare()
122 NN_RET_CHECK(permShape.type == OperandType::TENSOR_INT32); in prepare()
128 NN_RET_CHECK(permData[idx] >= 0 && permData[idx] < static_cast<int32_t>(numInputDims)); in prepare()
DLogicalNot.cpp51 NN_RET_CHECK(inputType == OperandType::TENSOR_BOOL8) in validate()
53 NN_RET_CHECK(validateInputTypes(context, {inputType})); in validate()
54 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
61 NN_RET_CHECK(SetShape(input, &output)); in prepare()
DReduce.cpp76 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validateProdSum()
79 NN_RET_CHECK( in validateProdSum()
81 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validateProdSum()
93 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validateMaxMin()
98 NN_RET_CHECK( in validateMaxMin()
100 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validateMaxMin()
116 NN_RET_CHECK(inputType == OperandType::TENSOR_BOOL8) in validateLogical()
118 NN_RET_CHECK( in validateLogical()
120 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validateLogical()
140 NN_RET_CHECK(handleNegativeAxis(inputRank, &axis)); in prepare()
DTransposeConv2D.cpp209 NN_RET_CHECK(GetQuantizedConvolutionMultipler(inputShape, filterShape, biasShape, outputShape, in transposeConvNhwc()
212 NN_RET_CHECK(QuantizeMultiplier(realMultiplier, &outputMultiplier, &exponent)); in transposeConvNhwc()
306 NN_RET_CHECK(input.initialize(inputData, inputShape)); in transposeConv()
307 NN_RET_CHECK(output.initialize(outputData, outputShape)); in transposeConv()
308 NN_RET_CHECK(transposeConvNhwc(input.getNhwcBuffer(), input.getNhwcShape(), filterData, in transposeConv()
311 NN_RET_CHECK(output.commit()); in transposeConv()
350 NN_RET_CHECK(GetQuantizedConvolutionMultipler( in transposeConvQuant8PerChannelNhwc()
353 NN_RET_CHECK(QuantizeMultiplier(realMultiplier[i], &outputMultiplier[i], &exponent)); in transposeConvQuant8PerChannelNhwc()
426 NN_RET_CHECK(input.initialize(inputData, inputShape)); in transposeConvQuant8PerChannel()
427 NN_RET_CHECK(output.initialize(outputData, outputShape)); in transposeConvQuant8PerChannel()
[all …]
DDepthwiseConv2D.cpp208 NN_RET_CHECK(GetQuantizedConvolutionMultipler(inputShape, filterShape, biasShape, outputShape, in depthwiseConvNhwc()
211 NN_RET_CHECK(QuantizeMultiplier(real_multiplier, &output_multiplier, &exponent)); in depthwiseConvNhwc()
262 NN_RET_CHECK(depthwiseConvNhwc(unsignedInput.data(), inputShape, unsignedFilter.data(), in depthwiseConvNhwc()
310 NN_RET_CHECK(GetQuantizedConvolutionMultipler( in depthwiseConvQuant8PerChannelNhwc()
313 NN_RET_CHECK(QuantizeMultiplier(realMultiplier[i], &outputMultiplier[i], &exponent)); in depthwiseConvQuant8PerChannelNhwc()
380 NN_RET_CHECK(input.initialize(inputData, inputShape)); in depthwiseConv()
381 NN_RET_CHECK(output.initialize(outputData, outputShape)); in depthwiseConv()
382 NN_RET_CHECK(depthwiseConvNhwc(input.getNhwcBuffer(), input.getNhwcShape(), filterData, in depthwiseConv()
387 NN_RET_CHECK(output.commit()); in depthwiseConv()
403 NN_RET_CHECK(input.initialize(inputData, inputShape)); in depthwiseConvQuant8PerChannel()
[all …]
DQuantizedLSTM.cpp266 NN_RET_CHECK(weightsScale != 0); in prepare()
281 NN_RET_CHECK(checkWeightsShape(inputToInputWeights, inputSize)); in prepare()
282 NN_RET_CHECK(checkWeightsShape(inputToForgetWeights, inputSize)); in prepare()
283 NN_RET_CHECK(checkWeightsShape(inputToCellWeights, inputSize)); in prepare()
284 NN_RET_CHECK(checkWeightsShape(inputToOutputWeights, inputSize)); in prepare()
290 NN_RET_CHECK(checkWeightsShape(recurrentToInputWeights, outputSize)); in prepare()
291 NN_RET_CHECK(checkWeightsShape(recurrentToForgetWeights, outputSize)); in prepare()
292 NN_RET_CHECK(checkWeightsShape(recurrentToCellWeights, outputSize)); in prepare()
293 NN_RET_CHECK(checkWeightsShape(recurrentToOutputWeights, outputSize)); in prepare()
312 NN_RET_CHECK(checkBiasShape(inputGateBias)); in prepare()
[all …]
DConv2D.cpp242 NN_RET_CHECK(GetQuantizedConvolutionMultipler(inputShape, filterShape, biasShape, outputShape, in convNhwc()
245 NN_RET_CHECK(QuantizeMultiplier(real_multiplier, &output_multiplier, &exponent)); in convNhwc()
295 NN_RET_CHECK(convNhwc(unsignedInput.data(), inputShape, unsignedFilter.data(), filterShape, in convNhwc()
340 NN_RET_CHECK(input.initialize(inputData, inputShape)); in conv()
341 NN_RET_CHECK(output.initialize(outputData, outputShape)); in conv()
342 NN_RET_CHECK(convNhwc(input.getNhwcBuffer(), input.getNhwcShape(), filterData, filterShape, in conv()
347 NN_RET_CHECK(output.commit()); in conv()
384 NN_RET_CHECK(GetQuantizedConvolutionMultipler( in convQuant8PerChannelNhwc()
387 NN_RET_CHECK(QuantizeMultiplier(realMultiplier[i], &outputMultiplier[i], &exponent)); in convQuant8PerChannelNhwc()
477 NN_RET_CHECK(GetQuantizedConvolutionMultipler( in convQuant8PerChannelNhwc()
[all …]
DNeg.cpp57 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validate()
60 NN_RET_CHECK(validateInputTypes(context, {inputType})); in validate()
61 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
68 NN_RET_CHECK(SetShape(input, &output)); in prepare()
DSqueeze.cpp45 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validate()
60 NN_RET_CHECK(validateInputTypes(context, { in validate()
64 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
74 NN_RET_CHECK(!context->isOmittedInput(kInputTensor)); in prepare()
75 NN_RET_CHECK(!context->isOmittedOutput(kOutputTensor)); in prepare()
DInstanceNormalization.cpp95 NN_RET_CHECK(input.initialize(inputData, inputShape)); in instanceNorm()
96 NN_RET_CHECK(output.initialize(outputData, outputShape)); in instanceNorm()
97 NN_RET_CHECK(instanceNormNhwc(input.getNhwcBuffer(), input.getNhwcShape(), gamma, beta, epsilon, in instanceNorm()
99 NN_RET_CHECK(output.commit()); in instanceNorm()
120 NN_RET_CHECK(validateInputTypes(context, inExpectedTypes)); in validate()
121 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
DSlice.cpp73 NN_RET_CHECK(indexedOutput.indexToFlatIndex(outputIndex, &outputOffset)); in evalGeneric()
74 NN_RET_CHECK(indexedInput.indexToFlatIndex(inputIndex, &inputOffset)); in evalGeneric()
77 NN_RET_CHECK(indexedOutput.nextIndexInplace(&outputIndex, &lastIndex)); in evalGeneric()
89 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validate()
96 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_3)); in validate()
98 NN_RET_CHECK(validateHalVersion(context, HalVersion::V1_2)); in validate()
108 NN_RET_CHECK(n_dims > 0); in prepare()
DUnidirectionalSequenceLSTM.cpp121 NN_RET_CHECK(numOutputs == kNumOutputs || numOutputs == kNumOutputsWithState); in validate()
167 NN_RET_CHECK(validateInputTypes(context, inExpectedTypes)); in validate()
168 NN_RET_CHECK(validateOutputTypes(context, outExpectedTypes)); in validate()
193 NN_RET_CHECK(!context->isOmittedInput(requiredInput)) in prepare()
253 NN_RET_CHECK(cifgWeightsAllOrNone); in prepare()
282 NN_RET_CHECK(peepholeWeightsAllOrNone); in prepare()
285 NN_RET_CHECK(hasTensor(context, kInputGateBiasTensor)); in prepare()
290 NN_RET_CHECK(!hasTensor(context, kInputGateBiasTensor)) in prepare()
351 NN_RET_CHECK(!hasTensor(context, kInputLayerNormWeightsTensor)) in prepare()
360 NN_RET_CHECK(layerNormWeightsAllOrNoneCifg); in prepare()
[all …]
DGenerateProposals.cpp121 NN_RET_CHECK(bboxTransformFloat32(roi_float32.data(), roiShape, delta_float32.data(), in bboxTransformFloat16()
143 NN_RET_CHECK(bboxTransformFloat32(roi_float32.data(), roiShape, delta_float32.data(), in bboxTransformQuant()
165 NN_RET_CHECK(bboxTransformFloat32(roi_float32.data(), roiShape, delta_float32.data(), in bboxTransformQuant()
224 NN_RET_CHECK(validateInputTypes(context, inExpectedTypes)); in validate()
225 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
268 NN_RET_CHECK(context->setOutputShape(kOutputTensor, outputShape)); in prepare()
578 NN_RET_CHECK(context->setOutputShape(kOutputScoreTensor, scoresOutShape)); in boxWithNmsLimitWriteOutput()
582 NN_RET_CHECK(context->setOutputShape(kOutputRoiTensor, roiOutShape)); in boxWithNmsLimitWriteOutput()
586 NN_RET_CHECK(context->setOutputShape(kOutputClassTensor, classesOutShape)); in boxWithNmsLimitWriteOutput()
590 NN_RET_CHECK(context->setOutputShape(kOutputBatchesTensor, batchesOutShape)); in boxWithNmsLimitWriteOutput()
[all …]
DSelect.cpp76 NN_RET_CHECK(inputType == OperandType::TENSOR_FLOAT16 || in validate()
82 NN_RET_CHECK(validateInputTypes(context, {OperandType::TENSOR_BOOL8, inputType, inputType})); in validate()
83 NN_RET_CHECK(validateOutputTypes(context, {inputType})); in validate()
102 NN_RET_CHECK(SameShape(input1, input2)); in prepare()
105 NN_RET_CHECK(SetShape(input1, &output)); in prepare()
DFill.cpp73 NN_RET_CHECK(outputType == OperandType::TENSOR_FLOAT16 || in validate()
77 NN_RET_CHECK(validateOutputTypes(context, {outputType})); in validate()
80 NN_RET_CHECK(getValueType(outputType, &valueType)); in validate()
81 NN_RET_CHECK(validateInputTypes(context, {OperandType::TENSOR_INT32, valueType})); in validate()

123