/packages/modules/NeuralNetworks/runtime/include/ |
D | NeuralNetworksWrapperExtensions.h | 52 ANeuralNetworksOperandType operandType; member 57 : operandType(other.operandType), in OperandType() 60 operandType.dimensions = dimensions.size() > 0 ? dimensions.data() : nullptr; in OperandType() 65 operandType = other.operandType; 68 operandType.dimensions = dimensions.size() > 0 ? dimensions.data() : nullptr; 76 operandType = { in dimensions() 118 if (ANeuralNetworksModel_addOperand(mModel, &(type->operandType)) != in addOperand()
|
D | NeuralNetworksWrapper.h | 127 ANeuralNetworksOperandType operandType; member 132 : operandType(other.operandType), in OperandType() 135 operandType.dimensions = dimensions.size() > 0 ? dimensions.data() : nullptr; in OperandType() 140 operandType = other.operandType; 143 operandType.dimensions = dimensions.size() > 0 ? dimensions.data() : nullptr; 150 operandType = { in dimensions() 163 operandType = { in OperandType() 174 operandType.dimensions = dimensions.size() > 0 ? dimensions.data() : nullptr; in updateDimensions() 305 if (NNAPI_CALL(ANeuralNetworksModel_addOperand(mModel, &(type->operandType))) !=
|
/packages/modules/NeuralNetworks/runtime/test/ |
D | TestOperandExtraParams.cpp | 119 ANeuralNetworksOperandType operandType = createOperand(dataType); in testAddingWithSymmPerChannelQuantParams() local 120 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in testAddingWithSymmPerChannelQuantParams() 242 ANeuralNetworksOperandType operandType = createOperand(dataType); in TEST_F() local 243 operandType.scale = 1.0f; in TEST_F() 244 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_BAD_DATA); in TEST_F() 250 ANeuralNetworksOperandType operandType = createOperand(dataType); in TEST_F() local 251 operandType.zeroPoint = 1; in TEST_F() 252 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_BAD_DATA); in TEST_F()
|
D | TestValidateOperations.cpp | 74 OperandTypeWithExtraParams(const ANeuralNetworksOperandType& operandType) in OperandTypeWithExtraParams() 75 : operandType(operandType), channelQuant(std::nullopt), valueModel(std::nullopt) {} in OperandTypeWithExtraParams() 77 ANeuralNetworksOperandType operandType; member 82 if (operandType.type != that.operandType.type || in operator ==() 83 operandType.scale != that.operandType.scale || in operator ==() 84 operandType.zeroPoint != that.operandType.zeroPoint || in operator ==() 85 operandType.dimensionCount != that.operandType.dimensionCount) { in operator ==() 100 if (operandType.dimensions) { in operator ==() 101 if (!that.operandType.dimensions) { in operator ==() 104 if (!std::equal(operandType.dimensions, in operator ==() [all …]
|
D | TestUnknownDimensions.cpp | 264 return &matrixTypeBothOther.operandType; in TestOne() 267 return &matrixTypeFirstOther.operandType; in TestOne() 270 return &matrixTypeSecondOther.operandType; in TestOne() 273 return &matrixTypeIntended.operandType; in TestOne() 278 return &matrixTypeIntended.operandType; in TestOne()
|
D | TestPartitioning.cpp | 2143 auto TestType = [](V1_3::OperandType operandType) { in TEST_F() argument 2144 if (operandType == V1_3::OperandType::SUBGRAPH) { in TEST_F() 2148 SCOPED_TRACE(toString(operandType)); in TEST_F() 2153 uint32_t opndIn = model.addOperand(static_cast<WrapperType>(operandType)); in TEST_F() 2164 update(&goodCapabilities, operandType, 0.25); in TEST_F() 2185 update(&badCapabilities, operandType, 0.75); in TEST_F() 2439 e.setInput(0, &padTensorValue, &padTensorValueType.operandType); in executeCompilationAndCompareOutput() 2443 e.setInput(1, &paddings, &paddingsType.operandType); in executeCompilationAndCompareOutput() 2454 e.setOutput(index, buffer, elts * sizeof(float), &outputType.operandType); in executeCompilationAndCompareOutput() 3092 V1_3::OperandType operandType = static_cast<V1_3::OperandType>(type); in TEST_F() local [all …]
|
D | TestValidation.cpp | 74 ANeuralNetworksOperandType operandType = { in addScalarOperand() local 76 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in addScalarOperand() 80 uint32_t addOperand(const ANeuralNetworksOperandType& operandType) { in addOperand() argument 81 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in addOperand() 90 ANeuralNetworksOperandType operandType = { in addTensorOperand() local 95 return addOperand(operandType); in addTensorOperand() 329 ANeuralNetworksOperandType operandType = { in addScalarOperand() local 331 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &operandType), ANEURALNETWORKS_NO_ERROR); in addScalarOperand() 336 ANeuralNetworksOperandType operandType = { in addTensorOperand() local 341 EXPECT_EQ(ANeuralNetworksModel_addOperand(model, &operandType), ANEURALNETWORKS_NO_ERROR); in addTensorOperand() [all …]
|
D | TestNeuralNetworksWrapper.h | 152 if (ANeuralNetworksModel_addOperand(mModel, &(type->operandType)) != in addOperand() 177 OperandType operandType(Type::MODEL, {}); in addModelOperand() 178 uint32_t operand = addOperand(&operandType); in addModelOperand()
|
/packages/modules/NeuralNetworks/common/cpu_operations/ |
D | Cast.cpp | 46 #define ANDROID_NN_COPY_CAST(operandType, dataType) \ in copyToTensor() argument 47 case operandType: { \ in copyToTensor() 77 #define ANDROID_NN_COPY_TO_TENSOR(operandType, dataType) \ in eval() argument 78 case operandType: { \ in eval()
|
D | ArgMinMax.cpp | 58 #define NNAPI_IMPL_ARG_MIN_MAX(operandType, dataType) \ in argMinMaxGeneric() argument 59 if (inputShape.type == operandType) { \ in argMinMaxGeneric()
|
D | Tile.cpp | 93 #define ANDROID_NN_IMPL_TILE(operandType, dataType) \ in eval() argument 94 case operandType: { \ in eval()
|
D | MirrorPad.cpp | 219 #define MIRROR_PAD_CASE(operandType, dataType) \ in eval() argument 220 case OperandType::operandType: { \ in eval()
|
/packages/modules/NeuralNetworks/common/types/src/ |
D | TypeUtils.cpp | 120 bool isNonExtensionScalar(OperandType operandType) { in isNonExtensionScalar() argument 121 CHECK(!isExtension(operandType)); in isNonExtensionScalar() 122 switch (operandType) { in isNonExtensionScalar() 147 size_t getNonExtensionSize(OperandType operandType) { in getNonExtensionSize() argument 148 CHECK(!isExtension(operandType)); in getNonExtensionSize() 149 switch (operandType) { in getNonExtensionSize() 176 std::optional<size_t> getNonExtensionSize(OperandType operandType, const Dimensions& dimensions) { in getNonExtensionSize() argument 177 CHECK(!isExtension(operandType)) << "Size of extension operand data is unknown"; in getNonExtensionSize() 178 size_t size = getNonExtensionSize(operandType); in getNonExtensionSize() 179 if (isNonExtensionScalar(operandType)) { in getNonExtensionSize() [all …]
|
D | Types.cpp | 102 OperandType operandType) const { in lookup() 105 const auto it = std::lower_bound(mSorted.begin(), mSorted.end(), operandType, cmp); in lookup() 108 if (it != mSorted.end() && it->type == operandType) { in lookup()
|
/packages/modules/NeuralNetworks/common/ |
D | LegacyHalUtils.cpp | 1069 static bool compliantWithV1_0(const V1_2::OperandType& operandType) { in compliantWithV1_0() argument 1070 return validOperandType(static_cast<V1_0::OperandType>(operandType)); in compliantWithV1_0() 1073 static bool compliantWithV1_0(const V1_3::OperandType& operandType) { in compliantWithV1_0() argument 1074 return validOperandType(static_cast<V1_0::OperandType>(operandType)); in compliantWithV1_0() 1077 static bool compliantWithV1_2(const V1_3::OperandType& operandType) { in compliantWithV1_2() argument 1078 return validOperandType(static_cast<V1_2::OperandType>(operandType)); in compliantWithV1_2() 1081 V1_0::OperandType convertToV1_0(const V1_2::OperandType& operandType) { in convertToV1_0() argument 1082 if (!compliantWithV1_0(operandType)) { in convertToV1_0() 1083 LOG(ERROR) << "Upcasting non-compliant operand type " << toString(operandType) in convertToV1_0() 1086 return static_cast<V1_0::OperandType>(operandType); in convertToV1_0() [all …]
|
D | ValidateHal.cpp | 960 bool validOperandType(V1_0::OperandType operandType) { in validOperandType() argument 961 switch (operandType) { in validOperandType() 976 bool validOperandType(V1_2::OperandType operandType) { in validOperandType() argument 977 switch (operandType) { in validOperandType() 996 return isExtensionOperandType(static_cast<V1_3::OperandType>(operandType)); in validOperandType() 1000 bool validOperandType(V1_3::OperandType operandType) { in validOperandType() argument 1001 switch (operandType) { in validOperandType() 1022 return isExtensionOperandType(operandType); in validOperandType()
|
/packages/modules/NeuralNetworks/runtime/test/android_fuzzing/ |
D | FuzzHarness.cpp | 40 const auto operandType = static_cast<OperandType>(operand.type); in operandOverflows() local 41 return !getNonExtensionSize(operandType, operand.dimensions).has_value(); in operandOverflows()
|
/packages/modules/NeuralNetworks/shim_and_sl/ |
D | ShimDevice.cpp | 125 .type = static_cast<OperandType>(info.operandType), in getCapabilities() 384 auto operandType = static_cast<::android::nn::OperandType>(op.operandType.type); in allocate() local 386 type = operandType; in allocate() 421 auto operandType = static_cast<::android::nn::OperandType>(op.operandType.type); in allocate() local 423 type = operandType; in allocate()
|
D | ShimPreparedModel.cpp | 96 ::android::nn::wrapper::OperandType operandType = model.getOperands()[model.getInputs()[i]]; in parseInputs() 99 operandType.updateDimensions(::android::nn::toUnsigned(input.dimensions).value()); in parseInputs() 103 input.location.offset, input.location.length, &operandType.operandType); in parseInputs() 121 ::android::nn::wrapper::OperandType operandType = in parseInputs() 126 operandType.updateDimensions(::android::nn::toUnsigned(output.dimensions).value()); in parseInputs() 130 output.location.offset, output.location.length, &operandType.operandType); in parseInputs()
|
D | ShimConverter.cpp | 82 ::android::nn::wrapper::OperandType operandType( in convertSubgraphFromHAL() 88 operandType.channelQuant = ::android::nn::wrapper::SymmPerChannelQuantParams( in convertSubgraphFromHAL() 105 &operandType.operandType.type); in convertSubgraphFromHAL() 113 uint32_t operandIndex = resultModel.addOperand(&operandType); in convertSubgraphFromHAL()
|
/packages/modules/NeuralNetworks/runtime/ |
D | ModelBuilder.cpp | 83 OperandType operandType = static_cast<OperandType>(type.type); in addOperand() local 84 if (isExtension(operandType) && !TypeManager::get()->areExtensionsAllowed()) { in addOperand() 89 operandType == OperandType::OEM || operandType == OperandType::TENSOR_OEM_BYTE; in addOperand() 95 if (isExtension(operandType) && in addOperand() 96 !TypeManager::get()->getExtensionOperandTypeInfo(operandType, &info)) { in addOperand() 97 LOG(ERROR) << "Extension operand type " << operandType << " is not registered"; in addOperand() 102 .type = operandType, in addOperand() 124 mHasControlFlow |= (operandType == OperandType::SUBGRAPH); in addOperand()
|
D | TypeManager.cpp | 257 uint32_t operandType = static_cast<uint32_t>(type); in getExtensionOperandTypeInfo() local 258 uint16_t prefix = operandType >> kExtensionTypeBits; in getExtensionOperandTypeInfo() 259 uint16_t typeWithinExtension = operandType & ((1 << kExtensionTypeBits) - 1); in getExtensionOperandTypeInfo()
|
/packages/modules/NeuralNetworks/common/types/include/nnapi/ |
D | TypeUtils.h | 39 bool isNonExtensionScalar(OperandType operandType); 41 size_t getNonExtensionSize(OperandType operandType); 51 std::optional<size_t> getNonExtensionSize(OperandType operandType, const Dimensions& dimensions); 93 std::ostream& operator<<(std::ostream& os, const OperandType& operandType);
|
/packages/modules/NeuralNetworks/shim_and_sl/include/ |
D | SupportLibraryWrapper.h | 199 if (mNnApi->getFL5()->ANeuralNetworksModel_addOperand(mModel, &type->operandType) != in addOperand() 228 OperandType operandType(Type::MODEL, {}); in addModelOperand() 229 uint32_t operand = addOperand(&operandType); in addModelOperand()
|
/packages/modules/NeuralNetworks/extensions/ |
D | README.md | 123 ANeuralNetworksOperandType operandType{ 128 CHECK_EQ(ANeuralNetworksModel_addOperand(model, &operandType), ANEURALNETWORKS_NO_ERROR);
|