diff options
author | Haamed Gheibi <haamed@google.com> | 2022-02-09 14:35:06 -0800 |
---|---|---|
committer | Haamed Gheibi <haamed@google.com> | 2022-02-09 14:41:16 -0800 |
commit | ab52181d73b04e131fd72e32d69b5123a5d6892b (patch) | |
tree | 0ac86b537180b6fb97716b3058dfae44af9eaac7 /neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp | |
parent | f99b35c293439db0b7436b47b939eb8c7bf21b51 (diff) | |
parent | 4d2548cfa7b86b79a516be9b60f6b666cc9af682 (diff) |
Merge TP1A.220126.001
Change-Id: Ibf6bd2c20d9927fde8b2a05dde2b58bd8faea20f
Diffstat (limited to 'neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp')
-rw-r--r-- | neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp b/neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp index b3e9c633e3..f8341b15b4 100644 --- a/neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp +++ b/neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp @@ -17,6 +17,7 @@ #define LOG_TAG "neuralnetworks_aidl_hal_test" #include <aidl/android/hardware/graphics/common/PixelFormat.h> +#include <aidl/android/hardware/neuralnetworks/IPreparedModel.h> #include <android-base/logging.h> #include <android/binder_auto_utils.h> #include <android/binder_interface_utils.h> @@ -33,7 +34,6 @@ #include "Callbacks.h" #include "GeneratedTestHarness.h" -#include "MemoryUtils.h" #include "Utils.h" #include "VtsHalNeuralnetworks.h" @@ -191,7 +191,7 @@ TestModel createSingleAddModel(const TestOperand& operand) { } // A placeholder invalid IPreparedModel class for MemoryDomainAllocateTest.InvalidPreparedModel -class InvalidPreparedModel : public BnPreparedModel { +class InvalidPreparedModel final : public IPreparedModel { public: ndk::ScopedAStatus executeSynchronously(const Request&, bool, int64_t, int64_t, ExecutionResult*) override { @@ -204,15 +204,37 @@ class InvalidPreparedModel : public BnPreparedModel { return ndk::ScopedAStatus::fromServiceSpecificError( static_cast<int32_t>(ErrorStatus::GENERAL_FAILURE)); } + ndk::ScopedAStatus executeSynchronouslyWithConfig(const Request&, const ExecutionConfig&, + int64_t, ExecutionResult*) override { + return ndk::ScopedAStatus::fromServiceSpecificError( + static_cast<int32_t>(ErrorStatus::GENERAL_FAILURE)); + } + ndk::ScopedAStatus executeFencedWithConfig(const Request&, + const std::vector<ndk::ScopedFileDescriptor>&, + const ExecutionConfig&, int64_t, int64_t, + FencedExecutionResult*) override { + return ndk::ScopedAStatus::fromServiceSpecificError( + static_cast<int32_t>(ErrorStatus::GENERAL_FAILURE)); + } ndk::ScopedAStatus configureExecutionBurst(std::shared_ptr<IBurst>*) override { return ndk::ScopedAStatus::fromServiceSpecificError( static_cast<int32_t>(ErrorStatus::GENERAL_FAILURE)); } - ndk::ScopedAStatus createReusableExecution(const aidl_hal::Request&, bool, int64_t, + ndk::ScopedAStatus createReusableExecution(const aidl_hal::Request&, const ExecutionConfig&, std::shared_ptr<aidl_hal::IExecution>*) override { return ndk::ScopedAStatus::fromServiceSpecificError( static_cast<int32_t>(ErrorStatus::GENERAL_FAILURE)); } + ndk::ScopedAStatus getInterfaceVersion(int32_t* /*interfaceVersion*/) { + return ndk::ScopedAStatus::fromServiceSpecificError( + static_cast<int32_t>(ErrorStatus::GENERAL_FAILURE)); + } + ndk::ScopedAStatus getInterfaceHash(std::string* /*interfaceHash*/) { + return ndk::ScopedAStatus::fromServiceSpecificError( + static_cast<int32_t>(ErrorStatus::GENERAL_FAILURE)); + } + ndk::SpAIBinder asBinder() override { return ::ndk::SpAIBinder{}; } + bool isRemote() override { return true; } }; template <typename... Args> |