Add memory domain VTS validation tests. am: 5b0c58d1fb am: 4f4e7420be

Change-Id: Id8ca5ae4b86ef0de639ac708115f99dbcc72fe40
This commit is contained in:
Xusong Wang 2020-03-27 21:32:47 +00:00 committed by Automerger Merge Worker
commit ee8a380fda
5 changed files with 1186 additions and 2 deletions

View file

@ -40,6 +40,7 @@ cc_test {
"BasicTests.cpp",
"CompilationCachingTests.cpp",
"GeneratedTestHarness.cpp",
"MemoryDomainTests.cpp",
"QualityOfServiceTests.cpp",
"TestAssertions.cpp",
"ValidateBurst.cpp",

View file

@ -72,8 +72,6 @@ using HidlToken = hidl_array<uint8_t, static_cast<uint32_t>(Constant::BYTE_SIZE_
namespace {
enum class Executor { ASYNC, SYNC, BURST, FENCED };
enum class OutputType { FULLY_SPECIFIED, UNSPECIFIED, INSUFFICIENT, MISSED_DEADLINE };
enum class MemoryType { SHARED, DEVICE };

File diff suppressed because it is too large Load diff

View file

@ -192,4 +192,19 @@ sp<IPreparedModel> getPreparedModel_1_3(const sp<PreparedModelCallback>& callbac
return IPreparedModel::castFrom(preparedModelV1_0).withDefault(nullptr);
}
std::string toString(Executor executor) {
switch (executor) {
case Executor::ASYNC:
return "ASYNC";
case Executor::SYNC:
return "SYNC";
case Executor::BURST:
return "BURST";
case Executor::FENCED:
return "FENCED";
default:
CHECK(false);
}
}
} // namespace android::hardware::neuralnetworks::V1_3::vts::functional

View file

@ -52,6 +52,10 @@ void createPreparedModel(const sp<IDevice>& device, const Model& model,
// Utility function to get PreparedModel from callback and downcast to V1_2.
sp<IPreparedModel> getPreparedModel_1_3(const sp<implementation::PreparedModelCallback>& callback);
enum class Executor { ASYNC, SYNC, BURST, FENCED };
std::string toString(Executor executor);
} // namespace android::hardware::neuralnetworks::V1_3::vts::functional
#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_3_VTS_HAL_NEURALNETWORKS_H