Home
last modified time | relevance | path

Searched refs:Operand (Results 1 – 25 of 81) sorted by relevance

1234

/packages/modules/NeuralNetworks/common/include/
DLegacyHalUtils.h137 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 …]
DLegacyUtils.h152 inline uint32_t nonExtensionOperandSizeOfData(const Operand& operand) { in nonExtensionOperandSizeOfData()
193 bool tensorHasUnspecifiedDimensions(const Operand& operand);
243 std::function<bool(const Operand&)> isValidSubgraphReference;
245 std::function<uint32_t(const Operand&)> getSubgraphInputCount;
247 std::function<uint32_t(const Operand&)> getSubgraphOutputCount;
249 std::function<const Operand*(const Operand&, uint32_t)> getSubgraphInputOperand;
251 std::function<const Operand*(const Operand&, uint32_t)> getSubgraphOutputOperand;
262 const uint32_t* outputIndexes, const std::vector<Operand>& operands,
DCpuExecutor.h67 Operand::LifeTime lifetime;
74 Operand::ExtraParams extraParams;
262 return input->lifetime == Operand::LifeTime::NO_VALUE; in IsNullInput()
/packages/modules/NeuralNetworks/common/
DMetaModel.cpp139 OrigOperandToSlicedInputOperandIndex(std::vector<Operand>* slicedOperands, in OrigOperandToSlicedInputOperandIndex()
152 uint32_t getIndex(Operand operand) { in getIndex()
153 CHECK(operand.lifetime == Operand::LifeTime::SUBGRAPH_INPUT || in getIndex()
154 operand.lifetime == Operand::LifeTime::SUBGRAPH_OUTPUT || in getIndex()
155 operand.lifetime == Operand::LifeTime::TEMPORARY_VARIABLE); in getIndex()
166 operand.lifetime = Operand::LifeTime::SUBGRAPH_INPUT; in getIndex()
190 bool operator()(const Operand& a, const Operand& b) const { in operator ()()
207 static bool compare(const Operand::SymmPerChannelQuantParams& a, in compare()
208 const Operand::SymmPerChannelQuantParams& b) { in compare()
214 static bool compare(const Operand::ExtraParams& a, const Operand::ExtraParams& b) { in compare()
[all …]
DValidation.cpp204 Result<Version> validateOperandLifeTime(const Operand& operand) { in validateOperandLifeTime()
207 (operand.lifetime == Operand::LifeTime::SUBGRAPH)) in validateOperandLifeTime()
211 case Operand::LifeTime::TEMPORARY_VARIABLE: in validateOperandLifeTime()
212 case Operand::LifeTime::SUBGRAPH_INPUT: in validateOperandLifeTime()
213 case Operand::LifeTime::SUBGRAPH_OUTPUT: in validateOperandLifeTime()
214 case Operand::LifeTime::CONSTANT_COPY: in validateOperandLifeTime()
215 case Operand::LifeTime::CONSTANT_REFERENCE: in validateOperandLifeTime()
216 case Operand::LifeTime::NO_VALUE: in validateOperandLifeTime()
217 case Operand::LifeTime::POINTER: in validateOperandLifeTime()
219 case Operand::LifeTime::SUBGRAPH: in validateOperandLifeTime()
[all …]
DLegacyHalUtils.cpp118 bool tensorHasUnspecifiedDimensions(const V1_3::Operand& operand) { in tensorHasUnspecifiedDimensions()
175 const V1_3::Operand& halOperand, in validateOperandSymmPerChannelQuantParams()
206 const std::vector<Operand>& operands, HalVersion halVersion) { in validateOperation()
747 bool compliantWithV1_0(const V1_3::Operand& operand) { in compliantWithV1_0()
754 bool compliantWithV1_2(const V1_3::Operand& operand) { in compliantWithV1_2()
759 bool compliantWithV1_3(const V1_3::Operand& /*operand*/) { in compliantWithV1_3() argument
763 bool compliantWithAidl(const V1_3::Operand& operand) { in compliantWithAidl()
772 V1_2::Operand::ExtraParams::hidl_discriminator::channelQuant && in compliantWithAidl()
796 [&isPoolCompliant, version](const V1_3::Operand& op) { in compliantWith()
1142 V1_0::Operand convertToV1_0(const V1_2::Operand& operand) { in convertToV1_0()
[all …]
DGraphDump.cpp128 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 …]
DTypeUtils.cpp145 std::optional<size_t> getNonExtensionSize(const Operand& operand) { in getNonExtensionSize()
328 std::ostream& operator<<(std::ostream& os, const Operand::LifeTime& lifetime) { in operator <<()
330 case Operand::LifeTime::TEMPORARY_VARIABLE: in operator <<()
332 case Operand::LifeTime::SUBGRAPH_INPUT: in operator <<()
334 case Operand::LifeTime::SUBGRAPH_OUTPUT: in operator <<()
336 case Operand::LifeTime::CONSTANT_COPY: in operator <<()
338 case Operand::LifeTime::CONSTANT_REFERENCE: in operator <<()
340 case Operand::LifeTime::NO_VALUE: in operator <<()
342 case Operand::LifeTime::SUBGRAPH: in operator <<()
344 case Operand::LifeTime::POINTER: in operator <<()
[all …]
DValidateHal.cpp99 static bool validateOperandExtraParams(const V1_3::Operand& operand, uint32_t index) { in validateOperandExtraParams()
116 V1_2::Operand::ExtraParams::hidl_discriminator::none) in validateOperandExtraParams()
123 V1_2::Operand::ExtraParams::hidl_discriminator::channelQuant) in validateOperandExtraParams()
153 V1_2::Operand::ExtraParams::hidl_discriminator::extension || in validateOperandExtraParams()
155 V1_2::Operand::ExtraParams::hidl_discriminator::none) in validateOperandExtraParams()
182 V1_3::Operand operand = convertToV1_3(versionedOperand); in validateOperands()
451 const hardware::hidl_vec<V1_3::Operand>& operands, in validateOperations()
455 auto isValidSubgraphReference = [&canonicalSubgraphs](const Operand& modelOperand) -> bool { in validateOperations()
463 [&canonicalSubgraphs](const Operand& modelOperand) -> const Model::Subgraph* { in validateOperations()
467 auto getInputCount = [&getSubgraph](const Operand& modelOperand) -> uint32_t { in validateOperations()
[all …]
DLegacyUtils.cpp183 const uint32_t* outputIndexes, const Operand* operands) in OperationValidationContext()
196 const Operand::ExtraParams& getInputExtraParams(uint32_t index) const override;
203 const Operand* getInputOperand(uint32_t index) const;
204 const Operand* getOutputOperand(uint32_t index) const;
211 const Operand* operands;
218 const Operand* OperationValidationContext::getInputOperand(uint32_t index) const { in getInputOperand()
223 const Operand* OperationValidationContext::getOutputOperand(uint32_t index) const { in getOutputOperand()
241 const Operand* operand = getInputOperand(index); in getInputShape()
246 const Operand::ExtraParams& OperationValidationContext::getInputExtraParams(uint32_t index) const { in getInputExtraParams()
255 const Operand* operand = getOutputOperand(index); in getOutputShape()
[all …]
DCpuExecutor.cpp76 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/
DModelBuilder.cpp97 Operand operand = { in addOperand()
102 .lifetime = Operand::LifeTime::TEMPORARY_VARIABLE, in addOperand()
134 Operand& operand = mOperands[index]; in setOperandValue()
137 operand.lifetime = Operand::LifeTime::NO_VALUE; in setOperandValue()
165 operand.lifetime = Operand::LifeTime::CONSTANT_COPY; in setOperandValue()
172 operand.lifetime = Operand::LifeTime::CONSTANT_REFERENCE; in setOperandValue()
205 Operand& operand = mOperands[index]; in setOperandValueFromModel()
206 operand.lifetime = Operand::LifeTime::SUBGRAPH; in setOperandValueFromModel()
229 Operand& operand = mOperands[index]; in setOperandSymmPerChannelQuantParams()
233 Operand::SymmPerChannelQuantParams extraParams = { in setOperandSymmPerChannelQuantParams()
[all …]
DExecutionPlan.cpp100 const Operand& fromOperand) { in copyOperandExtraParams()
102 std::holds_alternative<Operand::SymmPerChannelQuantParams>(fromOperand.extraParams)) { in copyOperandExtraParams()
104 std::get<Operand::SymmPerChannelQuantParams>(fromOperand.extraParams); in copyOperandExtraParams()
112 std::holds_alternative<Operand::ExtensionParams>(fromOperand.extraParams)) { in copyOperandExtraParams()
113 auto extensionData = std::get<Operand::ExtensionParams>(fromOperand.extraParams); in copyOperandExtraParams()
116 } else if (!std::holds_alternative<Operand::NoParams>(fromOperand.extraParams) || in copyOperandExtraParams()
153 if (lifetime == Operand::LifeTime::TEMPORARY_VARIABLE || in OperandTracker()
154 lifetime == Operand::LifeTime::SUBGRAPH_OUTPUT) { in OperandTracker()
431 const Operand& operand = sourceModel.getOperand(sourceOperandIndex); in addOperand()
454 case Operand::LifeTime::CONSTANT_COPY: { in addOperand()
[all …]
DModelBuilder.h92 const Operand& getInputOperand(uint32_t i) const { in getInputOperand()
102 const Operand& getOutputOperand(uint32_t i) const { in getOutputOperand()
107 const Operand& getOperand(uint32_t index) const { return mOperands[index]; } in getOperand()
124 const ModelBuilder* getReferencedModel(const Operand& operand) const { in getReferencedModel()
125 CHECK(operand.lifetime == Operand::LifeTime::SUBGRAPH); in getReferencedModel()
194 std::vector<Operand> mOperands;
DModelArgumentInfo.h41 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);
DModelArgumentInfo.cpp37 const Operand& operand, const ANeuralNetworksOperandType* type, void* data, uint32_t length, in createFromPointer()
80 const Operand& operand, const ANeuralNetworksOperandType* type, uint32_t poolIndex, in createFromMemory()
113 int ModelArgumentInfo::updateDimensionInfo(const Operand& operand, in updateDimensionInfo()
/packages/modules/NeuralNetworks/runtime/test/specs/V1_3/
Dcast_identity.mod.py19 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/
Dcast.mod.py20 Operand = collections.namedtuple( variable
24 Operand(
30 Operand(
36 Operand(
42 Operand(
67 Operand(
73 Operand(
79 Operand(
/packages/modules/NeuralNetworks/common/include/nnapi/
DTypeUtils.h60 std::optional<size_t> getNonExtensionSize(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);
157 bool operator==(const Operand::SymmPerChannelQuantParams& a,
158 const Operand::SymmPerChannelQuantParams& b);
159 bool operator!=(const Operand::SymmPerChannelQuantParams& a,
160 const Operand::SymmPerChannelQuantParams& b);
161 bool operator==(const Operand& a, const Operand& b);
[all …]
DValidation.h80 std::set<PreparedModelRole>* preparedModelRoles, Operand* combinedOperand);
83 const Operand& operand, const Operand::SymmPerChannelQuantParams& channelQuant,
91 Result<void> validateOperandType(const Operand& type,
102 const std::vector<Operand>& operands,
123 const Operation& operation, const std::vector<Operand>& operands, size_t operandValuesSize,
126 Result<Version> validateOperandAndAnythingItDependsOn(const Operand& operand,
/packages/modules/NeuralNetworks/tools/test_generator/test_harness/
DTestUtils.cpp43 Operand createOperand(const TestOperand& operand, Model::OperandValues* operandValues, in createOperand()
49 const Operand::LifeTime lifetime = static_cast<Operand::LifeTime>(operand.lifetime); in createOperand()
69 Operand::ExtraParams extraParams; in createOperand()
72 Operand::SymmPerChannelQuantParams{.scales = operand.channelQuant.scales, in createOperand()
91 std::vector<Operand> operands; in createSubgraph()
/packages/modules/NeuralNetworks/runtime/test/android_fuzzing/
DGenerateCorpus.cpp44 Operand::LifeTime convert(TestOperandLifeTime lifetime) { in convert()
45 return static_cast<Operand::LifeTime>(lifetime); in convert()
86 Operand convert(const TestOperand& operand) { in convert()
87 Operand protoOperand; in convert()
/packages/modules/NeuralNetworks/tools/test_generator/tests/P_vts_variation/
Dstdout.txt.expect15 const std::vector<Operand> operands = {
162 const std::vector<Operand> operands = {
310 const std::vector<Operand> operands = {
457 const std::vector<Operand> operands = {
604 const std::vector<Operand> operands = {
752 const std::vector<Operand> operands = {
899 const std::vector<Operand> operands = {
1046 const std::vector<Operand> operands = {
1194 const std::vector<Operand> operands = {
1341 const std::vector<Operand> operands = {
[all …]
/packages/modules/NeuralNetworks/tools/test_generator/tests/P_vts_naming/
Dstdout.txt.expect15 const std::vector<Operand> operands = {
162 const std::vector<Operand> operands = {
310 const std::vector<Operand> operands = {
457 const std::vector<Operand> operands = {
604 const std::vector<Operand> operands = {
752 const std::vector<Operand> operands = {
899 const std::vector<Operand> operands = {
1046 const std::vector<Operand> operands = {
1194 const std::vector<Operand> operands = {
1341 const std::vector<Operand> operands = {
[all …]
/packages/modules/NeuralNetworks/tools/test_generator/tests/P_vts_implicit_variation/
Dstdout.txt.expect15 const std::vector<Operand> operands = {
162 const std::vector<Operand> operands = {
310 const std::vector<Operand> operands = {
457 const std::vector<Operand> operands = {
604 const std::vector<Operand> operands = {
752 const std::vector<Operand> operands = {
899 const std::vector<Operand> operands = {
1046 const std::vector<Operand> operands = {
1194 const std::vector<Operand> operands = {
1341 const std::vector<Operand> operands = {
[all …]

1234