blob: 416744f902e4d79843708a70391cdd0f3b80b63f [file] [log] [blame]
Michael Butler20f28a22019-04-26 17:46:08 -07001/*
Michael Butler0a1ad962019-04-30 13:51:24 -07002 * Copyright (C) 2019 The Android Open Source Project
Michael Butler20f28a22019-04-26 17:46:08 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#define LOG_TAG "neuralnetworks_hidl_hal_test"
18
19#include "VtsHalNeuralnetworks.h"
20
Slava Shklyaev73ee79d2019-05-14 14:15:14 +010021#include "1.2/Callbacks.h"
Michael Butler20f28a22019-04-26 17:46:08 -070022#include "ExecutionBurstController.h"
23#include "ExecutionBurstServer.h"
Xusong Wangbcaa7822019-08-23 16:10:54 -070024#include "GeneratedTestHarness.h"
Michael Butler20f28a22019-04-26 17:46:08 -070025#include "TestHarness.h"
26#include "Utils.h"
27
28#include <android-base/logging.h>
Michael Butler648ada52019-07-25 17:22:11 -070029#include <chrono>
Michael Butlerddb770f2019-05-02 18:16:13 -070030#include <cstring>
Michael Butler20f28a22019-04-26 17:46:08 -070031
Michael Butler62749b92019-08-26 23:55:47 -070032namespace android::hardware::neuralnetworks::V1_2::vts::functional {
Michael Butler20f28a22019-04-26 17:46:08 -070033
Michael Butler62749b92019-08-26 23:55:47 -070034using nn::ExecutionBurstController;
35using nn::RequestChannelSender;
36using nn::ResultChannelReceiver;
37using V1_0::ErrorStatus;
38using V1_0::Request;
39using ExecutionBurstCallback = ExecutionBurstController::ExecutionBurstCallback;
Michael Butler20f28a22019-04-26 17:46:08 -070040
Michael Butler0a1ad962019-04-30 13:51:24 -070041// This constant value represents the length of an FMQ that is large enough to
42// return a result from a burst execution for all of the generated test cases.
Michael Butler20f28a22019-04-26 17:46:08 -070043constexpr size_t kExecutionBurstChannelLength = 1024;
Michael Butler0a1ad962019-04-30 13:51:24 -070044
45// This constant value represents a length of an FMQ that is not large enough
46// to return a result from a burst execution for some of the generated test
47// cases.
Michael Butler20f28a22019-04-26 17:46:08 -070048constexpr size_t kExecutionBurstChannelSmallLength = 8;
49
50///////////////////////// UTILITY FUNCTIONS /////////////////////////
51
52static bool badTiming(Timing timing) {
53 return timing.timeOnDevice == UINT64_MAX && timing.timeInDriver == UINT64_MAX;
54}
55
56static void createBurst(const sp<IPreparedModel>& preparedModel, const sp<IBurstCallback>& callback,
57 std::unique_ptr<RequestChannelSender>* sender,
58 std::unique_ptr<ResultChannelReceiver>* receiver,
Michael Butler0a1ad962019-04-30 13:51:24 -070059 sp<IBurstContext>* context,
60 size_t resultChannelLength = kExecutionBurstChannelLength) {
Michael Butler20f28a22019-04-26 17:46:08 -070061 ASSERT_NE(nullptr, preparedModel.get());
62 ASSERT_NE(nullptr, sender);
63 ASSERT_NE(nullptr, receiver);
64 ASSERT_NE(nullptr, context);
65
66 // create FMQ objects
67 auto [fmqRequestChannel, fmqRequestDescriptor] =
Michael Butler648ada52019-07-25 17:22:11 -070068 RequestChannelSender::create(kExecutionBurstChannelLength);
Michael Butler20f28a22019-04-26 17:46:08 -070069 auto [fmqResultChannel, fmqResultDescriptor] =
Michael Butler648ada52019-07-25 17:22:11 -070070 ResultChannelReceiver::create(resultChannelLength, std::chrono::microseconds{0});
Michael Butler20f28a22019-04-26 17:46:08 -070071 ASSERT_NE(nullptr, fmqRequestChannel.get());
72 ASSERT_NE(nullptr, fmqResultChannel.get());
73 ASSERT_NE(nullptr, fmqRequestDescriptor);
74 ASSERT_NE(nullptr, fmqResultDescriptor);
75
76 // configure burst
77 ErrorStatus errorStatus;
78 sp<IBurstContext> burstContext;
79 const Return<void> ret = preparedModel->configureExecutionBurst(
80 callback, *fmqRequestDescriptor, *fmqResultDescriptor,
81 [&errorStatus, &burstContext](ErrorStatus status, const sp<IBurstContext>& context) {
82 errorStatus = status;
83 burstContext = context;
84 });
85 ASSERT_TRUE(ret.isOk());
86 ASSERT_EQ(ErrorStatus::NONE, errorStatus);
87 ASSERT_NE(nullptr, burstContext.get());
88
89 // return values
90 *sender = std::move(fmqRequestChannel);
91 *receiver = std::move(fmqResultChannel);
92 *context = burstContext;
93}
94
95static void createBurstWithResultChannelLength(
Michael Butler0a1ad962019-04-30 13:51:24 -070096 const sp<IPreparedModel>& preparedModel, size_t resultChannelLength,
97 std::shared_ptr<ExecutionBurstController>* controller) {
Michael Butler20f28a22019-04-26 17:46:08 -070098 ASSERT_NE(nullptr, preparedModel.get());
99 ASSERT_NE(nullptr, controller);
100
101 // create FMQ objects
Michael Butler0a1ad962019-04-30 13:51:24 -0700102 std::unique_ptr<RequestChannelSender> sender;
103 std::unique_ptr<ResultChannelReceiver> receiver;
Michael Butler20f28a22019-04-26 17:46:08 -0700104 sp<ExecutionBurstCallback> callback = new ExecutionBurstCallback();
Michael Butler0a1ad962019-04-30 13:51:24 -0700105 sp<IBurstContext> context;
106 ASSERT_NO_FATAL_FAILURE(createBurst(preparedModel, callback, &sender, &receiver, &context,
107 resultChannelLength));
108 ASSERT_NE(nullptr, sender.get());
109 ASSERT_NE(nullptr, receiver.get());
110 ASSERT_NE(nullptr, context.get());
Michael Butler20f28a22019-04-26 17:46:08 -0700111
112 // return values
Michael Butler0a1ad962019-04-30 13:51:24 -0700113 *controller = std::make_shared<ExecutionBurstController>(std::move(sender), std::move(receiver),
114 context, callback);
Michael Butler20f28a22019-04-26 17:46:08 -0700115}
116
117// Primary validation function. This function will take a valid serialized
118// request, apply a mutation to it to invalidate the serialized request, then
119// pass it to interface calls that use the serialized request. Note that the
120// serialized request here is passed by value, and any mutation to the
121// serialized request does not leave this function.
122static void validate(RequestChannelSender* sender, ResultChannelReceiver* receiver,
123 const std::string& message, std::vector<FmqRequestDatum> serialized,
124 const std::function<void(std::vector<FmqRequestDatum>*)>& mutation) {
125 mutation(&serialized);
126
127 // skip if packet is too large to send
128 if (serialized.size() > kExecutionBurstChannelLength) {
129 return;
130 }
131
132 SCOPED_TRACE(message);
133
134 // send invalid packet
Michael Butler0a1ad962019-04-30 13:51:24 -0700135 ASSERT_TRUE(sender->sendPacket(serialized));
Michael Butler20f28a22019-04-26 17:46:08 -0700136
137 // receive error
138 auto results = receiver->getBlocking();
139 ASSERT_TRUE(results.has_value());
140 const auto [status, outputShapes, timing] = std::move(*results);
141 EXPECT_NE(ErrorStatus::NONE, status);
142 EXPECT_EQ(0u, outputShapes.size());
143 EXPECT_TRUE(badTiming(timing));
144}
145
Michael Butler0a1ad962019-04-30 13:51:24 -0700146// For validation, valid packet entries are mutated to invalid packet entries,
147// or invalid packet entries are inserted into valid packets. This function
148// creates pre-set invalid packet entries for convenience.
149static std::vector<FmqRequestDatum> createBadRequestPacketEntries() {
Michael Butler20f28a22019-04-26 17:46:08 -0700150 const FmqRequestDatum::PacketInformation packetInformation = {
151 /*.packetSize=*/10, /*.numberOfInputOperands=*/10, /*.numberOfOutputOperands=*/10,
152 /*.numberOfPools=*/10};
153 const FmqRequestDatum::OperandInformation operandInformation = {
154 /*.hasNoValue=*/false, /*.location=*/{}, /*.numberOfDimensions=*/10};
155 const int32_t invalidPoolIdentifier = std::numeric_limits<int32_t>::max();
Michael Butler0a1ad962019-04-30 13:51:24 -0700156 std::vector<FmqRequestDatum> bad(7);
157 bad[0].packetInformation(packetInformation);
158 bad[1].inputOperandInformation(operandInformation);
159 bad[2].inputOperandDimensionValue(0);
160 bad[3].outputOperandInformation(operandInformation);
161 bad[4].outputOperandDimensionValue(0);
162 bad[5].poolIdentifier(invalidPoolIdentifier);
163 bad[6].measureTiming(MeasureTiming::YES);
164 return bad;
Michael Butler20f28a22019-04-26 17:46:08 -0700165}
166
Michael Butler0a1ad962019-04-30 13:51:24 -0700167// For validation, valid packet entries are mutated to invalid packet entries,
168// or invalid packet entries are inserted into valid packets. This function
169// retrieves pre-set invalid packet entries for convenience. This function
170// caches these data so they can be reused on subsequent validation checks.
171static const std::vector<FmqRequestDatum>& getBadRequestPacketEntries() {
172 static const std::vector<FmqRequestDatum> bad = createBadRequestPacketEntries();
173 return bad;
Michael Butler20f28a22019-04-26 17:46:08 -0700174}
175
176///////////////////////// REMOVE DATUM ////////////////////////////////////
177
178static void removeDatumTest(RequestChannelSender* sender, ResultChannelReceiver* receiver,
179 const std::vector<FmqRequestDatum>& serialized) {
180 for (size_t index = 0; index < serialized.size(); ++index) {
181 const std::string message = "removeDatum: removed datum at index " + std::to_string(index);
182 validate(sender, receiver, message, serialized,
183 [index](std::vector<FmqRequestDatum>* serialized) {
184 serialized->erase(serialized->begin() + index);
185 });
186 }
187}
188
189///////////////////////// ADD DATUM ////////////////////////////////////
190
191static void addDatumTest(RequestChannelSender* sender, ResultChannelReceiver* receiver,
192 const std::vector<FmqRequestDatum>& serialized) {
Michael Butler0a1ad962019-04-30 13:51:24 -0700193 const std::vector<FmqRequestDatum>& extra = getBadRequestPacketEntries();
Michael Butler20f28a22019-04-26 17:46:08 -0700194 for (size_t index = 0; index <= serialized.size(); ++index) {
195 for (size_t type = 0; type < extra.size(); ++type) {
196 const std::string message = "addDatum: added datum type " + std::to_string(type) +
197 " at index " + std::to_string(index);
198 validate(sender, receiver, message, serialized,
199 [index, type, &extra](std::vector<FmqRequestDatum>* serialized) {
200 serialized->insert(serialized->begin() + index, extra[type]);
201 });
202 }
203 }
204}
205
206///////////////////////// MUTATE DATUM ////////////////////////////////////
207
208static bool interestingCase(const FmqRequestDatum& lhs, const FmqRequestDatum& rhs) {
209 using Discriminator = FmqRequestDatum::hidl_discriminator;
210
211 const bool differentValues = (lhs != rhs);
Michael Butler0a1ad962019-04-30 13:51:24 -0700212 const bool sameDiscriminator = (lhs.getDiscriminator() == rhs.getDiscriminator());
Michael Butler20f28a22019-04-26 17:46:08 -0700213 const auto discriminator = rhs.getDiscriminator();
214 const bool isDimensionValue = (discriminator == Discriminator::inputOperandDimensionValue ||
215 discriminator == Discriminator::outputOperandDimensionValue);
216
Michael Butler0a1ad962019-04-30 13:51:24 -0700217 return differentValues && !(sameDiscriminator && isDimensionValue);
Michael Butler20f28a22019-04-26 17:46:08 -0700218}
219
220static void mutateDatumTest(RequestChannelSender* sender, ResultChannelReceiver* receiver,
221 const std::vector<FmqRequestDatum>& serialized) {
Michael Butler0a1ad962019-04-30 13:51:24 -0700222 const std::vector<FmqRequestDatum>& change = getBadRequestPacketEntries();
Michael Butler20f28a22019-04-26 17:46:08 -0700223 for (size_t index = 0; index < serialized.size(); ++index) {
224 for (size_t type = 0; type < change.size(); ++type) {
225 if (interestingCase(serialized[index], change[type])) {
226 const std::string message = "mutateDatum: changed datum at index " +
227 std::to_string(index) + " to datum type " +
228 std::to_string(type);
229 validate(sender, receiver, message, serialized,
230 [index, type, &change](std::vector<FmqRequestDatum>* serialized) {
231 (*serialized)[index] = change[type];
232 });
233 }
234 }
235 }
236}
237
238///////////////////////// BURST VALIATION TESTS ////////////////////////////////////
239
240static void validateBurstSerialization(const sp<IPreparedModel>& preparedModel,
Xusong Wang6d0270b2019-08-09 16:45:24 -0700241 const Request& request) {
Michael Butler20f28a22019-04-26 17:46:08 -0700242 // create burst
243 std::unique_ptr<RequestChannelSender> sender;
244 std::unique_ptr<ResultChannelReceiver> receiver;
245 sp<ExecutionBurstCallback> callback = new ExecutionBurstCallback();
246 sp<IBurstContext> context;
247 ASSERT_NO_FATAL_FAILURE(createBurst(preparedModel, callback, &sender, &receiver, &context));
248 ASSERT_NE(nullptr, sender.get());
249 ASSERT_NE(nullptr, receiver.get());
250 ASSERT_NE(nullptr, context.get());
251
Xusong Wang6d0270b2019-08-09 16:45:24 -0700252 // load memory into callback slots
253 std::vector<intptr_t> keys;
254 keys.reserve(request.pools.size());
255 std::transform(request.pools.begin(), request.pools.end(), std::back_inserter(keys),
256 [](const auto& pool) { return reinterpret_cast<intptr_t>(&pool); });
257 const std::vector<int32_t> slots = callback->getSlots(request.pools, keys);
Michael Butler20f28a22019-04-26 17:46:08 -0700258
Xusong Wang6d0270b2019-08-09 16:45:24 -0700259 // ensure slot std::numeric_limits<int32_t>::max() doesn't exist (for
260 // subsequent slot validation testing)
261 ASSERT_TRUE(std::all_of(slots.begin(), slots.end(), [](int32_t slot) {
262 return slot != std::numeric_limits<int32_t>::max();
263 }));
Michael Butler20f28a22019-04-26 17:46:08 -0700264
Xusong Wang6d0270b2019-08-09 16:45:24 -0700265 // serialize the request
Michael Butler07633282019-08-29 11:08:25 -0700266 const auto serialized = android::nn::serialize(request, MeasureTiming::YES, slots);
Michael Butler20f28a22019-04-26 17:46:08 -0700267
Xusong Wang6d0270b2019-08-09 16:45:24 -0700268 // validations
269 removeDatumTest(sender.get(), receiver.get(), serialized);
270 addDatumTest(sender.get(), receiver.get(), serialized);
271 mutateDatumTest(sender.get(), receiver.get(), serialized);
Michael Butler20f28a22019-04-26 17:46:08 -0700272}
273
Michael Butler0a1ad962019-04-30 13:51:24 -0700274// This test validates that when the Result message size exceeds length of the
275// result FMQ, the service instance gracefully fails and returns an error.
Michael Butler20f28a22019-04-26 17:46:08 -0700276static void validateBurstFmqLength(const sp<IPreparedModel>& preparedModel,
Xusong Wang6d0270b2019-08-09 16:45:24 -0700277 const Request& request) {
Michael Butler20f28a22019-04-26 17:46:08 -0700278 // create regular burst
279 std::shared_ptr<ExecutionBurstController> controllerRegular;
Michael Butler0a1ad962019-04-30 13:51:24 -0700280 ASSERT_NO_FATAL_FAILURE(createBurstWithResultChannelLength(
281 preparedModel, kExecutionBurstChannelLength, &controllerRegular));
Michael Butler20f28a22019-04-26 17:46:08 -0700282 ASSERT_NE(nullptr, controllerRegular.get());
283
284 // create burst with small output channel
285 std::shared_ptr<ExecutionBurstController> controllerSmall;
Michael Butler0a1ad962019-04-30 13:51:24 -0700286 ASSERT_NO_FATAL_FAILURE(createBurstWithResultChannelLength(
287 preparedModel, kExecutionBurstChannelSmallLength, &controllerSmall));
Michael Butler20f28a22019-04-26 17:46:08 -0700288 ASSERT_NE(nullptr, controllerSmall.get());
289
Xusong Wang6d0270b2019-08-09 16:45:24 -0700290 // load memory into callback slots
291 std::vector<intptr_t> keys(request.pools.size());
292 for (size_t i = 0; i < keys.size(); ++i) {
293 keys[i] = reinterpret_cast<intptr_t>(&request.pools[i]);
Michael Butler20f28a22019-04-26 17:46:08 -0700294 }
Xusong Wang6d0270b2019-08-09 16:45:24 -0700295
296 // collect serialized result by running regular burst
Michael Butler648ada52019-07-25 17:22:11 -0700297 const auto [nRegular, outputShapesRegular, timingRegular, fallbackRegular] =
Xusong Wang6d0270b2019-08-09 16:45:24 -0700298 controllerRegular->compute(request, MeasureTiming::NO, keys);
Michael Butler648ada52019-07-25 17:22:11 -0700299 const ErrorStatus statusRegular = nn::convertResultCodeToErrorStatus(nRegular);
300 EXPECT_FALSE(fallbackRegular);
Xusong Wang6d0270b2019-08-09 16:45:24 -0700301
302 // skip test if regular burst output isn't useful for testing a failure
303 // caused by having too small of a length for the result FMQ
304 const std::vector<FmqResultDatum> serialized =
Michael Butler07633282019-08-29 11:08:25 -0700305 android::nn::serialize(statusRegular, outputShapesRegular, timingRegular);
Xusong Wang6d0270b2019-08-09 16:45:24 -0700306 if (statusRegular != ErrorStatus::NONE ||
307 serialized.size() <= kExecutionBurstChannelSmallLength) {
308 return;
309 }
310
311 // by this point, execution should fail because the result channel isn't
312 // large enough to return the serialized result
Michael Butler648ada52019-07-25 17:22:11 -0700313 const auto [nSmall, outputShapesSmall, timingSmall, fallbackSmall] =
Xusong Wang6d0270b2019-08-09 16:45:24 -0700314 controllerSmall->compute(request, MeasureTiming::NO, keys);
Michael Butler648ada52019-07-25 17:22:11 -0700315 const ErrorStatus statusSmall = nn::convertResultCodeToErrorStatus(nSmall);
Xusong Wang6d0270b2019-08-09 16:45:24 -0700316 EXPECT_NE(ErrorStatus::NONE, statusSmall);
317 EXPECT_EQ(0u, outputShapesSmall.size());
318 EXPECT_TRUE(badTiming(timingSmall));
Michael Butler648ada52019-07-25 17:22:11 -0700319 EXPECT_FALSE(fallbackSmall);
Michael Butler20f28a22019-04-26 17:46:08 -0700320}
321
Michael Butlerddb770f2019-05-02 18:16:13 -0700322static bool isSanitized(const FmqResultDatum& datum) {
323 using Discriminator = FmqResultDatum::hidl_discriminator;
324
325 // check to ensure the padding values in the returned
326 // FmqResultDatum::OperandInformation are initialized to 0
327 if (datum.getDiscriminator() == Discriminator::operandInformation) {
328 static_assert(
329 offsetof(FmqResultDatum::OperandInformation, isSufficient) == 0,
330 "unexpected value for offset of FmqResultDatum::OperandInformation::isSufficient");
331 static_assert(
332 sizeof(FmqResultDatum::OperandInformation::isSufficient) == 1,
333 "unexpected value for size of FmqResultDatum::OperandInformation::isSufficient");
334 static_assert(offsetof(FmqResultDatum::OperandInformation, numberOfDimensions) == 4,
335 "unexpected value for offset of "
336 "FmqResultDatum::OperandInformation::numberOfDimensions");
337 static_assert(sizeof(FmqResultDatum::OperandInformation::numberOfDimensions) == 4,
338 "unexpected value for size of "
339 "FmqResultDatum::OperandInformation::numberOfDimensions");
340 static_assert(sizeof(FmqResultDatum::OperandInformation) == 8,
341 "unexpected value for size of "
342 "FmqResultDatum::OperandInformation");
343
344 constexpr size_t paddingOffset =
345 offsetof(FmqResultDatum::OperandInformation, isSufficient) +
346 sizeof(FmqResultDatum::OperandInformation::isSufficient);
347 constexpr size_t paddingSize =
348 offsetof(FmqResultDatum::OperandInformation, numberOfDimensions) - paddingOffset;
349
350 FmqResultDatum::OperandInformation initialized{};
351 std::memset(&initialized, 0, sizeof(initialized));
352
353 const char* initializedPaddingStart =
354 reinterpret_cast<const char*>(&initialized) + paddingOffset;
355 const char* datumPaddingStart =
356 reinterpret_cast<const char*>(&datum.operandInformation()) + paddingOffset;
357
358 return std::memcmp(datumPaddingStart, initializedPaddingStart, paddingSize) == 0;
359 }
360
361 // there are no other padding initialization checks required, so return true
362 // for any sum-type that isn't FmqResultDatum::OperandInformation
363 return true;
364}
365
366static void validateBurstSanitized(const sp<IPreparedModel>& preparedModel,
Xusong Wang323ba2e2019-08-19 10:37:18 -0700367 const Request& request) {
Michael Butlerddb770f2019-05-02 18:16:13 -0700368 // create burst
369 std::unique_ptr<RequestChannelSender> sender;
370 std::unique_ptr<ResultChannelReceiver> receiver;
371 sp<ExecutionBurstCallback> callback = new ExecutionBurstCallback();
372 sp<IBurstContext> context;
373 ASSERT_NO_FATAL_FAILURE(createBurst(preparedModel, callback, &sender, &receiver, &context));
374 ASSERT_NE(nullptr, sender.get());
375 ASSERT_NE(nullptr, receiver.get());
376 ASSERT_NE(nullptr, context.get());
377
Xusong Wang323ba2e2019-08-19 10:37:18 -0700378 // load memory into callback slots
379 std::vector<intptr_t> keys;
380 keys.reserve(request.pools.size());
381 std::transform(request.pools.begin(), request.pools.end(), std::back_inserter(keys),
382 [](const auto& pool) { return reinterpret_cast<intptr_t>(&pool); });
383 const std::vector<int32_t> slots = callback->getSlots(request.pools, keys);
Michael Butlerddb770f2019-05-02 18:16:13 -0700384
Xusong Wang323ba2e2019-08-19 10:37:18 -0700385 // send valid request
386 ASSERT_TRUE(sender->send(request, MeasureTiming::YES, slots));
Michael Butlerddb770f2019-05-02 18:16:13 -0700387
Xusong Wang323ba2e2019-08-19 10:37:18 -0700388 // receive valid result
389 auto serialized = receiver->getPacketBlocking();
390 ASSERT_TRUE(serialized.has_value());
Michael Butlerddb770f2019-05-02 18:16:13 -0700391
Xusong Wang323ba2e2019-08-19 10:37:18 -0700392 // sanitize result
393 ASSERT_TRUE(std::all_of(serialized->begin(), serialized->end(), isSanitized))
394 << "The result serialized data is not properly sanitized";
Michael Butlerddb770f2019-05-02 18:16:13 -0700395}
396
Michael Butler20f28a22019-04-26 17:46:08 -0700397///////////////////////////// ENTRY POINT //////////////////////////////////
398
Michael Butler13b05162019-08-29 22:17:24 -0700399void validateBurst(const sp<IPreparedModel>& preparedModel, const Request& request) {
Xusong Wang6d0270b2019-08-09 16:45:24 -0700400 ASSERT_NO_FATAL_FAILURE(validateBurstSerialization(preparedModel, request));
401 ASSERT_NO_FATAL_FAILURE(validateBurstFmqLength(preparedModel, request));
Xusong Wang323ba2e2019-08-19 10:37:18 -0700402 ASSERT_NO_FATAL_FAILURE(validateBurstSanitized(preparedModel, request));
Michael Butler20f28a22019-04-26 17:46:08 -0700403}
404
Michael Butler62749b92019-08-26 23:55:47 -0700405} // namespace android::hardware::neuralnetworks::V1_2::vts::functional