Lines Matching refs:operands
694 const std::vector<Operand>& operands, size_t operandValuesSize, in validateOperands() argument
698 versions.reserve(operands.size()); in validateOperands()
699 for (size_t i = 0; i < operands.size(); ++i) { in validateOperands()
700 auto result = validateOperand(operands[i], operandValuesSize, poolSizes, subgraphs, in validateOperands()
712 const Operation& operation, const std::vector<Operand>& operands,
716 const std::vector<Operand>& operands, in validateOperations() argument
721 auto result = validateOperationIncludingOperandVersions(operations[i], operands, in validateOperations()
776 const std::vector<Operand>& operands, in validateModelSubgraphInputOutputs() argument
778 const size_t operandCount = operands.size(); in validateModelSubgraphInputOutputs()
783 const Operand& operand = operands[i]; in validateModelSubgraphInputOutputs()
795 for (size_t i = 0; i < operands.size(); ++i) { in validateModelSubgraphInputOutputs()
796 if (operands[i].lifetime == lifetime) { in validateModelSubgraphInputOutputs()
813 operandValueKnown.reserve(subgraph.operands.size()); in validateExecutionOrder()
814 std::transform(subgraph.operands.begin(), subgraph.operands.end(), in validateExecutionOrder()
846 for (size_t i = 0; i < subgraph.operands.size(); ++i) { in validateExecutionOrder()
878 NN_VALIDATE(!subgraph.operands.empty()); in validateModelSubgraph()
885 subgraph.operands, operandValuesSize, poolSizes, referenced, subgraphVersionCache)); in validateModelSubgraph()
886 const auto operationsVersion = NN_TRY(validateOperations(subgraph.operations, subgraph.operands, in validateModelSubgraph()
893 NN_TRY(validateModelSubgraphInputOutputs(subgraph.inputIndexes, subgraph.operands, in validateModelSubgraph()
895 NN_TRY(validateModelSubgraphInputOutputs(subgraph.outputIndexes, subgraph.operands, in validateModelSubgraph()
972 for (const Operand& operand : subgraph.operands) { in checkNoReferenceCycles()
1168 const std::vector<uint32_t>& operandIndexes, const std::vector<Operand>& operands, in validateRequestArgumentsForModel() argument
1184 const Operand& operand = operands[operandIndex]; in validateRequestArgumentsForModel()
1258 request.inputs, model.main.inputIndexes, model.main.operands, in validateRequestForModelImpl()
1262 request.outputs, model.main.outputIndexes, model.main.operands, in validateRequestForModelImpl()
1276 std::vector<nn::Operand> operands; in validateMemoryDescImpl() local
1277 operands.reserve(inputRoles.size() + outputRoles.size()); in validateMemoryDescImpl()
1290 operands.push_back(model->main.operands[inputIndexes[role.ioIndex]]); in validateMemoryDescImpl()
1304 operands.push_back(model->main.operands[outputIndexes[role.ioIndex]]); in validateMemoryDescImpl()
1307 CHECK(!operands.empty()); in validateMemoryDescImpl()
1308 const auto opType = operands.front().type; in validateMemoryDescImpl()
1311 for (const auto& operand : operands) { in validateMemoryDescImpl()
1312 NN_VALIDATE_EQ(operand.type, opType) << operand.type << " vs " << operands.front().type; in validateMemoryDescImpl()
1313 NN_VALIDATE_EQ(operand.scale, operands.front().scale); in validateMemoryDescImpl()
1314 NN_VALIDATE_EQ(operand.zeroPoint, operands.front().zeroPoint); in validateMemoryDescImpl()
1317 NN_VALIDATE_EQ(operand.extraParams, operands.front().extraParams) in validateMemoryDescImpl()
1318 << operand.extraParams << " vs " << operands.front().extraParams; in validateMemoryDescImpl()
1333 *combinedOperand = operands.front(); in validateMemoryDescImpl()
1345 const std::vector<Operand>& operands) in OperationValidationContext() argument
1349 operands(operands) {} in OperationValidationContext()
1369 const std::vector<Operand>& operands; member in android::nn::__anonef200d880110::OperationValidationContext
1377 return &operands.at(inputIndexes.at(index)); in getInputOperand()
1381 return &operands.at(outputIndexes.at(index)); in getOutputOperand()
1561 Result<void> validateOperationOperandTypes(const std::vector<Operand>& operands, in validateOperationOperandTypes() argument
1573 NN_VALIDATE_EQ(operands[inputIndexes[i]].type, inExpectedTypes[i]) in validateOperationOperandTypes()
1574 << "Invalid input tensor type " << operands[inputIndexes[i]].type << " for input " in validateOperationOperandTypes()
1578 NN_VALIDATE_EQ(operands[outputIndexes[i]].type, outExpectedInTypes[i]) in validateOperationOperandTypes()
1579 << "Invalid output tensor type " << operands[outputIndexes[i]].type << " for input " in validateOperationOperandTypes()
1607 return subgraph.operands.at(subgraph.inputIndexes.at(index)); in getInputOperand()
1612 return subgraph.operands.at(subgraph.outputIndexes.at(index)); in getOutputOperand()
1643 const std::vector<Operand>& operands, in validateIfOperation() argument
1660 const Operand& outerOperand = operands[inputs[op::kFirstInput + i]]; in validateIfOperation()
1665 const Operand& outerOperand = operands[outputs[i]]; in validateIfOperation()
1670 auto result = validateConditionOperand(operands[inputs[op::kCondBoolOperand]]); in validateIfOperation()
1674 result = validateBranchOperand(operands[inputs[op::kThenModelOperand]]); in validateIfOperation()
1678 result = validateBranchOperand(operands[inputs[op::kElseModelOperand]]); in validateIfOperation()
1696 const std::vector<Operand>& operands, in validateWhileOperation() argument
1722 const Operand& outerOperand = operands[inputs[op::kFirstInput + i]]; in validateWhileOperation()
1749 const Operand& outerOperand = operands[inputs[op::kFirstInput + i]]; in validateWhileOperation()
1758 const Operand& outerOperand = operands[outputs[i]]; in validateWhileOperation()
1772 auto result = validateCondOperand(operands[inputs[op::kCondModelOperand]]); in validateWhileOperation()
1777 result = validateBodyOperand(operands[inputs[op::kBodyModelOperand]]); in validateWhileOperation()
1786 const std::vector<Operand>& operands, in validateOperationButNotOperandsImpl() argument
1792 NN_TRY(validateOperandListImpl(inputIndexes, operands.size(), in validateOperationButNotOperandsImpl()
1794 NN_TRY(validateOperandListImpl(outputIndexes, operands.size(), in validateOperationButNotOperandsImpl()
1818 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
1842 const auto inputRank = operands[inputIndexes[0]].dimensions.size(); in validateOperationButNotOperandsImpl()
1845 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
1855 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
1884 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
1894 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
1923 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
1930 auto inputType = operands[inputIndexes[1]].type; in validateOperationButNotOperandsImpl()
1949 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
1956 auto inputType = operands[inputIndexes[2]].type; in validateOperationButNotOperandsImpl()
1965 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
1972 auto inputType = operands[inputIndexes[1]].type; in validateOperationButNotOperandsImpl()
1978 auto hashType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2001 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2020 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2048 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2060 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2089 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2107 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2114 OperandType inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2123 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2130 OperandType inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2159 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2167 OperandType inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2180 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2190 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2229 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2239 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2259 if (operands[inputIndexes[0]].zeroPoint != 0) { in validateOperationButNotOperandsImpl()
2285 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2292 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2315 if (operands[inputIndexes[0]].zeroPoint == 0) { in validateOperationButNotOperandsImpl()
2329 const auto inputRank = operands[inputIndexes[0]].dimensions.size(); in validateOperationButNotOperandsImpl()
2332 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2339 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2375 const auto inputRank = operands[inputIndexes[0]].dimensions.size(); in validateOperationButNotOperandsImpl()
2378 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2385 auto inputOperand = operands[inputIndexes[0]]; in validateOperationButNotOperandsImpl()
2386 auto outputOperand = operands[outputIndexes[0]]; in validateOperationButNotOperandsImpl()
2425 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2432 const auto inputRank = operands[inputIndexes[0]].dimensions.size(); in validateOperationButNotOperandsImpl()
2435 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2450 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2458 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2471 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2478 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2497 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2505 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2521 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2531 OperandType inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2548 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2558 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2559 auto filterType = operands[inputIndexes[1]].type; in validateOperationButNotOperandsImpl()
2582 operands[inputIndexes[1]].extraParams) in validateOperationButNotOperandsImpl()
2607 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2614 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2633 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2640 auto inputType = operands[inputIndexes[0]].type; in validateOperationButNotOperandsImpl()
2656 NN_TRY(validateOperationOperandTypes(operands, inputIndexes, inExpectedTypes, in validateOperationButNotOperandsImpl()
2661 return validateIfOperation(inputIndexes, outputIndexes, operands, subgraphs); in validateOperationButNotOperandsImpl()
2664 return validateWhileOperation(inputIndexes, outputIndexes, operands, subgraphs); in validateOperationButNotOperandsImpl()
2677 outputIndexes, operands); in validateOperationButNotOperandsImpl()
2684 const Operation& operation, const std::vector<Operand>& operands, in validateOperationIncludingOperandVersions() argument
2687 auto version = NN_TRY(validateOperationButNotOperandsImpl(operation, operands, subgraphs)); in validateOperationIncludingOperandVersions()
2849 const std::vector<Operand>& operands, in validateOperationButNotOperands() argument
2851 NN_TRY(validateOperationButNotOperandsImpl(operation, operands, subgraphs)); in validateOperationButNotOperands()
2868 const Operation& operation, const std::vector<Operand>& operands, size_t operandValuesSize, in validateOperationAndAnythingItDependsOn() argument
2872 std::vector<Version> operandVersions(operands.size(), Version::ANDROID_OC_MR1); in validateOperationAndAnythingItDependsOn()
2874 NN_VALIDATE_LT(index, operands.size()); in validateOperationAndAnythingItDependsOn()
2875 const Operand& operand = operands[index]; in validateOperationAndAnythingItDependsOn()
2880 NN_VALIDATE_LT(index, operands.size()); in validateOperationAndAnythingItDependsOn()
2881 const Operand& operand = operands[index]; in validateOperationAndAnythingItDependsOn()
2885 return validateOperationIncludingOperandVersions(operation, operands, operandVersions, in validateOperationAndAnythingItDependsOn()