Home
last modified time | relevance | path

Searched refs:preparedModel (Results 1 – 25 of 95) sorted by relevance

1234

/hardware/interfaces/neuralnetworks/utils/common/src/
DResilientPreparedModel.cpp44 auto preparedModel = resilientPreparedModel.getPreparedModel(); in protect() local
45 auto result = fn(*preparedModel); in protect()
53 auto maybePreparedModel = resilientPreparedModel.recover(preparedModel.get()); in protect()
61 preparedModel = std::move(maybePreparedModel).value(); in protect()
63 return fn(*preparedModel); in protect()
74 auto preparedModel = NN_TRY(makePreparedModel()); in create() local
75 CHECK(preparedModel != nullptr); in create()
77 PrivateConstructorTag{}, std::move(makePreparedModel), std::move(preparedModel)); in create()
82 nn::SharedPreparedModel preparedModel) in ResilientPreparedModel() argument
83 : kMakePreparedModel(std::move(makePreparedModel)), mPreparedModel(std::move(preparedModel)) { in ResilientPreparedModel()
[all …]
/hardware/interfaces/neuralnetworks/1.2/vts/functional/
DCompilationCachingTests.cpp320 sp<IPreparedModel>* preparedModel = nullptr) { in saveModelToCache() argument
321 if (preparedModel != nullptr) *preparedModel = nullptr; in saveModelToCache()
335 if (preparedModel != nullptr) { in saveModelToCache()
336 *preparedModel = IPreparedModel::castFrom(preparedModelCallback->getPreparedModel()) in saveModelToCache()
367 sp<IPreparedModel>* preparedModel, ErrorStatus* status) { in prepareModelFromCache() argument
375 *preparedModel = nullptr; in prepareModelFromCache()
383 *preparedModel = IPreparedModel::castFrom(preparedModelCallback->getPreparedModel()) in prepareModelFromCache()
426 sp<IPreparedModel> preparedModel = nullptr; in TEST_P() local
438 preparedModel = nullptr; in TEST_P()
443 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status); in TEST_P()
[all …]
DVtsHalNeuralnetworks.cpp39 sp<IPreparedModel>* preparedModel) { in createPreparedModel() argument
40 ASSERT_NE(nullptr, preparedModel); in createPreparedModel()
41 *preparedModel = nullptr; in createPreparedModel()
65 *preparedModel = getPreparedModel_1_2(preparedModelCallback); in createPreparedModel()
75 ASSERT_EQ(nullptr, preparedModel->get()); in createPreparedModel()
84 ASSERT_NE(nullptr, preparedModel->get()); in createPreparedModel()
125 void validateRequest(const sp<IPreparedModel>& preparedModel, const V1_0::Request& request);
127 void validateRequestFailure(const sp<IPreparedModel>& preparedModel, const V1_0::Request& request);
129 void validateBurst(const sp<IPreparedModel>& preparedModel, const V1_0::Request& request);
135 sp<IPreparedModel> preparedModel; in validateEverything() local
[all …]
DValidateRequest.cpp44 static void validate(const sp<IPreparedModel>& preparedModel, const std::string& message, in validate() argument
65 preparedModel->execute_1_2(request, measure, executionCallback); in validate()
82 Return<void> executeStatus = preparedModel->executeSynchronously( in validate()
99 android::nn::ExecutionBurstController::create(preparedModel, in validate()
133 static void removeInputTest(const sp<IPreparedModel>& preparedModel, const Request& request) { in removeInputTest() argument
136 validate(preparedModel, message, request, in removeInputTest()
143 static void removeOutputTest(const sp<IPreparedModel>& preparedModel, const Request& request) { in removeOutputTest() argument
146 validate(preparedModel, message, request, in removeOutputTest()
153 void validateRequest(const sp<IPreparedModel>& preparedModel, const Request& request) { in validateRequest() argument
154 removeInputTest(preparedModel, request); in validateRequest()
[all …]
/hardware/interfaces/neuralnetworks/aidl/vts/functional/
DMemoryDomainTests.cpp245 std::shared_ptr<IPreparedModel> preparedModel; in createConvPreparedModel() local
246 createPreparedModel(kDevice, model, &preparedModel, /*reportSkipping=*/false); in createConvPreparedModel()
247 return preparedModel; in createConvPreparedModel()
253 std::shared_ptr<IPreparedModel> preparedModel; in createAddPreparedModel() local
254 createPreparedModel(kDevice, model, &preparedModel, /*reportSkipping=*/false); in createAddPreparedModel()
255 return preparedModel; in createAddPreparedModel()
326 preparedModelParcels.push_back({.preparedModel = model}); in validateAllocate()
364 auto preparedModel = createConvPreparedModel(kTestOperand); in TEST_P() local
365 if (preparedModel == nullptr) return; in TEST_P()
369 .preparedModels = {preparedModel}, in TEST_P()
[all …]
DVtsHalNeuralnetworks.cpp44 std::shared_ptr<IPreparedModel>* preparedModel, bool reportSkipping) { in createPreparedModel() argument
45 ASSERT_NE(nullptr, preparedModel); in createPreparedModel()
46 *preparedModel = nullptr; in createPreparedModel()
67 *preparedModel = preparedModelCallback->getPreparedModel(); in createPreparedModel()
75 ASSERT_EQ(nullptr, preparedModel->get()); in createPreparedModel()
88 ASSERT_NE(nullptr, preparedModel->get()); in createPreparedModel()
131 void validateRequest(const std::shared_ptr<IPreparedModel>& preparedModel, const Request& request);
133 void validateBurst(const std::shared_ptr<IPreparedModel>& preparedModel, const Request& request);
135 void validateRequestFailure(const std::shared_ptr<IPreparedModel>& preparedModel,
143 std::shared_ptr<IPreparedModel> preparedModel; in validateEverything() local
[all …]
DValidateRequest.cpp42 static void validate(const std::shared_ptr<IPreparedModel>& preparedModel, in validate() argument
62 const auto executeStatus = preparedModel->executeSynchronously( in validate()
74 const auto executeStatus = preparedModel->executeFenced(request, {}, false, kNoDeadline, in validate()
89 auto ret = preparedModel->configureExecutionBurst(&burst); in validate()
106 std::shared_ptr<IBurst> createBurst(const std::shared_ptr<IPreparedModel>& preparedModel) { in createBurst() argument
108 const auto ret = preparedModel->configureExecutionBurst(&burst); in createBurst()
115 static void removeInputTest(const std::shared_ptr<IPreparedModel>& preparedModel, in removeInputTest() argument
119 validate(preparedModel, message, request, [input](Request* request) { in removeInputTest()
127 static void removeOutputTest(const std::shared_ptr<IPreparedModel>& preparedModel, in removeOutputTest() argument
131 validate(preparedModel, message, request, [output](Request* request) { in removeOutputTest()
[all …]
DCompilationCachingTests.cpp319 std::shared_ptr<IPreparedModel>* preparedModel = nullptr) { in saveModelToCache() argument
320 if (preparedModel != nullptr) *preparedModel = nullptr; in saveModelToCache()
334 if (preparedModel != nullptr) { in saveModelToCache()
335 *preparedModel = preparedModelCallback->getPreparedModel(); in saveModelToCache()
371 std::shared_ptr<IPreparedModel>* preparedModel, ErrorStatus* status, in prepareModelFromCache() argument
401 *preparedModel = nullptr; in prepareModelFromCache()
409 *preparedModel = preparedModelCallback->getPreparedModel(); in prepareModelFromCache()
420 std::shared_ptr<IPreparedModel> preparedModel; in verifyModelPreparationBehaviour() local
425 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status, in verifyModelPreparationBehaviour()
430 ASSERT_EQ(preparedModel, nullptr); in verifyModelPreparationBehaviour()
[all …]
DQualityOfServiceTests.cpp55 std::function<MaybeResults(const std::shared_ptr<IPreparedModel>& preparedModel,
107 const std::shared_ptr<IPreparedModel> preparedModel = preparedModelCallback->getPreparedModel(); in runPrepareModelTest() local
115 ASSERT_EQ(nullptr, preparedModel.get()); in runPrepareModelTest()
140 ASSERT_EQ(prepareReturnStatus == ErrorStatus::NONE, preparedModel.get() != nullptr); in runPrepareModelTest()
158 static MaybeResults executeSynchronously(const std::shared_ptr<IPreparedModel>& preparedModel, in executeSynchronously() argument
165 const auto ret = preparedModel->executeSynchronously(request, measure, deadlineNs, in executeSynchronously()
184 static MaybeResults executeBurst(const std::shared_ptr<IPreparedModel>& preparedModel, in executeBurst() argument
191 auto ret = preparedModel->configureExecutionBurst(&burst); in executeBurst()
222 void runExecutionTest(const std::shared_ptr<IPreparedModel>& preparedModel, in runExecutionTest() argument
230 const auto results = execute(preparedModel, request, deadlineNs); in runExecutionTest()
[all …]
/hardware/interfaces/neuralnetworks/utils/common/test/
DResilientPreparedModelTest.cpp95 const auto [mockPreparedModel, mockPreparedModelFactory, preparedModel] = setup(); in TEST()
98 const auto result = preparedModel->getPreparedModel(); in TEST()
106 const auto [mockPreparedModel, mockPreparedModelFactory, preparedModel] = setup(); in TEST()
112 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
121 const auto [mockPreparedModel, mockPreparedModelFactory, preparedModel] = setup(); in TEST()
125 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
134 const auto [mockPreparedModel, mockPreparedModelFactory, preparedModel] = setup(); in TEST()
140 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
149 const auto [mockPreparedModel, mockPreparedModelFactory, preparedModel] = setup(); in TEST()
160 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
[all …]
/hardware/interfaces/neuralnetworks/1.3/vts/functional/
DVtsHalNeuralnetworks.cpp40 sp<IPreparedModel>* preparedModel, bool reportSkipping) { in createPreparedModel() argument
41 ASSERT_NE(nullptr, preparedModel); in createPreparedModel()
42 *preparedModel = nullptr; in createPreparedModel()
66 *preparedModel = getPreparedModel_1_3(preparedModelCallback); in createPreparedModel()
76 ASSERT_EQ(nullptr, preparedModel->get()); in createPreparedModel()
89 ASSERT_NE(nullptr, preparedModel->get()); in createPreparedModel()
130 void validateRequest(const sp<IPreparedModel>& preparedModel, const Request& request);
132 void validateRequestFailure(const sp<IPreparedModel>& preparedModel, const Request& request);
134 void validateBurst(const sp<IPreparedModel>& preparedModel, const V1_0::Request& request);
137 void validateExecuteFenced(const sp<IPreparedModel>& preparedModel, const Request& request) { in validateExecuteFenced() argument
[all …]
DValidateRequest.cpp48 static void validate(const sp<IPreparedModel>& preparedModel, const std::string& message, in validate() argument
69 preparedModel->execute_1_3(request, measure, {}, {}, executionCallback); in validate()
86 Return<void> executeStatus = preparedModel->executeSynchronously_1_3( in validate()
107 android::nn::ExecutionBurstController::create(preparedModel, in validate()
142 preparedModel->executeFenced(request, {}, MeasureTiming::NO, {}, {}, {}, in validate()
155 static void removeInputTest(const sp<IPreparedModel>& preparedModel, const Request& request) { in removeInputTest() argument
158 validate(preparedModel, message, request, in removeInputTest()
165 static void removeOutputTest(const sp<IPreparedModel>& preparedModel, const Request& request) { in removeOutputTest() argument
168 validate(preparedModel, message, request, in removeOutputTest()
175 void validateRequest(const sp<IPreparedModel>& preparedModel, const Request& request) { in validateRequest() argument
[all …]
/hardware/interfaces/neuralnetworks/1.2/utils/test/
DPreparedModelTest.cpp150 const auto preparedModel = in TEST() local
157 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
167 const auto preparedModel = in TEST() local
175 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
185 const auto preparedModel = in TEST() local
192 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
202 const auto preparedModel = in TEST() local
209 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
219 const auto preparedModel = in TEST() local
227 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
[all …]
/hardware/interfaces/neuralnetworks/1.1/vts/functional/
DValidateRequest.cpp38 static void validate(const sp<IPreparedModel>& preparedModel, const std::string& message, in validate() argument
45 Return<ErrorStatus> executeLaunchStatus = preparedModel->execute(request, executionCallback); in validate()
56 static void removeInputTest(const sp<IPreparedModel>& preparedModel, const Request& request) { in removeInputTest() argument
59 validate(preparedModel, message, request, in removeInputTest()
66 static void removeOutputTest(const sp<IPreparedModel>& preparedModel, const Request& request) { in removeOutputTest() argument
69 validate(preparedModel, message, request, in removeOutputTest()
76 void validateRequest(const sp<IPreparedModel>& preparedModel, const Request& request) { in validateRequest() argument
77 removeInputTest(preparedModel, request); in validateRequest()
78 removeOutputTest(preparedModel, request); in validateRequest()
DVtsHalNeuralnetworks.cpp37 sp<IPreparedModel>* preparedModel) { in createPreparedModel() argument
38 ASSERT_NE(nullptr, preparedModel); in createPreparedModel()
39 *preparedModel = nullptr; in createPreparedModel()
62 *preparedModel = preparedModelCallback->getPreparedModel(); in createPreparedModel()
72 ASSERT_EQ(nullptr, preparedModel->get()); in createPreparedModel()
81 ASSERT_NE(nullptr, preparedModel->get()); in createPreparedModel()
122 void validateRequest(const sp<V1_0::IPreparedModel>& preparedModel, const V1_0::Request& request);
128 sp<IPreparedModel> preparedModel; in validateEverything() local
129 createPreparedModel(device, model, &preparedModel); in validateEverything()
130 if (preparedModel == nullptr) return; in validateEverything()
[all …]
/hardware/interfaces/neuralnetworks/1.0/utils/test/
DPreparedModelTest.cpp118 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
124 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
134 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
141 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
151 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
158 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
168 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
174 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
184 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
190 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
[all …]
/hardware/interfaces/neuralnetworks/aidl/utils/test/
DPreparedModelTest.cpp83 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
95 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
105 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
111 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
121 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
127 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
137 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
143 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
153 const auto preparedModel = PreparedModel::create(mockPreparedModel).value(); in TEST() local
164 const auto result = preparedModel->executeFenced({}, {}, {}, {}, {}, {}); in TEST()
[all …]
/hardware/interfaces/neuralnetworks/1.3/utils/test/
DPreparedModelTest.cpp178 const auto preparedModel = in TEST() local
185 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
195 const auto preparedModel = in TEST() local
203 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
213 const auto preparedModel = in TEST() local
220 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
230 const auto preparedModel = in TEST() local
237 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
247 const auto preparedModel = in TEST() local
255 const auto result = preparedModel->execute({}, {}, {}, {}); in TEST()
[all …]
/hardware/interfaces/neuralnetworks/1.0/vts/functional/
DValidateRequest.cpp34 static void validate(const sp<IPreparedModel>& preparedModel, const std::string& message, in validate() argument
41 Return<ErrorStatus> executeLaunchStatus = preparedModel->execute(request, executionCallback); in validate()
72 static void removeInputTest(const sp<IPreparedModel>& preparedModel, const Request& request) { in removeInputTest() argument
75 validate(preparedModel, message, request, in removeInputTest()
82 static void removeOutputTest(const sp<IPreparedModel>& preparedModel, const Request& request) { in removeOutputTest() argument
85 validate(preparedModel, message, request, in removeOutputTest()
92 void validateRequest(const sp<IPreparedModel>& preparedModel, const Request& request) { in validateRequest() argument
93 removeInputTest(preparedModel, request); in validateRequest()
94 removeOutputTest(preparedModel, request); in validateRequest()
DVtsHalNeuralnetworks.cpp34 sp<IPreparedModel>* preparedModel) { in createPreparedModel() argument
35 ASSERT_NE(nullptr, preparedModel); in createPreparedModel()
36 *preparedModel = nullptr; in createPreparedModel()
59 *preparedModel = preparedModelCallback->getPreparedModel(); in createPreparedModel()
69 ASSERT_EQ(nullptr, preparedModel->get()); in createPreparedModel()
78 ASSERT_NE(nullptr, preparedModel->get()); in createPreparedModel()
119 void validateRequest(const sp<IPreparedModel>& preparedModel, const Request& request);
125 sp<IPreparedModel> preparedModel; in validateEverything() local
126 createPreparedModel(device, model, &preparedModel); in validateEverything()
127 if (preparedModel == nullptr) return; in validateEverything()
[all …]
/hardware/interfaces/neuralnetworks/1.3/utils/src/
DCallbacks.cpp51 V1_0::ErrorStatus status, const sp<V1_0::IPreparedModel>& preparedModel) { in prepareModelCallback() argument
53 V1_3::IPreparedModel::castFrom(preparedModel).withDefault(nullptr)) { in prepareModelCallback()
58 V1_2::IPreparedModel::castFrom(preparedModel).withDefault(nullptr)) { in prepareModelCallback()
61 return V1_0::utils::prepareModelCallback(status, preparedModel); in prepareModelCallback()
79 ErrorStatus status, const sp<IPreparedModel>& preparedModel) { in prepareModelCallback() argument
81 return NN_TRY(PreparedModel::create(preparedModel, /*executeSynchronously=*/true)); in prepareModelCallback()
99 const sp<V1_0::IPreparedModel>& preparedModel) { in notify() argument
100 mData.put(prepareModelCallback(status, preparedModel)); in notify()
105 const sp<V1_2::IPreparedModel>& preparedModel) { in notify_1_2() argument
106 mData.put(prepareModelCallback(status, preparedModel)); in notify_1_2()
[all …]
/hardware/interfaces/neuralnetworks/1.2/utils/src/
DCallbacks.cpp47 V1_0::ErrorStatus status, const sp<V1_0::IPreparedModel>& preparedModel) { in prepareModelCallback() argument
49 V1_2::IPreparedModel::castFrom(preparedModel).withDefault(nullptr)) { in prepareModelCallback()
52 return V1_0::utils::prepareModelCallback(status, preparedModel); in prepareModelCallback()
64 V1_0::ErrorStatus status, const sp<IPreparedModel>& preparedModel) { in prepareModelCallback() argument
66 return NN_TRY(PreparedModel::create(preparedModel, /*executeSynchronously=*/true)); in prepareModelCallback()
83 const sp<V1_0::IPreparedModel>& preparedModel) { in notify() argument
84 mData.put(prepareModelCallback(status, preparedModel)); in notify()
89 const sp<IPreparedModel>& preparedModel) { in notify_1_2() argument
90 mData.put(prepareModelCallback(status, preparedModel)); in notify_1_2()
/hardware/interfaces/neuralnetworks/1.0/utils/src/
DExecution.cpp43 std::shared_ptr<const PreparedModel> preparedModel, Request request, in create() argument
45 if (preparedModel == nullptr) { in create()
49 return std::make_shared<const Execution>(PrivateConstructorTag{}, std::move(preparedModel), in create()
54 std::shared_ptr<const PreparedModel> preparedModel, Request request, in Execution() argument
56 : kPreparedModel(std::move(preparedModel)), in Execution()
DBurst.cpp33 nn::SharedPreparedModel preparedModel) { in create() argument
34 if (preparedModel == nullptr) { in create()
39 return std::make_shared<const Burst>(PrivateConstructorTag{}, std::move(preparedModel)); in create()
42 Burst::Burst(PrivateConstructorTag /*tag*/, nn::SharedPreparedModel preparedModel) in Burst() argument
43 : kPreparedModel(std::move(preparedModel)) { in Burst()
/hardware/interfaces/neuralnetworks/aidl/utils/src/
DCallbacks.cpp40 ErrorStatus status, const std::shared_ptr<IPreparedModel>& preparedModel) { in prepareModelCallback() argument
42 return NN_TRY(PreparedModel::create(preparedModel)); in prepareModelCallback()
48 ErrorStatus status, const std::shared_ptr<IPreparedModel>& preparedModel) { in notify() argument
49 mData.put(prepareModelCallback(status, preparedModel)); in notify()

1234