Loading neuralnetworks/1.0/vts/functional/BasicTests.cpp +9 −19 Original line number Diff line number Diff line Loading @@ -18,12 +18,7 @@ #include "VtsHalNeuralnetworks.h" namespace android { namespace hardware { namespace neuralnetworks { namespace V1_0 { namespace vts { namespace functional { namespace android::hardware::neuralnetworks::V1_0::vts::functional { // create device test TEST_F(NeuralnetworksHidlTest, CreateDevice) {} Loading @@ -48,9 +43,4 @@ TEST_F(NeuralnetworksHidlTest, GetCapabilitiesTest) { EXPECT_TRUE(ret.isOk()); } } // namespace functional } // namespace vts } // namespace V1_0 } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks::V1_0::vts::functional neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp +5 −21 Original line number Diff line number Diff line Loading @@ -33,23 +33,12 @@ #include <gtest/gtest.h> #include <iostream> namespace android { namespace hardware { namespace neuralnetworks { namespace V1_0 { namespace vts { namespace functional { namespace android::hardware::neuralnetworks::V1_0::vts::functional { using namespace test_helper; using ::android::hardware::neuralnetworks::V1_0::ErrorStatus; using ::android::hardware::neuralnetworks::V1_0::IDevice; using ::android::hardware::neuralnetworks::V1_0::IPreparedModel; using ::android::hardware::neuralnetworks::V1_0::Model; using ::android::hardware::neuralnetworks::V1_0::Request; using ::android::hardware::neuralnetworks::V1_0::RequestArgument; using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback; using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback; using ::android::hidl::memory::V1_0::IMemory; using hidl::memory::V1_0::IMemory; using implementation::ExecutionCallback; using implementation::PreparedModelCallback; Model createModel(const TestModel& testModel) { // Model operands. Loading Loading @@ -206,9 +195,4 @@ TEST_P(GeneratedTest, Test) { INSTANTIATE_GENERATED_TEST(GeneratedTest, [](const TestModel& testModel) { return !testModel.expectFailure; }); } // namespace functional } // namespace vts } // namespace V1_0 } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks::V1_0::vts::functional neuralnetworks/1.0/vts/functional/GeneratedTestHarness.h +2 −12 Original line number Diff line number Diff line Loading @@ -21,12 +21,7 @@ #include "TestHarness.h" #include "VtsHalNeuralnetworks.h" namespace android { namespace hardware { namespace neuralnetworks { namespace V1_0 { namespace vts { namespace functional { namespace android::hardware::neuralnetworks::V1_0::vts::functional { class GeneratedTestBase : public NeuralnetworksHidlTest, Loading Loading @@ -59,11 +54,6 @@ class ValidationTest : public GeneratedTestBase { Model createModel(const ::test_helper::TestModel& testModel); } // namespace functional } // namespace vts } // namespace V1_0 } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks::V1_0::vts::functional #endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_0_GENERATED_TEST_HARNESS_H neuralnetworks/1.0/vts/functional/Utils.cpp +6 −10 Original line number Diff line number Diff line Loading @@ -28,15 +28,13 @@ #include <algorithm> #include <vector> namespace android { namespace hardware { namespace neuralnetworks { namespace android::hardware::neuralnetworks { using namespace test_helper; using ::android::hardware::neuralnetworks::V1_0::DataLocation; using ::android::hardware::neuralnetworks::V1_0::Request; using ::android::hardware::neuralnetworks::V1_0::RequestArgument; using ::android::hidl::memory::V1_0::IMemory; using hidl::memory::V1_0::IMemory; using V1_0::DataLocation; using V1_0::Request; using V1_0::RequestArgument; constexpr uint32_t kInputPoolIndex = 0; constexpr uint32_t kOutputPoolIndex = 1; Loading Loading @@ -118,6 +116,4 @@ std::vector<TestBuffer> getOutputBuffers(const Request& request) { return outputBuffers; } } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks neuralnetworks/1.0/vts/functional/ValidateModel.cpp +27 −39 Original line number Diff line number Diff line Loading @@ -20,15 +20,9 @@ #include "GeneratedTestHarness.h" #include "VtsHalNeuralnetworks.h" namespace android { namespace hardware { namespace neuralnetworks { namespace V1_0 { namespace vts { namespace functional { namespace android::hardware::neuralnetworks::V1_0::vts::functional { using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback; using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback; using implementation::PreparedModelCallback; ///////////////////////// UTILITY FUNCTIONS ///////////////////////// Loading @@ -48,7 +42,6 @@ static void validatePrepareModel(const sp<IDevice>& device, const std::string& m SCOPED_TRACE(message + " [prepareModel]"); sp<PreparedModelCallback> preparedModelCallback = new PreparedModelCallback(); ASSERT_NE(nullptr, preparedModelCallback.get()); Return<ErrorStatus> prepareLaunchStatus = device->prepareModel(model, preparedModelCallback); ASSERT_TRUE(prepareLaunchStatus.isOk()); ASSERT_EQ(ErrorStatus::INVALID_ARGUMENT, static_cast<ErrorStatus>(prepareLaunchStatus)); Loading Loading @@ -498,9 +491,4 @@ void ValidationTest::validateModel(const V1_0::Model& model) { addOperationOutputTest(device, model); } } // namespace functional } // namespace vts } // namespace V1_0 } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks::V1_0::vts::functional Loading
neuralnetworks/1.0/vts/functional/BasicTests.cpp +9 −19 Original line number Diff line number Diff line Loading @@ -18,12 +18,7 @@ #include "VtsHalNeuralnetworks.h" namespace android { namespace hardware { namespace neuralnetworks { namespace V1_0 { namespace vts { namespace functional { namespace android::hardware::neuralnetworks::V1_0::vts::functional { // create device test TEST_F(NeuralnetworksHidlTest, CreateDevice) {} Loading @@ -48,9 +43,4 @@ TEST_F(NeuralnetworksHidlTest, GetCapabilitiesTest) { EXPECT_TRUE(ret.isOk()); } } // namespace functional } // namespace vts } // namespace V1_0 } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks::V1_0::vts::functional
neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp +5 −21 Original line number Diff line number Diff line Loading @@ -33,23 +33,12 @@ #include <gtest/gtest.h> #include <iostream> namespace android { namespace hardware { namespace neuralnetworks { namespace V1_0 { namespace vts { namespace functional { namespace android::hardware::neuralnetworks::V1_0::vts::functional { using namespace test_helper; using ::android::hardware::neuralnetworks::V1_0::ErrorStatus; using ::android::hardware::neuralnetworks::V1_0::IDevice; using ::android::hardware::neuralnetworks::V1_0::IPreparedModel; using ::android::hardware::neuralnetworks::V1_0::Model; using ::android::hardware::neuralnetworks::V1_0::Request; using ::android::hardware::neuralnetworks::V1_0::RequestArgument; using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback; using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback; using ::android::hidl::memory::V1_0::IMemory; using hidl::memory::V1_0::IMemory; using implementation::ExecutionCallback; using implementation::PreparedModelCallback; Model createModel(const TestModel& testModel) { // Model operands. Loading Loading @@ -206,9 +195,4 @@ TEST_P(GeneratedTest, Test) { INSTANTIATE_GENERATED_TEST(GeneratedTest, [](const TestModel& testModel) { return !testModel.expectFailure; }); } // namespace functional } // namespace vts } // namespace V1_0 } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks::V1_0::vts::functional
neuralnetworks/1.0/vts/functional/GeneratedTestHarness.h +2 −12 Original line number Diff line number Diff line Loading @@ -21,12 +21,7 @@ #include "TestHarness.h" #include "VtsHalNeuralnetworks.h" namespace android { namespace hardware { namespace neuralnetworks { namespace V1_0 { namespace vts { namespace functional { namespace android::hardware::neuralnetworks::V1_0::vts::functional { class GeneratedTestBase : public NeuralnetworksHidlTest, Loading Loading @@ -59,11 +54,6 @@ class ValidationTest : public GeneratedTestBase { Model createModel(const ::test_helper::TestModel& testModel); } // namespace functional } // namespace vts } // namespace V1_0 } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks::V1_0::vts::functional #endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_0_GENERATED_TEST_HARNESS_H
neuralnetworks/1.0/vts/functional/Utils.cpp +6 −10 Original line number Diff line number Diff line Loading @@ -28,15 +28,13 @@ #include <algorithm> #include <vector> namespace android { namespace hardware { namespace neuralnetworks { namespace android::hardware::neuralnetworks { using namespace test_helper; using ::android::hardware::neuralnetworks::V1_0::DataLocation; using ::android::hardware::neuralnetworks::V1_0::Request; using ::android::hardware::neuralnetworks::V1_0::RequestArgument; using ::android::hidl::memory::V1_0::IMemory; using hidl::memory::V1_0::IMemory; using V1_0::DataLocation; using V1_0::Request; using V1_0::RequestArgument; constexpr uint32_t kInputPoolIndex = 0; constexpr uint32_t kOutputPoolIndex = 1; Loading Loading @@ -118,6 +116,4 @@ std::vector<TestBuffer> getOutputBuffers(const Request& request) { return outputBuffers; } } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks
neuralnetworks/1.0/vts/functional/ValidateModel.cpp +27 −39 Original line number Diff line number Diff line Loading @@ -20,15 +20,9 @@ #include "GeneratedTestHarness.h" #include "VtsHalNeuralnetworks.h" namespace android { namespace hardware { namespace neuralnetworks { namespace V1_0 { namespace vts { namespace functional { namespace android::hardware::neuralnetworks::V1_0::vts::functional { using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback; using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback; using implementation::PreparedModelCallback; ///////////////////////// UTILITY FUNCTIONS ///////////////////////// Loading @@ -48,7 +42,6 @@ static void validatePrepareModel(const sp<IDevice>& device, const std::string& m SCOPED_TRACE(message + " [prepareModel]"); sp<PreparedModelCallback> preparedModelCallback = new PreparedModelCallback(); ASSERT_NE(nullptr, preparedModelCallback.get()); Return<ErrorStatus> prepareLaunchStatus = device->prepareModel(model, preparedModelCallback); ASSERT_TRUE(prepareLaunchStatus.isOk()); ASSERT_EQ(ErrorStatus::INVALID_ARGUMENT, static_cast<ErrorStatus>(prepareLaunchStatus)); Loading Loading @@ -498,9 +491,4 @@ void ValidationTest::validateModel(const V1_0::Model& model) { addOperationOutputTest(device, model); } } // namespace functional } // namespace vts } // namespace V1_0 } // namespace neuralnetworks } // namespace hardware } // namespace android } // namespace android::hardware::neuralnetworks::V1_0::vts::functional