/packages/modules/NeuralNetworks/common/include/ |
D | LegacyHalUtils.h | 137 inline uint32_t nonExtensionOperandSizeOfData(const V1_3::Operand& operand) { 161 bool tensorHasUnspecifiedDimensions(const V1_3::Operand& operand); 170 const V1_3::Operand& halOperand, 281 V1_0::Operand convertToV1_0(const V1_2::Operand& operand); 282 V1_0::Operand convertToV1_0(const V1_3::Operand& operand); 283 V1_2::Operand convertToV1_2(const V1_0::Operand& operand); 284 V1_2::Operand convertToV1_2(const V1_3::Operand& operand); 285 V1_3::Operand convertToV1_3(const V1_0::Operand& operand); 286 V1_3::Operand convertToV1_3(const V1_2::Operand& operand); 287 V1_3::Operand convertToV1_3(const V1_3::Operand& operand); [all …]
|
D | LegacyUtils.h | 153 inline uint32_t nonExtensionOperandSizeOfData(const Operand& operand) { in nonExtensionOperandSizeOfData() 222 std::function<bool(const Operand&)> isValidSubgraphReference; 224 std::function<uint32_t(const Operand&)> getSubgraphInputCount; 226 std::function<uint32_t(const Operand&)> getSubgraphOutputCount; 228 std::function<const Operand*(const Operand&, uint32_t)> getSubgraphInputOperand; 230 std::function<const Operand*(const Operand&, uint32_t)> getSubgraphOutputOperand; 241 const uint32_t* outputIndexes, const std::vector<Operand>& operands,
|
/packages/modules/NeuralNetworks/common/types/src/ |
D | Validation.cpp | 173 Result<Version> validateOperandLifeTime(const Operand& operand) { in validateOperandLifeTime() 176 (operand.lifetime == Operand::LifeTime::SUBGRAPH)) in validateOperandLifeTime() 180 case Operand::LifeTime::TEMPORARY_VARIABLE: in validateOperandLifeTime() 181 case Operand::LifeTime::SUBGRAPH_INPUT: in validateOperandLifeTime() 182 case Operand::LifeTime::SUBGRAPH_OUTPUT: in validateOperandLifeTime() 183 case Operand::LifeTime::CONSTANT_COPY: in validateOperandLifeTime() 184 case Operand::LifeTime::CONSTANT_REFERENCE: in validateOperandLifeTime() 185 case Operand::LifeTime::NO_VALUE: in validateOperandLifeTime() 186 case Operand::LifeTime::POINTER: in validateOperandLifeTime() 188 case Operand::LifeTime::SUBGRAPH: in validateOperandLifeTime() [all …]
|
D | TypeUtils.cpp | 193 std::optional<size_t> getNonExtensionSize(const Operand& operand) { in getNonExtensionSize() 205 bool tensorHasUnspecifiedDimensions(const Operand& operand) { in tensorHasUnspecifiedDimensions() 404 std::ostream& operator<<(std::ostream& os, const Operand::LifeTime& lifetime) { in operator <<() 406 case Operand::LifeTime::TEMPORARY_VARIABLE: in operator <<() 408 case Operand::LifeTime::SUBGRAPH_INPUT: in operator <<() 410 case Operand::LifeTime::SUBGRAPH_OUTPUT: in operator <<() 412 case Operand::LifeTime::CONSTANT_COPY: in operator <<() 414 case Operand::LifeTime::CONSTANT_REFERENCE: in operator <<() 416 case Operand::LifeTime::NO_VALUE: in operator <<() 418 case Operand::LifeTime::SUBGRAPH: in operator <<() [all …]
|
D | SharedMemory.cpp | 35 bool hasNoPointerData(const Operand& operand); 49 bool hasNoPointerData(const Operand& operand) { in hasNoPointerData() 61 void copyPointersToSharedMemory(Operand* operand, ConstantMemoryBuilder* memoryBuilder) { in copyPointersToSharedMemory() 65 if (operand->lifetime != Operand::LifeTime::POINTER) { in copyPointersToSharedMemory() 72 operand->lifetime = Operand::LifeTime::CONSTANT_REFERENCE; in copyPointersToSharedMemory()
|
/packages/modules/NeuralNetworks/common/ |
D | MetaModel.cpp | 140 OrigOperandToSlicedInputOperandIndex(std::vector<Operand>* slicedOperands, in OrigOperandToSlicedInputOperandIndex() 153 uint32_t getIndex(Operand operand) { in getIndex() 154 CHECK(operand.lifetime == Operand::LifeTime::SUBGRAPH_INPUT || in getIndex() 155 operand.lifetime == Operand::LifeTime::SUBGRAPH_OUTPUT || in getIndex() 156 operand.lifetime == Operand::LifeTime::TEMPORARY_VARIABLE); in getIndex() 167 operand.lifetime = Operand::LifeTime::SUBGRAPH_INPUT; in getIndex() 191 bool operator()(const Operand& a, const Operand& b) const { in operator ()() 208 static bool compare(const Operand::SymmPerChannelQuantParams& a, in compare() 209 const Operand::SymmPerChannelQuantParams& b) { in compare() 215 static bool compare(const Operand::ExtraParams& a, const Operand::ExtraParams& b) { in compare() [all …]
|
D | GraphDump.cpp | 128 void tryValueDump(Dumper& dump, const Model& model, const Operand& opnd) { in tryValueDump() 134 if (opnd.lifetime == Operand::LifeTime::CONSTANT_COPY) { in tryValueDump() 136 } else if (opnd.lifetime == Operand::LifeTime::POINTER) { in tryValueDump() 185 const Operand& opnd = model.main.operands[i]; in graphDump() 189 case Operand::LifeTime::CONSTANT_COPY: in graphDump() 192 case Operand::LifeTime::CONSTANT_REFERENCE: in graphDump() 195 case Operand::LifeTime::SUBGRAPH_INPUT: in graphDump() 198 case Operand::LifeTime::SUBGRAPH_OUTPUT: in graphDump() 201 case Operand::LifeTime::NO_VALUE: in graphDump() 204 case Operand::LifeTime::SUBGRAPH: in graphDump() [all …]
|
D | ModelUtils.cpp | 101 void identifyUsedSubgraphs(const std::vector<Operand>& operands, in identifyUsedSubgraphs() 104 if (operand.lifetime == Operand::LifeTime::SUBGRAPH) { in identifyUsedSubgraphs() 147 if (operand.lifetime == Operand::LifeTime::CONSTANT_REFERENCE) { in identifyUsedPools() 168 void fixOperandDataLocation(Operand* operand, Model::OperandValues* newOperandValues, in fixOperandDataLocation() 176 case Operand::LifeTime::CONSTANT_COPY: { in fixOperandDataLocation() 182 case Operand::LifeTime::CONSTANT_REFERENCE: in fixOperandDataLocation() 185 case Operand::LifeTime::SUBGRAPH: { in fixOperandDataLocation() 190 case Operand::LifeTime::TEMPORARY_VARIABLE: in fixOperandDataLocation() 191 case Operand::LifeTime::SUBGRAPH_INPUT: in fixOperandDataLocation() 192 case Operand::LifeTime::SUBGRAPH_OUTPUT: in fixOperandDataLocation() [all …]
|
D | LegacyHalUtils.cpp | 119 bool tensorHasUnspecifiedDimensions(const V1_3::Operand& operand) { in tensorHasUnspecifiedDimensions() 176 const V1_3::Operand& halOperand, in validateOperandSymmPerChannelQuantParams() 207 const std::vector<Operand>& operands, HalVersion halVersion) { in validateOperation() 748 bool compliantWithV1_0(const V1_3::Operand& operand) { in compliantWithV1_0() 755 bool compliantWithV1_2(const V1_3::Operand& operand) { in compliantWithV1_2() 760 bool compliantWithV1_3(const V1_3::Operand& /*operand*/) { in compliantWithV1_3() argument 764 bool compliantWithAidl(const V1_3::Operand& operand) { in compliantWithAidl() 773 V1_2::Operand::ExtraParams::hidl_discriminator::channelQuant && in compliantWithAidl() 797 [&isPoolCompliant, version](const V1_3::Operand& op) { in compliantWith() 1145 V1_0::Operand convertToV1_0(const V1_2::Operand& operand) { in convertToV1_0() [all …]
|
D | ValidateHal.cpp | 100 static bool validateOperandExtraParams(const V1_3::Operand& operand, uint32_t index) { in validateOperandExtraParams() 117 V1_2::Operand::ExtraParams::hidl_discriminator::none) in validateOperandExtraParams() 124 V1_2::Operand::ExtraParams::hidl_discriminator::channelQuant) in validateOperandExtraParams() 154 V1_2::Operand::ExtraParams::hidl_discriminator::extension || in validateOperandExtraParams() 156 V1_2::Operand::ExtraParams::hidl_discriminator::none) in validateOperandExtraParams() 183 V1_3::Operand operand = convertToV1_3(versionedOperand); in validateOperands() 452 const hardware::hidl_vec<V1_3::Operand>& operands, in validateOperations() 456 auto isValidSubgraphReference = [&canonicalSubgraphs](const Operand& modelOperand) -> bool { in validateOperations() 464 [&canonicalSubgraphs](const Operand& modelOperand) -> const Model::Subgraph* { in validateOperations() 468 auto getInputCount = [&getSubgraph](const Operand& modelOperand) -> uint32_t { in validateOperations() [all …]
|
D | LegacyUtils.cpp | 160 const uint32_t* outputIndexes, const Operand* operands) in OperationValidationContext() 173 const Operand::ExtraParams& getInputExtraParams(uint32_t index) const override; 180 const Operand* getInputOperand(uint32_t index) const; 181 const Operand* getOutputOperand(uint32_t index) const; 188 const Operand* operands; 195 const Operand* OperationValidationContext::getInputOperand(uint32_t index) const { in getInputOperand() 200 const Operand* OperationValidationContext::getOutputOperand(uint32_t index) const { in getOutputOperand() 218 const Operand* operand = getInputOperand(index); in getInputShape() 223 const Operand::ExtraParams& OperationValidationContext::getInputExtraParams(uint32_t index) const { in getInputExtraParams() 232 const Operand* operand = getOutputOperand(index); in getOutputShape() [all …]
|
D | CpuExecutor.cpp | 76 const Operand::ExtraParams& getInputExtraParams(uint32_t index) const override; 134 const Operand::ExtraParams& OperationExecutionContext::getInputExtraParams(uint32_t index) const { in getInputExtraParams() 171 if (info->lifetime == Operand::LifeTime::SUBGRAPH_OUTPUT) { in setInfoAndAllocateIfNeeded() 216 if (info->buffer == nullptr && (info->lifetime == Operand::LifeTime::TEMPORARY_VARIABLE || in setInfoAndAllocateIfNeeded() 217 info->lifetime == Operand::LifeTime::SUBGRAPH_OUTPUT)) { in setInfoAndAllocateIfNeeded() 249 return getInputInfo(index)->lifetime == Operand::LifeTime::NO_VALUE; in isOmittedInput() 253 return getOutputInfo(index)->lifetime == Operand::LifeTime::NO_VALUE; in isOmittedOutput() 441 to.lifetime = Operand::LifeTime::TEMPORARY_VARIABLE; in convertToNhwc() 548 if (info.lifetime == Operand::LifeTime::TEMPORARY_VARIABLE && info.numberOfUsesLeft == 0 && in freeUnusedSubgraphOperands() 617 const Operand& from = subgraph.operands[i]; in initializeRunTimeInfo() [all …]
|
/packages/modules/NeuralNetworks/runtime/test/specs/V1_3/ |
D | cast_identity.mod.py | 19 Operand = collections.namedtuple( variable 26 Operand( 33 Operand( 40 Operand( 47 Operand( 52 Operand( 59 Operand( 64 Operand( 69 Operand(
|
/packages/modules/NeuralNetworks/runtime/test/specs/V1_2/ |
D | cast.mod.py | 20 Operand = collections.namedtuple( variable 24 Operand( 30 Operand( 36 Operand( 42 Operand( 67 Operand( 73 Operand( 79 Operand(
|
/packages/modules/NeuralNetworks/runtime/ |
D | ModelBuilder.cpp | 101 Operand operand = { in addOperand() 106 .lifetime = Operand::LifeTime::TEMPORARY_VARIABLE, in addOperand() 139 Operand& operand = mOperands[index]; in setOperandValue() 142 operand.lifetime = Operand::LifeTime::NO_VALUE; in setOperandValue() 170 operand.lifetime = Operand::LifeTime::CONSTANT_COPY; in setOperandValue() 177 operand.lifetime = Operand::LifeTime::CONSTANT_REFERENCE; in setOperandValue() 210 Operand& operand = mOperands[index]; in setOperandValueFromModel() 211 operand.lifetime = Operand::LifeTime::SUBGRAPH; in setOperandValueFromModel() 234 Operand& operand = mOperands[index]; in setOperandSymmPerChannelQuantParams() 238 Operand::SymmPerChannelQuantParams extraParams = { in setOperandSymmPerChannelQuantParams() [all …]
|
D | FlatbufferModelBuilderUtils.h | 121 inline bool tensorOperandHasUnspecifiedRank(const Operand& operand) { in tensorOperandHasUnspecifiedRank() 125 inline Result<void> checkAllTensorOperandsHaveSpecifiedRank(const std::vector<Operand>& operands) { in checkAllTensorOperandsHaveSpecifiedRank() 131 inline bool subgraphOutputOperandHasDynamicShape(const Operand& operand) { in subgraphOutputOperandHasDynamicShape() 132 return operand.lifetime == Operand::LifeTime::SUBGRAPH_OUTPUT && in subgraphOutputOperandHasDynamicShape() 138 const std::vector<Operand>& operands) { in checkNoSubgraphOutputOperandsHaveDynamicShape() 145 inline bool isOperandConstant(const Operand& operand) { in isOperandConstant() 146 return operand.lifetime == Operand::LifeTime::CONSTANT_COPY || in isOperandConstant() 147 operand.lifetime == Operand::LifeTime::CONSTANT_REFERENCE; in isOperandConstant()
|
D | ExecutionPlan.cpp | 140 const Operand& fromOperand) { in copyOperandExtraParams() 142 std::holds_alternative<Operand::SymmPerChannelQuantParams>(fromOperand.extraParams)) { in copyOperandExtraParams() 144 std::get<Operand::SymmPerChannelQuantParams>(fromOperand.extraParams); in copyOperandExtraParams() 152 std::holds_alternative<Operand::ExtensionParams>(fromOperand.extraParams)) { in copyOperandExtraParams() 153 auto extensionData = std::get<Operand::ExtensionParams>(fromOperand.extraParams); in copyOperandExtraParams() 156 } else if (!std::holds_alternative<Operand::NoParams>(fromOperand.extraParams) || in copyOperandExtraParams() 193 if (lifetime == Operand::LifeTime::TEMPORARY_VARIABLE || in OperandTracker() 194 lifetime == Operand::LifeTime::SUBGRAPH_OUTPUT) { in OperandTracker() 471 const Operand& operand = sourceModel.getOperand(sourceOperandIndex); in addOperand() 494 case Operand::LifeTime::CONSTANT_COPY: { in addOperand() [all …]
|
D | ModelBuilder.h | 94 const Operand& getInputOperand(uint32_t i) const { in getInputOperand() 104 const Operand& getOutputOperand(uint32_t i) const { in getOutputOperand() 109 const Operand& getOperand(uint32_t index) const { return mOperands[index]; } in getOperand() 126 const ModelBuilder* getReferencedModel(const Operand& operand) const { in getReferencedModel() 127 CHECK(operand.lifetime == Operand::LifeTime::SUBGRAPH); in getReferencedModel() 204 std::vector<Operand> mOperands;
|
D | ModelArgumentInfo.h | 41 const Operand& operand, const ANeuralNetworksOperandType* type, 45 const Operand& operand, const ANeuralNetworksOperandType* type, uint32_t poolIndex, 111 int updateDimensionInfo(const Operand& operand, const ANeuralNetworksOperandType* newType);
|
/packages/modules/NeuralNetworks/runtime/operation_converters/ |
D | Conv2DOperationConverter.cpp | 55 const Operand& inputOperand = subgraph->operands[operation.inputs[0]]; in decomposeExplicitPadding() 64 const Operand& frontWidthPaddingOperand = subgraph->operands[operation.inputs[3]]; in decomposeExplicitPadding() 65 const Operand& backWidthPaddingOperand = subgraph->operands[operation.inputs[4]]; in decomposeExplicitPadding() 66 const Operand& frontHeightPaddingOperand = subgraph->operands[operation.inputs[5]]; in decomposeExplicitPadding() 67 const Operand& backHeightPaddingOperand = subgraph->operands[operation.inputs[6]]; in decomposeExplicitPadding() 171 const Operand& paddingTypeOperand = subgraph->operands[operation.inputs[3]]; in convert() 182 const Operand& strideWOperand = in convert() 184 const Operand& strideHOperand = in convert() 186 const Operand& activationOperand = in convert() 201 const Operand& isNchwOperand = subgraph->operands[operation.inputs[isNchwIdx]]; in convert() [all …]
|
D | DepthwiseConv2DOperationConverter.cpp | 53 const Operand& paddingTypeOperand = subgraph->operands[operation.inputs[3]]; in convert() 64 const Operand& strideWOperand = in convert() 66 const Operand& strideHOperand = in convert() 68 const Operand& activationOperand = in convert() 70 const Operand& depthwiseMultiplierOperand = in convert() 87 const Operand& isNchwOperand = subgraph->operands[operation.inputs[isNchwIdx]]; in convert() 101 const Operand& dilationWOperand = subgraph->operands[operation.inputs[dilationWIdx]]; in convert() 107 const Operand& dilationHOperand = subgraph->operands[operation.inputs[dilationHIdx]]; in convert()
|
D | SubGraphContext.h | 60 void copyConstantValueToData(const Operand& operand, Type* data, size_t dataSize); 62 Type getConstantScalar(const Operand& operand); 73 std::pair<const uint8_t*, uint32_t> getConstantPointerAndLength(const Operand& operand); 93 void SubGraphContext::copyConstantValueToData(const Operand& operand, Type* data, size_t dataSize) { in copyConstantValueToData() 101 Type SubGraphContext::getConstantScalar(const Operand& operand) { in getConstantScalar()
|
/packages/modules/NeuralNetworks/common/types/include/nnapi/ |
D | TypeUtils.h | 52 std::optional<size_t> getNonExtensionSize(const Operand& operand); 55 bool tensorHasUnspecifiedDimensions(const Operand& operand); 94 std::ostream& operator<<(std::ostream& os, const Operand::LifeTime& lifetime); 113 const Operand::SymmPerChannelQuantParams& symmPerChannelQuantParams); 114 std::ostream& operator<<(std::ostream& os, const Operand::ExtraParams& extraParams); 115 std::ostream& operator<<(std::ostream& os, const Operand& operand); 156 bool operator==(const Operand::SymmPerChannelQuantParams& a, 157 const Operand::SymmPerChannelQuantParams& b); 158 bool operator!=(const Operand::SymmPerChannelQuantParams& a, 159 const Operand::SymmPerChannelQuantParams& b); [all …]
|
D | Validation.h | 97 std::set<PreparedModelRole>* preparedModelRoles, Operand* combinedOperand); 100 const Operand& operand, const Operand::SymmPerChannelQuantParams& channelQuant, 108 Result<void> validateOperandType(const Operand& type, 119 const std::vector<Operand>& operands, 140 const Operation& operation, const std::vector<Operand>& operands, size_t operandValuesSize, 143 Result<Version> validateOperandAndAnythingItDependsOn(const Operand& operand,
|
/packages/modules/NeuralNetworks/tools/test_generator/test_harness/ |
D | TestUtils.cpp | 44 Result<Operand> createOperand(const TestOperand& operand, Model::OperandValues* operandValues, in createOperand() 50 Operand::LifeTime lifetime = static_cast<Operand::LifeTime>(operand.lifetime); in createOperand() 63 lifetime = Operand::LifeTime::NO_VALUE; in createOperand() 78 Operand::ExtraParams extraParams; in createOperand() 81 Operand::SymmPerChannelQuantParams{.scales = operand.channelQuant.scales, in createOperand() 85 return Operand{ in createOperand() 100 std::vector<Operand> operands; in createSubgraph()
|