/aosp12/packages/modules/NeuralNetworks/runtime/test/fuzzing/operation_signatures/ |
H A D | Convolutions.cpp | 36 bool useNchw = false; in conv2DExplicitConstructor() local 45 int heightIndex = useNchw ? 2 : 1; in conv2DExplicitConstructor() 46 int widthIndex = useNchw ? 3 : 2; in conv2DExplicitConstructor() 47 int channelIndex = useNchw ? 1 : 3; in conv2DExplicitConstructor() 88 bool useNchw = false; in conv2DImplicitConstructor() local 97 int heightIndex = useNchw ? 2 : 1; in conv2DImplicitConstructor() 98 int widthIndex = useNchw ? 3 : 2; in conv2DImplicitConstructor() 275 bool useNchw = false; in depthwiseConv2DExplicitConstructor() local 328 bool useNchw = false; in depthwiseConv2DImplicitConstructor() local 536 if (useNchw) { in groupedConv2DExplicitConstructor() [all …]
|
H A D | BoundingBox.cpp | 44 bool useNchw; in roiConstructor() local 46 useNchw = op->inputs[9]->value<bool8>(); in roiConstructor() 48 useNchw = op->inputs[7]->value<bool8>(); in roiConstructor() 56 auto outDepth = op->inputs[0]->dimensions[useNchw ? 1 : 3]; in roiConstructor() 59 if (useNchw) { in roiConstructor() 89 bool useNchw; in roiFinalizer() local 91 useNchw = op->inputs[9]->value<bool8>(); in roiFinalizer() 93 useNchw = op->inputs[7]->value<bool8>(); in roiFinalizer() 98 uint32_t width = op->inputs[0]->dimensions[useNchw ? 3 : 2].getValue(); in roiFinalizer() 185 bool useNchw = op->inputs[2]->value<bool8>(); in heatmapMaxKeypointConstructor() local [all …]
|
H A D | Poolings.cpp | 36 bool useNchw = false; in poolingExplicitOpConstructor() local 37 if (op->inputs.size() > 10) useNchw = op->inputs[10]->value<bool8>(); in poolingExplicitOpConstructor() 38 int heightIndex = useNchw ? 2 : 1; in poolingExplicitOpConstructor() 39 int widthIndex = useNchw ? 3 : 2; in poolingExplicitOpConstructor() 40 int channelIndex = useNchw ? 1 : 3; in poolingExplicitOpConstructor() 75 bool useNchw = false; in poolingImplicitOpConstructor() local 76 if (op->inputs.size() > 7) useNchw = op->inputs[7]->value<bool8>(); in poolingImplicitOpConstructor() 77 int heightIndex = useNchw ? 2 : 1; in poolingImplicitOpConstructor() 78 int widthIndex = useNchw ? 3 : 2; in poolingImplicitOpConstructor() 79 int channelIndex = useNchw ? 1 : 3; in poolingImplicitOpConstructor()
|
H A D | Reshape.cpp | 29 bool useNchw = false; in spaceToDepthConstructor() local 31 int heightIndex = useNchw ? 2 : 1; in spaceToDepthConstructor() 32 int widthIndex = useNchw ? 3 : 2; in spaceToDepthConstructor() 33 int depthIndex = useNchw ? 1 : 3; in spaceToDepthConstructor() 42 if (useNchw) { in spaceToDepthConstructor() 84 bool useNchw = false; in depthToSpaceConstructor() local 97 if (useNchw) { in depthToSpaceConstructor() 172 bool useNchw = false; in batchToSpaceConstructor() local 185 if (useNchw) { in batchToSpaceConstructor() 230 bool useNchw = false; in spaceToBatchConstructor() local [all …]
|
H A D | Resize.cpp | 27 bool useNchw = op->inputs.size() > 3 ? static_cast<bool>(op->inputs[3]->value<bool8>()) : false; in resizeOpConstructor() local 28 int heightIndex = useNchw ? 2 : 1; in resizeOpConstructor() 29 int widthIndex = useNchw ? 3 : 2; in resizeOpConstructor() 54 if (useNchw) { in resizeOpConstructor()
|
/aosp12/packages/modules/NeuralNetworks/common/operations/ |
H A D | ResizeImageOps.cpp | 155 InputWithLayout<T> input(useNchw); in resizeImageOp() 156 OutputWithLayout<T> output(useNchw); in resizeImageOp() 234 const bool useNchw = getOptionalScalar(context, kLayoutScalar); in prepare() local 242 uint32_t inHeight = getSizeOfDimension(input, useNchw ? 2 : 1); in prepare() 243 uint32_t inWidth = getSizeOfDimension(input, useNchw ? 3 : 2); in prepare() 244 uint32_t channels = getSizeOfDimension(input, useNchw ? 1 : 3); in prepare() 273 if (useNchw) { in prepare() 285 const bool useNchw = getOptionalScalar(context, kLayoutScalar); in execute() local 292 context->getInputShape(kInputTensor), useNchw, alignCorners, in execute() 298 context->getInputShape(kInputTensor), useNchw, alignCorners, in execute() [all …]
|
H A D | Pooling.cpp | 51 bool useNchw = false; member 67 useNchw = context->getInputValue<bool>(10); in initialize() 77 useNchw = context->getInputValue<bool>(7); in initialize() 257 InputWithLayout<T> input(param.useNchw); in averagePool() 258 OutputWithLayout<T> output(param.useNchw); in averagePool() 270 InputWithLayout<T> input(param.useNchw); in l2Pool() 271 OutputWithLayout<T> output(param.useNchw); in l2Pool() 283 InputWithLayout<T> input(param.useNchw); in maxPool() 284 OutputWithLayout<T> output(param.useNchw); in maxPool() 371 uint32_t width = getSizeOfDimension(input, param.useNchw ? 3 : 2); in prepare() [all …]
|
H A D | RoiPooling.cpp | 147 bool useNchw, T_Input* outputData, const Shape& outputShape) { in roiPooling() argument 148 InputWithLayout<T_Input> input(useNchw); in roiPooling() 149 OutputWithLayout<T_Input> output(useNchw); in roiPooling() 169 batchSplitShape, heightStride, widthStride, useNchw, outputData, 179 float widthStride, bool useNchw, int8_t* outputData, 184 batchSplitShape, heightStride, widthStride, useNchw, outputData, 231 bool useNchw = context->getInputValue<bool>(kLayoutScalar); in prepare() local 239 uint32_t inHeight = getSizeOfDimension(input, useNchw ? 2 : 1); in prepare() 240 uint32_t inWidth = getSizeOfDimension(input, useNchw ? 3 : 2); in prepare() 241 uint32_t inDepth = getSizeOfDimension(input, useNchw ? 1 : 3); in prepare() [all …]
|
H A D | DepthwiseConv2D.cpp | 56 bool useNchw = false; member 69 useNchw = context->getInputValue<bool>(8); in initialize() 86 useNchw = context->getInputValue<bool>(11); in initialize() 380 InputWithLayout<T_Input> input(useNchw); in depthwiseConv() 381 OutputWithLayout<T_Input> output(useNchw); in depthwiseConv() 403 InputWithLayout<T> input(useNchw); in depthwiseConvQuant8PerChannel() 404 OutputWithLayout<T> output(useNchw); in depthwiseConvQuant8PerChannel() 546 uint32_t height = getSizeOfDimension(input, param.useNchw ? 2 : 1); in prepare() 547 uint32_t width = getSizeOfDimension(input, param.useNchw ? 3 : 2); in prepare() 548 uint32_t channels_in = getSizeOfDimension(input, param.useNchw ? 1 : 3); in prepare() [all …]
|
H A D | Conv2D.cpp | 69 bool useNchw = false; member 81 useNchw = context->getInputValue<bool>(7); in initialize() 97 useNchw = context->getInputValue<bool>(10); in initialize() 339 InputWithLayout<T_Input> input(useNchw); in conv() 340 OutputWithLayout<T_Input> output(useNchw); in conv() 516 InputWithLayout<T> input(useNchw); in convQuant8PerChannel() 517 OutputWithLayout<T> output(useNchw); in convQuant8PerChannel() 661 uint32_t height = getSizeOfDimension(input, param.useNchw ? 2 : 1); in prepare() 662 uint32_t width = getSizeOfDimension(input, param.useNchw ? 3 : 2); in prepare() 663 uint32_t channels_in = getSizeOfDimension(input, param.useNchw ? 1 : 3); in prepare() [all …]
|
H A D | TransposeConv2D.cpp | 64 bool useNchw = false; member 74 useNchw = context->getInputValue<bool>(8); in initialize() 95 useNchw = context->getInputValue<bool>(10); in initialize() 305 InputWithLayout<T_Input> input(param.useNchw); in transposeConv() 306 OutputWithLayout<T_Input> output(param.useNchw); in transposeConv() 425 InputWithLayout<T> input(param.useNchw); in transposeConvQuant8PerChannel() 426 OutputWithLayout<T> output(param.useNchw); in transposeConvQuant8PerChannel() 513 uint32_t height = getSizeOfDimension(input, param.useNchw ? 2 : 1); in prepare() 514 uint32_t width = getSizeOfDimension(input, param.useNchw ? 3 : 2); in prepare() 515 uint32_t channels_in = getSizeOfDimension(input, param.useNchw ? 1 : 3); in prepare() [all …]
|
H A D | RoiAlign.cpp | 320 int32_t heightSamplingRatio, int32_t widthSamplingRatio, bool useNchw, in roiAlign() argument 322 InputWithLayout<T_Input> input(useNchw); in roiAlign() 323 OutputWithLayout<T_Input> output(useNchw); in roiAlign() 388 bool useNchw = context->getInputValue<bool>(kLayoutScalar); in prepare() local 396 uint32_t inHeight = getSizeOfDimension(input, useNchw ? 2 : 1); in prepare() 397 uint32_t inWidth = getSizeOfDimension(input, useNchw ? 3 : 2); in prepare() 398 uint32_t inDepth = getSizeOfDimension(input, useNchw ? 1 : 3); in prepare() 435 if (useNchw) { in prepare()
|
H A D | InstanceNormalization.cpp | 93 bool useNchw, T* outputData, const Shape& outputShape) { in instanceNorm() argument 94 InputWithLayout<T> input(useNchw); in instanceNorm() 95 OutputWithLayout<T> output(useNchw); in instanceNorm()
|
H A D | GenerateProposals.cpp | 1067 bool useNchw, std::vector<float>* scoresOutData, in generateProposalsFloat32Compute() argument 1070 InputWithLayout<float> score_nhwc(useNchw), delta_nhwc(useNchw); in generateProposalsFloat32Compute() 1092 iouThreshold, minSize, useNchw, &scoresOut_float32, &roiOut_float32, &batchesOut)); in generateProposalsFloat32() 1143 heightStride, widthStride, preNmsTopN, postNmsTopN, iouThreshold, minSize, useNchw, in generateProposalsFloat16() 1195 heightStride, widthStride, preNmsTopN, postNmsTopN, iouThreshold, minSize, useNchw, in generateProposalsQuant() 1290 bool useNchw = context->getInputValue<bool>(kLayoutScalar); in prepare() local 1306 uint32_t height = getSizeOfDimension(scoreShape, useNchw ? 2 : 1); in prepare() 1307 uint32_t width = getSizeOfDimension(scoreShape, useNchw ? 3 : 2); in prepare() 1308 uint32_t numAnchors = getSizeOfDimension(scoreShape, useNchw ? 1 : 3); in prepare() 1311 NN_RET_CHECK_EQ(getSizeOfDimension(bboxDeltasShape, useNchw ? 2 : 1), height); in prepare() [all …]
|
/aosp12/packages/modules/NeuralNetworks/common/include/ |
H A D | CpuOperationUtils.h | 160 InputWithLayout(bool useNchw) : mDataOriginal(nullptr), mUseNchw(useNchw) {} in InputWithLayout() argument 184 OutputWithLayout(bool useNchw) : mDataOriginal(nullptr), mUseNchw(useNchw) {} in OutputWithLayout() argument
|