Home
last modified time | relevance | path

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

/frameworks/ml/nn/runtime/test/
DTestGenerated.cpp68 void executeWithCompilation(const Compilation& compilation, const TestModel& testModel);
69 void executeOnce(const Model& model, const TestModel& testModel);
70 void executeMultithreadedOwnCompilation(const Model& model, const TestModel& testModel);
71 void executeMultithreadedSharedCompilation(const Model& model, const TestModel& testModel);
73 void execute(const TestModel& testModel);
141 static void computeWithPtrs(const TestModel& testModel, Execution* execution, Result* result, in computeWithPtrs() argument
145 createRequest(testModel, execution, outputs); in computeWithPtrs()
177 static void computeWithDeviceMemories(const Compilation& compilation, const TestModel& testModel, in computeWithDeviceMemories() argument
189 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in computeWithDeviceMemories()
191 const auto& operand = testModel.main.operands[testModel.main.inputIndexes[i]]; in computeWithDeviceMemories()
[all …]
DGeneratedTestUtils.cpp87 static std::unique_ptr<MemoryAHWB> createConstantReferenceMemory(const TestModel& testModel) { in createConstantReferenceMemory() argument
98 processSubgraph(testModel.main); in createConstantReferenceMemory()
99 for (const TestSubgraph& subgraph : testModel.referenced) { in createConstantReferenceMemory()
158 void createModel(const TestModel& testModel, bool testDynamicOutputShape, GeneratedModel* model) { in createModel() argument
161 std::unique_ptr<MemoryAHWB> memory = createConstantReferenceMemory(testModel); in createModel()
163 std::vector<Model> refModels(testModel.referenced.size()); in createModel()
164 createModelFromSubgraph(testModel.main, testDynamicOutputShape, testModel.referenced, memory, in createModel()
170 model->relaxComputationFloat32toFloat16(testModel.isRelaxed); in createModel()
172 if (!testModel.expectFailure) { in createModel()
177 void createRequest(const TestModel& testModel, Execution* execution, in createRequest() argument
[all …]
DGeneratedTestUtils.h36 const test_helper::TestModel& testModel = *GetParam().second;
73 void createModel(const test_helper::TestModel& testModel, bool testDynamicOutputShape,
75 inline void createModel(const test_helper::TestModel& testModel, GeneratedModel* model) { in createModel() argument
76 createModel(testModel, /*testDynamicOutputShape=*/false, model); in createModel()
79 void createRequest(const test_helper::TestModel& testModel, test_wrapper::Execution* execution,
DTestCompliance.cpp215 generated_tests::createModel(testModel, &model); in TEST_P()
218 switch (testModel.minSupportedVersion) { in TEST_P()
236 INSTANTIATE_GENERATED_TEST(GeneratedComplianceTest, [](const TestModel& testModel) { in __anon8758acd00102() argument
237 return !testModel.expectFailure && testModel.minSupportedVersion != TestHalVersion::UNKNOWN; in __anon8758acd00102()
DTestRemoveDefaultArguments.cpp153 void test(const test_helper::TestModel& testModel, uint32_t originalInputCount, in test() argument
155 ASSERT_EQ(testModel.main.operations.size(), 1u); in test()
156 ASSERT_EQ(testModel.main.operations[0].inputs.size(), originalInputCount); in test()
161 generated_tests::createModel(testModel, &model); in test()
/frameworks/ml/nn/runtime/test/android_fuzzing/
DFuzzTest.cpp43 std::optional<Model> CreateModel(const TestModel& testModel) { in CreateModel() argument
48 CHECK_EQ(testModel.referenced.size(), 0u) << "Subgraphs not supported"; in CreateModel()
49 for (const auto& operand : testModel.main.operands) { in CreateModel()
74 CHECK_EQ(testModel.referenced.size(), 0u) << "Subgraphs not supported"; 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
108 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in CreateExecution()
109 const auto& operand = testModel.main.operands[testModel.main.inputIndexes[i]]; in CreateExecution()
[all …]
DDriverFuzzTest.cpp135 V1_3::Model createModel(const TestModel& testModel) { in createModel() argument
141 V1_3::Subgraph mainSubgraph = createSubgraph(testModel.main, &constCopySize, &constCopies, in createModel()
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
183 hidl_vec<V1_0::RequestArgument> inputs(testModel.main.inputIndexes.size()); in createRequest()
185 for (uint32_t i = 0; i < testModel.main.inputIndexes.size(); i++) { in createRequest()
186 const auto& op = testModel.main.operands[testModel.main.inputIndexes[i]]; in createRequest()
200 hidl_vec<V1_0::RequestArgument> outputs(testModel.main.outputIndexes.size()); in createRequest()
[all …]
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()
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
/frameworks/ml/nn/runtime/test/fuzzing/
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()
/frameworks/ml/nn/tools/test_generator/test_harness/include/
DTestHarness.h433 int add(std::string name, const TestModel& testModel) { in add() argument
434 mTestModels.emplace(std::move(name), &testModel); in add()
509 TestModel convertQuant8AsymmOperandsToSigned(const TestModel& testModel);
517 SpecDumper(const TestModel& testModel, std::ostream& os) : kTestModel(testModel), mOs(os) {} in SpecDumper() argument
544 std::optional<TestModel> convertToFloat32Model(const TestModel& testModel);
/frameworks/ml/nn/tools/test_generator/test_harness/
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 …]