Home
last modified time | relevance | path

Searched refs:testModel (Results 1 – 25 of 37) sorted by relevance

12

/aosp12/packages/modules/NeuralNetworks/runtime/test/
H A DTestGenerated.cpp454 execute(testModel); in TEST_P()
459 execute(testModel); in TEST_P()
464 execute(testModel); in TEST_P()
468 execute(testModel); in TEST_P()
473 execute(testModel); in TEST_P()
477 execute(testModel); in TEST_P()
485 execute(testModel); in TEST_P()
490 execute(testModel); in TEST_P()
497 return !testModel.expectFailure && !testModel.hasScalarOutputs(); in __anon6a3529560902()
501 return testModel.expectFailure && !testModel.isInfiniteLoopTimeoutTest(); in __anon6a3529560a02()
[all …]
H A DSupportLibraryTestGenerated.cpp555 execute(testModel); in TEST_P()
561 execute(testModel); in TEST_P()
565 execute(testModel); in TEST_P()
570 execute(testModel); in TEST_P()
574 execute(testModel); in TEST_P()
582 execute(testModel); in TEST_P()
587 execute(testModel); in TEST_P()
594 return !testModel.expectFailure && !testModel.hasScalarOutputs(); in __anon8752d1880b02()
598 return testModel.expectFailure && !testModel.isInfiniteLoopTimeoutTest(); in __anon8752d1880c02()
602 return !testModel.expectFailure && testModel.main.operations.size() == 1 && in __anon8752d1880d02()
[all …]
H A DGeneratedTestUtils.cpp122 processSubgraph(testModel.main);
123 for (const TestSubgraph& subgraph : testModel.referenced) {
203 refModels.reserve(testModel.referenced.size());
204 for (int i = 0; i < testModel.referenced.size(); ++i) {
208 std::vector<Model> refModels(testModel.referenced.size());
210 createModelFromSubgraph(testModel.main, testDynamicOutputShape, testModel.referenced, memory,
216 model->relaxComputationFloat32toFloat16(testModel.isRelaxed);
218 if (!testModel.expectFailure) {
223 void createRequest(const TestModel& testModel, Execution* execution, argument
230 const auto& operand = testModel.main.operands[testModel.main.inputIndexes[i]];
[all …]
H A DGeneratedTestUtils.h45 const test_helper::TestModel& testModel = *GetParam().second;
87 void createModel(const NnApiSupportLibrary* nnapi, const test_helper::TestModel& testModel,
89 inline void createModel(const NnApiSupportLibrary* nnapi, const test_helper::TestModel& testModel, in createModel() argument
91 createModel(nnapi, testModel, /*testDynamicOutputShape=*/false, model); in createModel()
94 void createModel(const test_helper::TestModel& testModel, bool testDynamicOutputShape,
96 inline void createModel(const test_helper::TestModel& testModel, GeneratedModel* model) { in createModel() argument
97 createModel(testModel, /*testDynamicOutputShape=*/false, model); in createModel()
101 void createRequest(const test_helper::TestModel& testModel, test_wrapper::Execution* execution,
H A DTestCompliance.cpp221 generated_tests::createModel(testModel, &model); in TEST_P()
224 switch (testModel.minSupportedVersion) { in TEST_P()
242 INSTANTIATE_GENERATED_TEST(GeneratedComplianceTest, [](const TestModel& testModel) { in __anon209684820202() argument
243 return !testModel.expectFailure && testModel.minSupportedVersion != TestHalVersion::UNKNOWN; in __anon209684820202()
/aosp12/packages/modules/NeuralNetworks/runtime/test/android_fuzzing/
H A DFuzzTest.cpp43 std::optional<Model> CreateModel(const TestModel& testModel) { in CreateModel() argument
49 for (const auto& operand : testModel.main.operands) { in CreateModel()
75 for (const auto& operation : testModel.main.operations) { in CreateModel()
81 model.identifyInputsAndOutputs(testModel.main.inputIndexes, testModel.main.outputIndexes); in CreateModel()
85 model.relaxComputationFloat32toFloat16(testModel.isRelaxed); in CreateModel()
104 const TestModel& testModel) { in CreateExecution() argument
109 const auto& operand = testModel.main.operands[testModel.main.inputIndexes[i]]; in CreateExecution()
118 const auto& operand = testModel.main.operands[testModel.main.outputIndexes[i]]; in CreateExecution()
130 void nnapiFuzzTest(const TestModel& testModel) { in nnapiFuzzTest() argument
132 auto model = CreateModel(testModel); in nnapiFuzzTest()
[all …]
H A DDriverFuzzTest.cpp135 V1_3::Model createModel(const TestModel& testModel) { in createModel() argument
143 hidl_vec<V1_3::Subgraph> refSubgraphs(testModel.referenced.size()); in createModel()
144 std::transform(testModel.referenced.begin(), testModel.referenced.end(), refSubgraphs.begin(), in createModel()
175 .relaxComputationFloat32toFloat16 = testModel.isRelaxed}; in createModel()
178 V1_3::Request createRequest(const TestModel& testModel) { in createRequest() argument
186 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
203 const auto& op = testModel.main.operands[testModel.main.outputIndexes[i]]; in createRequest()
239 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
307 void nnapiFuzzTest(const TestModel& testModel) { in nnapiFuzzTest() argument
313 const auto model = createModel(testModel); in nnapiFuzzTest()
[all …]
H A DFuzzHarness.cpp28 extern void nnapiFuzzTest(const ::test_helper::TestModel& testModel);
50 const TestModel testModel = convertToTestModel(model); in DEFINE_PROTO_FUZZER() local
51 if (!shouldSkip(testModel)) { in DEFINE_PROTO_FUZZER()
52 nnapiFuzzTest(testModel); in DEFINE_PROTO_FUZZER()
H A DGenerateCorpus.cpp157 const auto& [testName, testModel] = testCase; in createCorpusEntry()
158 const Test test = convertToTest(*testModel); in createCorpusEntry()
180 const auto filter = [](const TestModel& testModel) { return !testModel.expectFailure; }; in main() argument
/aosp12/hardware/interfaces/neuralnetworks/1.2/vts/functional/
H A DGeneratedTestHarness.cpp76 Model createModel(const TestModel& testModel) { in createModel() argument
82 const auto& op = testModel.main.operands[i]; in createModel()
115 std::transform(testModel.main.operations.begin(), testModel.main.operations.end(), in createModel()
125 const auto& op = testModel.main.operands[i]; in createModel()
166 const auto byteSize = testModel.main.operands[testModel.main.outputIndexes[index]].data.size(); in isOutputSizeGreaterThanOne()
216 !isOutputSizeGreaterThanOne(testModel, 0)) { in EvaluatePreparedModel()
325 const auto& expect = testModel.main.operands[testModel.main.outputIndexes[i]].dimensions; in EvaluatePreparedModel()
334 checkResults(testModel, outputs); in EvaluatePreparedModel()
372 Model model = createModel(testModel); in Execute()
419 [](const TestModel& testModel) { return !testModel.expectFailure; }); in __anonc26bb0f00402() argument
[all …]
H A DCompilationCachingTests.cpp423 const TestModel& testModel = createTestModel(); in TEST_P() local
424 const Model model = createModel(testModel); in TEST_P()
458 EvaluatePreparedModel(preparedModel, testModel, in TEST_P()
464 const TestModel& testModel = createTestModel(); in TEST_P() local
465 const Model model = createModel(testModel); in TEST_P()
528 const Model model = createModel(testModel); in TEST_P()
633 const Model model = createModel(testModel); in TEST_P()
714 const Model model = createModel(testModel); in TEST_P()
819 const Model model = createModel(testModel); in TEST_P()
900 const Model model = createModel(testModel); in TEST_P()
[all …]
/aosp12/hardware/interfaces/neuralnetworks/1.1/vts/functional/
H A DGeneratedTestHarness.cpp50 Model createModel(const TestModel& testModel) { in createModel() argument
53 hidl_vec<Operand> operands(testModel.main.operands.size()); in createModel()
56 const auto& op = testModel.main.operands[i]; in createModel()
82 std::transform(testModel.main.operations.begin(), testModel.main.operations.end(), in createModel()
92 const auto& op = testModel.main.operands[i]; in createModel()
114 const auto& op = testModel.main.operands[i]; in createModel()
125 .inputIndexes = testModel.main.inputIndexes, in createModel()
126 .outputIndexes = testModel.main.outputIndexes, in createModel()
135 const Model model = createModel(testModel); in Execute()
159 checkResults(testModel, outputs); in Execute()
[all …]
/aosp12/hardware/interfaces/neuralnetworks/1.0/vts/functional/
H A DGeneratedTestHarness.cpp43 Model createModel(const TestModel& testModel) { in createModel() argument
46 hidl_vec<Operand> operands(testModel.main.operands.size()); in createModel()
49 const auto& op = testModel.main.operands[i]; in createModel()
75 std::transform(testModel.main.operations.begin(), testModel.main.operations.end(), in createModel()
85 const auto& op = testModel.main.operands[i]; in createModel()
107 const auto& op = testModel.main.operands[i]; in createModel()
118 .inputIndexes = testModel.main.inputIndexes, in createModel()
119 .outputIndexes = testModel.main.outputIndexes, in createModel()
127 const Model model = createModel(testModel); in Execute()
151 checkResults(testModel, outputs); in Execute()
[all …]
H A DUtils.cpp102 Request ExecutionContext::createRequest(const TestModel& testModel, MemoryType memoryType) { in createRequest() argument
106 hidl_vec<RequestArgument> inputs(testModel.main.inputIndexes.size()); in createRequest()
108 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in createRequest()
109 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
123 hidl_vec<RequestArgument> outputs(testModel.main.outputIndexes.size()); in createRequest()
125 for (uint32_t i = 0; i < testModel.main.outputIndexes.size(); i++) { in createRequest()
126 const auto& op = testModel.main.operands[testModel.main.outputIndexes[i]]; in createRequest()
157 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in createRequest()
158 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
/aosp12/hardware/interfaces/neuralnetworks/1.3/vts/functional/
H A DGeneratedTestHarness.cpp285 std::transform(testModel.referenced.begin(), testModel.referenced.end(), refSubgraphs.begin(), in createModel()
320 const auto byteSize = testModel.main.operands[testModel.main.outputIndexes[index]].data.size(); in isOutputSizeGreaterThanOne()
375 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
405 const auto& op = testModel.main.operands[testModel.main.outputIndexes[i]]; in createRequest()
460 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
480 const auto& op = testModel.main.operands[testModel.main.outputIndexes[i]]; in getOutputBuffers()
514 return std::any_of(testModel.main.outputIndexes.begin(), testModel.main.outputIndexes.end(), in hasZeroSizedOutput()
758 testModel.main.operands[testModel.main.outputIndexes[i]].dimensions; in EvaluatePreparedModel()
989 [](const TestModel& testModel) { return !testModel.expectFailure; }); in __anond5a3e5f10902() argument
992 return !testModel.expectFailure && !testModel.hasScalarOutputs(); in __anond5a3e5f10a02()
[all …]
H A DQualityOfServiceTests.cpp216 void runExecutionTest(const sp<IPreparedModel>& preparedModel, const TestModel& testModel, in runExecutionTest() argument
252 outputShapes.size() == testModel.main.outputIndexes.size()); in runExecutionTest()
257 const auto& expect = testModel.main.operands[testModel.main.outputIndexes[i]].dimensions; in runExecutionTest()
269 checkResults(testModel, outputs); in runExecutionTest()
273 void runExecutionTests(const sp<IPreparedModel>& preparedModel, const TestModel& testModel, in runExecutionTests() argument
277 runExecutionTest(preparedModel, testModel, request, context, synchronous, in runExecutionTests()
283 void runTests(const sp<IDevice>& device, const TestModel& testModel) { in runTests() argument
285 const Model model = createModel(testModel); in runTests()
297 const Request request = nn::convertToV1_3(context.createRequest(testModel)); in runTests()
298 runExecutionTests(preparedModel, testModel, request, context); in runTests()
[all …]
H A DCompilationCachingTests.cpp426 const TestModel& testModel = createTestModel(); in TEST_P() local
427 const Model model = createModel(testModel); in TEST_P()
466 const TestModel& testModel = createTestModel(); in TEST_P() local
467 const Model model = createModel(testModel); in TEST_P()
528 const TestModel& testModel = createTestModel(); in TEST_P() local
529 const Model model = createModel(testModel); in TEST_P()
630 const Model model = createModel(testModel); in TEST_P()
711 const Model model = createModel(testModel); in TEST_P()
812 const Model model = createModel(testModel); in TEST_P()
893 const Model model = createModel(testModel); in TEST_P()
[all …]
/aosp12/hardware/interfaces/neuralnetworks/aidl/vts/functional/
H A DGeneratedTestHarness.cpp258 std::transform(testModel.referenced.begin(), testModel.referenced.end(), refSubgraphs.begin(), in createModel()
298 const auto byteSize = testModel.main.operands[testModel.main.outputIndexes[index]].data.size(); in isOutputSizeGreaterThanOne()
363 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
396 const auto& op = testModel.main.operands[testModel.main.outputIndexes[i]]; in createRequest()
463 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
483 const auto& op = testModel.main.operands[testModel.main.outputIndexes[i]]; in getOutputBuffers()
517 return std::any_of(testModel.main.outputIndexes.begin(), testModel.main.outputIndexes.end(), in hasZeroSizedOutput()
734 testModel.main.operands[testModel.main.outputIndexes[i]].dimensions; in EvaluatePreparedModel()
968 [](const TestModel& testModel) { return !testModel.expectFailure; }); in __anon8cc611d90602() argument
971 return !testModel.expectFailure && !testModel.hasScalarOutputs(); in __anon8cc611d90702()
[all …]
H A DQualityOfServiceTests.cpp223 const TestModel& testModel, const Request& request, in runExecutionTest() argument
258 outputShapes.size() == testModel.main.outputIndexes.size()); in runExecutionTest()
264 utils::toSigned(testModel.main.operands[testModel.main.outputIndexes[i]].dimensions) in runExecutionTest()
275 checkResults(testModel, outputs); in runExecutionTest()
280 const TestModel& testModel, const Request& request, in runExecutionTests() argument
284 runExecutionTest(preparedModel, testModel, request, context, synchronous, in runExecutionTests()
290 void runTests(const std::shared_ptr<IDevice>& device, const TestModel& testModel) { in runTests() argument
292 const Model model = createModel(testModel); in runTests()
304 const Request request = context.createRequest(testModel); in runTests()
305 runExecutionTests(preparedModel, testModel, request, context); in runTests()
[all …]
H A DCompilationCachingTests.cpp484 const TestModel& testModel = createTestModel(); in TEST_P() local
485 const Model model = createModel(testModel); in TEST_P()
525 const TestModel& testModel = createTestModel(); in TEST_P() local
526 const Model model = createModel(testModel); in TEST_P()
586 const TestModel& testModel = createTestModel(); in TEST_P() local
587 const Model model = createModel(testModel); in TEST_P()
663 const TestModel& testModel = createTestModel(); in TEST_P() local
664 const Model model = createModel(testModel); in TEST_P()
724 const TestModel& testModel = createTestModel(); in TEST_P() local
725 const Model model = createModel(testModel); in TEST_P()
[all …]
H A DUtils.cpp180 Request ExecutionContext::createRequest(const TestModel& testModel, MemoryType memoryType) { in createRequest() argument
184 std::vector<RequestArgument> inputs(testModel.main.inputIndexes.size()); in createRequest()
186 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in createRequest()
187 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
201 std::vector<RequestArgument> outputs(testModel.main.outputIndexes.size()); in createRequest()
203 for (uint32_t i = 0; i < testModel.main.outputIndexes.size(); i++) { in createRequest()
204 const auto& op = testModel.main.operands[testModel.main.outputIndexes[i]]; in createRequest()
245 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in createRequest()
246 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
/aosp12/packages/modules/NeuralNetworks/tools/test_generator/test_harness/
H A DTestUtils.cpp117 Model createModel(const TestModel& testModel) { in createModel() argument
123 refSubgraphs.reserve(testModel.referenced.size()); in createModel()
124 std::transform(testModel.referenced.begin(), testModel.referenced.end(), in createModel()
140 .relaxComputationFloat32toFloat16 = testModel.isRelaxed}; in createModel()
143 Request createRequest(const TestModel& testModel) { in createRequest() argument
149 inputs.reserve(testModel.main.inputIndexes.size()); in createRequest()
151 for (uint32_t operandIndex : testModel.main.inputIndexes) { in createRequest()
152 const auto& op = testModel.main.operands[operandIndex]; in createRequest()
168 outputs.reserve(testModel.main.outputIndexes.size()); in createRequest()
170 for (uint32_t operandIndex : testModel.main.outputIndexes) { in createRequest()
[all …]
H A DTestHarness.cpp295 TestModel convertQuant8AsymmOperandsToSigned(const TestModel& testModel) { in convertQuant8AsymmOperandsToSigned() argument
310 TestModel converted(testModel.copy()); in convertQuant8AsymmOperandsToSigned()
723 std::optional<TestModel> convertToFloat32Model(const TestModel& testModel) { in convertToFloat32Model() argument
725 if (testModel.referenced.size() > 0 || testModel.main.operations.size() > 1) { in convertToFloat32Model()
730 CHECK(!testModel.main.operations.empty()); in convertToFloat32Model()
731 const auto& operation = testModel.main.operations[0]; in convertToFloat32Model()
745 auto convert = [&testModel, &operation](const TestOperand& op, uint32_t index) { in convertToFloat32Model()
758 const auto& input0 = testModel.main.operands[input0Index]; in convertToFloat32Model()
787 TestModel converted = testModel; in convertToFloat32Model()
788 for (uint32_t i = 0; i < testModel.main.operands.size(); i++) { in convertToFloat32Model()
[all …]
/aosp12/packages/modules/NeuralNetworks/runtime/test/fuzzing/
H A DRandomGraphGenerator.cpp252 TestModel testModel; in createTestModel() local
256 operand->opIndex = testModel.main.operands.size(); in createTestModel()
288 testModel.main.inputIndexes.push_back(operand->opIndex); in createTestModel()
290 testModel.main.outputIndexes.push_back(operand->opIndex); in createTestModel()
292 testModel.main.operands.push_back(std::move(testOperand)); in createTestModel()
307 testModel.main.operations.push_back(std::move(testOperation)); in createTestModel()
309 return testModel; in createTestModel()
/aosp12/packages/modules/NeuralNetworks/tools/test_generator/test_harness/include/nnapi/
H A DTestUtils.h26 Model createModel(const ::test_helper::TestModel& testModel);
28 Request createRequest(const ::test_helper::TestModel& testModel);

12