Lines Matching refs:testModel
72 void executeInternal(const Compilation& compilation, const TestModel& testModel,
74 void executeWithCompilation(const Compilation& compilation, const TestModel& testModel);
75 void executeOnce(const Model& model, const TestModel& testModel);
76 void executeMultithreadedOwnCompilation(const Model& model, const TestModel& testModel);
77 void executeMultithreadedSharedCompilation(const Model& model, const TestModel& testModel);
79 void execute(const TestModel& testModel);
182 const TestModel& testModel, Execution* execution, in createRequestWithDeviceMemories() argument
190 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in createRequestWithDeviceMemories()
192 const auto& operand = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequestWithDeviceMemories()
213 for (uint32_t i = 0; i < testModel.main.outputIndexes.size(); i++) { in createRequestWithDeviceMemories()
222 static void copyResultsFromDeviceMemories(const TestModel& testModel, in copyResultsFromDeviceMemories() argument
226 ASSERT_EQ(testModel.main.outputIndexes.size(), outputMemories.size()); in copyResultsFromDeviceMemories()
230 for (uint32_t i = 0; i < testModel.main.outputIndexes.size(); i++) { in copyResultsFromDeviceMemories()
232 const auto& operand = testModel.main.operands[testModel.main.outputIndexes[i]]; in copyResultsFromDeviceMemories()
245 void GeneratedTests::executeInternal(const Compilation& compilation, const TestModel& testModel, in executeInternal() argument
258 createRequestWithDeviceMemories(compilation, testModel, &execution, &inputMemories, in executeInternal()
261 createRequest(testModel, &execution, &outputs); in executeInternal()
264 const auto computeAndCheckResults = [this, &testModel, &execution, &outputs, &outputMemories] { in executeInternal()
267 copyResultsFromDeviceMemories(testModel, outputMemories, &outputs); in executeInternal()
284 for (uint32_t i = 0; i < testModel.main.outputIndexes.size(); i++) { in executeInternal()
286 const auto& output = testModel.main.operands[testModel.main.outputIndexes[i]]; in executeInternal()
294 checkResults(testModel, outputs); in executeInternal()
305 const TestModel& testModel) { in executeWithCompilation() argument
307 executeInternal(compilation, testModel, /*testReusableExecution=*/false); in executeWithCompilation()
310 executeInternal(compilation, testModel, /*testReusableExecution=*/true); in executeWithCompilation()
320 const TestModel& testModel) { in validateCompilationMemoryPreferences() argument
322 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in validateCompilationMemoryPreferences()
331 for (uint32_t i = 0; i < testModel.main.outputIndexes.size(); i++) { in validateCompilationMemoryPreferences()
344 void GeneratedTests::executeOnce(const Model& model, const TestModel& testModel) { in executeOnce() argument
349 validateCompilationMemoryPreferences(compilation.value(), testModel); in executeOnce()
350 executeWithCompilation(compilation.value(), testModel); in executeOnce()
354 const TestModel& testModel) { in executeMultithreadedOwnCompilation() argument
359 threads.push_back(std::thread([&]() { executeOnce(model, testModel); })); in executeMultithreadedOwnCompilation()
365 const TestModel& testModel) { in executeMultithreadedSharedCompilation() argument
374 std::thread([&]() { executeWithCompilation(compilation.value(), testModel); })); in executeMultithreadedSharedCompilation()
380 void GeneratedTests::execute(const TestModel& testModel) { in execute() argument
383 createModel(testModel, mTestDynamicOutputShape, &model); in execute()
384 if (testModel.expectFailure && !model.isValid()) { in execute()
389 auto executeInternal = [&testModel, &model, this]() { in execute()
392 executeOnce(model, testModel); in execute()
394 executeMultithreadedOwnCompilation(model, testModel); in execute()
395 executeMultithreadedSharedCompilation(model, testModel); in execute()
461 if (const auto featureLevelNeeded = halVersionToFeatureLevel(testModel.minSupportedVersion)) { in shouldSkipTest()
499 execute(testModel); in TEST_P()
504 execute(testModel); in TEST_P()
509 execute(testModel); in TEST_P()
513 execute(testModel); in TEST_P()
518 execute(testModel); in TEST_P()
522 execute(testModel); in TEST_P()
526 execute(convertQuant8AsymmOperandsToSigned(testModel)); in TEST_P()
530 execute(testModel); in TEST_P()
535 execute(testModel); in TEST_P()
539 [](const TestModel& testModel) { return !testModel.expectFailure; }); in __anon3fdb12960802() argument
541 INSTANTIATE_GENERATED_TEST(DynamicOutputShapeTest, [](const TestModel& testModel) { in __anon3fdb12960902() argument
542 return !testModel.expectFailure && !testModel.hasScalarOutputs(); in __anon3fdb12960902()
545 INSTANTIATE_GENERATED_TEST(GeneratedValidationTests, [](const TestModel& testModel) { in __anon3fdb12960a02() argument
546 return testModel.expectFailure && !testModel.isInfiniteLoopTimeoutTest(); in __anon3fdb12960a02()
549 INSTANTIATE_GENERATED_TEST(QuantizationCouplingTest, [](const TestModel& testModel) { in __anon3fdb12960b02() argument
550 return !testModel.expectFailure && testModel.main.operations.size() == 1 && in __anon3fdb12960b02()
551 testModel.referenced.size() == 0 && testModel.hasQuant8CoupledOperands(); in __anon3fdb12960b02()
554 INSTANTIATE_GENERATED_TEST(DeviceMemoryTest, [](const TestModel& testModel) { in __anon3fdb12960c02() argument
555 return !testModel.expectFailure && in __anon3fdb12960c02()
556 std::all_of(testModel.main.outputIndexes.begin(), testModel.main.outputIndexes.end(), in __anon3fdb12960c02()
557 [&testModel](uint32_t index) { in __anon3fdb12960c02()
558 return testModel.main.operands[index].data.size() > 0; in __anon3fdb12960c02()
562 INSTANTIATE_GENERATED_TEST(FencedComputeTest, [](const TestModel& testModel) { in __anon3fdb12960e02() argument
563 return !testModel.expectFailure && in __anon3fdb12960e02()
564 std::all_of(testModel.main.outputIndexes.begin(), testModel.main.outputIndexes.end(), in __anon3fdb12960e02()
565 [&testModel](uint32_t index) { in __anon3fdb12960e02()
566 return testModel.main.operands[index].data.size() > 0; in __anon3fdb12960e02()