Lines Matching refs:testModel

86                           const TestModel& testModel)  in DeviceMemoryAllocator()  argument
87 : kDevice(device), kPreparedModel(preparedModel), kTestModel(testModel) {} in DeviceMemoryAllocator()
249 Model createModel(const TestModel& testModel) { in createModel() argument
255 Subgraph mainSubgraph = createSubgraph(testModel.main, &constCopySize, &constCopies, in createModel()
257 std::vector<Subgraph> refSubgraphs(testModel.referenced.size()); in createModel()
258 std::transform(testModel.referenced.begin(), testModel.referenced.end(), refSubgraphs.begin(), in createModel()
294 .relaxComputationFloat32toFloat16 = testModel.isRelaxed}; in createModel()
297 static bool isOutputSizeGreaterThanOne(const TestModel& testModel, uint32_t index) { in isOutputSizeGreaterThanOne() argument
298 const auto byteSize = testModel.main.operands[testModel.main.outputIndexes[index]].data.size(); in isOutputSizeGreaterThanOne()
323 std::optional<Request> createRequest(const TestModel& testModel, MemoryType memoryType);
324 std::vector<TestBuffer> getOutputBuffers(const TestModel& testModel,
348 std::optional<Request> ExecutionContext::createRequest(const TestModel& testModel, in createRequest() argument
355 DeviceMemoryAllocator allocator(kDevice, kPreparedModel, testModel); in createRequest()
360 std::vector<RequestArgument> inputs(testModel.main.inputIndexes.size()); in createRequest()
362 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in createRequest()
363 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
393 std::vector<RequestArgument> outputs(testModel.main.outputIndexes.size()); in createRequest()
395 for (uint32_t i = 0; i < testModel.main.outputIndexes.size(); i++) { in createRequest()
396 const auto& op = testModel.main.operands[testModel.main.outputIndexes[i]]; in createRequest()
461 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in createRequest()
463 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
473 std::vector<TestBuffer> ExecutionContext::getOutputBuffers(const TestModel& testModel, in getOutputBuffers() argument
483 const auto& op = testModel.main.operands[testModel.main.outputIndexes[i]]; in getOutputBuffers()
516 static bool hasZeroSizedOutput(const TestModel& testModel) { in hasZeroSizedOutput() argument
517 return std::any_of(testModel.main.outputIndexes.begin(), testModel.main.outputIndexes.end(), in hasZeroSizedOutput()
518 [&testModel](uint32_t index) { in hasZeroSizedOutput()
519 return testModel.main.operands[index].data.size() == 0; in hasZeroSizedOutput()
525 const TestModel& testModel, const TestConfig& testConfig, in EvaluatePreparedModel() argument
532 !isOutputSizeGreaterThanOne(testModel, 0)) { in EvaluatePreparedModel()
537 auto maybeRequest = context.createRequest(testModel, testConfig.memoryType); in EvaluatePreparedModel()
696 if (testConfig.executor == Executor::FENCED && hasZeroSizedOutput(testModel)) { in EvaluatePreparedModel()
705 outputShapes.size() == testModel.main.outputIndexes.size()); in EvaluatePreparedModel()
716 ASSERT_EQ(outputShapes.size(), testModel.main.outputIndexes.size()); in EvaluatePreparedModel()
725 ASSERT_EQ(outputShapes.size(), testModel.main.outputIndexes.size()); in EvaluatePreparedModel()
734 testModel.main.operands[testModel.main.outputIndexes[i]].dimensions; in EvaluatePreparedModel()
752 const auto& expect = testModel.main.operands[testModel.main.outputIndexes[i]].dimensions; in EvaluatePreparedModel()
760 const std::vector<TestBuffer> outputs = context.getOutputBuffers(testModel, request); in EvaluatePreparedModel()
763 checkResults(testModel, outputs); in EvaluatePreparedModel()
768 const TestModel& testModel, TestKind testKind) { in EvaluatePreparedModel() argument
816 EvaluatePreparedModel(device, preparedModel, testModel, testConfig); in EvaluatePreparedModel()
825 const TestModel& testModel, in EvaluatePreparedCoupledModels() argument
838 EvaluatePreparedModel(device, preparedModel, testModel, testConfig, &baseSkipped); in EvaluatePreparedCoupledModels()
857 void Execute(const std::shared_ptr<IDevice>& device, const TestModel& testModel, in Execute() argument
859 Model model = createModel(testModel); in Execute()
873 EvaluatePreparedModel(device, preparedModel, testModel, testKind); in Execute()
876 ASSERT_TRUE(testModel.hasQuant8CoupledOperands()); in Execute()
879 TestModel signedQuantizedModel = convertQuant8AsymmOperandsToSigned(testModel); in Execute()
898 EvaluatePreparedCoupledModels(device, preparedModel, testModel, preparedCoupledModel, in Execute()
968 [](const TestModel& testModel) { return !testModel.expectFailure; }); in __anon8cc611d90602() argument
970 INSTANTIATE_GENERATED_TEST(DynamicOutputShapeTest, [](const TestModel& testModel) { in __anon8cc611d90702() argument
971 return !testModel.expectFailure && !testModel.hasScalarOutputs(); in __anon8cc611d90702()
975 [](const TestModel& testModel) { return !testModel.expectFailure; }); in __anon8cc611d90802() argument
978 [](const TestModel& testModel) { return !testModel.expectFailure; }); in __anon8cc611d90902() argument
980 INSTANTIATE_GENERATED_TEST(QuantizationCouplingTest, [](const TestModel& testModel) { in __anon8cc611d90a02() argument
981 return !testModel.expectFailure && testModel.hasQuant8CoupledOperands() && in __anon8cc611d90a02()
982 testModel.main.operations.size() == 1; in __anon8cc611d90a02()
985 INSTANTIATE_GENERATED_TEST(InfiniteLoopTimeoutTest, [](const TestModel& testModel) { in __anon8cc611d90b02() argument
986 return testModel.isInfiniteLoopTimeoutTest(); in __anon8cc611d90b02()