diff options
author | Kevin May <kevin.may@arm.com> | 2020-02-26 17:00:39 +0000 |
---|---|---|
committer | David Monahan <david.monahan@arm.com> | 2020-03-03 08:40:23 +0000 |
commit | ec1e5b8d0a0eeba7eae0f1fdb5e32c72f8a8093c (patch) | |
tree | ac4e2d3194012e08241afa9c6691d52608c1a869 /test/Lstm.hpp | |
parent | 4a9565870037150ad6ee060a3cd232d867711b60 (diff) | |
download | android-nn-driver-ec1e5b8d0a0eeba7eae0f1fdb5e32c72f8a8093c.tar.gz |
IVGCVSW-4473 Android R pre Hal 1_3 build changes
* Update ErrorStatus to V1_0::ErrorStatus
* Update Request to V1_0::Request
* Update OperandType to V1_2::OperandType
* Add namespace android::nn::hal in ArmnnDriverImpl for R only
* Add missing g_RelaxedFloat32toFloat16PerformancePowerUsageName
* Add namespace V1_0 or V1_1 where necessary
* Update Android.mk with R macro and android.hardware.neuralnetworks@1.3
* Remove androidnn.go
* include IAllocator in DriverTestHelpers
* Remove unused LOCAL_CFLAGS
Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: I1787f1ed6784b3bbec017536d87d49197405e853
Signed-off-by: Kevin May <kevin.may@arm.com>
Diffstat (limited to 'test/Lstm.hpp')
-rw-r--r-- | test/Lstm.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/Lstm.hpp b/test/Lstm.hpp index f0d3d853..d3e03d75 100644 --- a/test/Lstm.hpp +++ b/test/Lstm.hpp @@ -54,18 +54,18 @@ bool TolerantCompareEqual(float a, float b, float tolerance = 0.00001f) // Helper function to create an OperandLifeTime::NO_VALUE for testing. // To be used on optional input operands that have no values - these are valid and should be tested. -OperandLifeTime CreateNoValueLifeTime(const hidl_vec<uint32_t>& dimensions) +V1_0::OperandLifeTime CreateNoValueLifeTime(const hidl_vec<uint32_t>& dimensions) { // Only create a NO_VALUE for optional operands that have no elements if (dimensions.size() == 0 || dimensions[0] == 0) { - return OperandLifeTime::NO_VALUE; + return V1_0::OperandLifeTime::NO_VALUE; } - return OperandLifeTime::CONSTANT_COPY; + return V1_0::OperandLifeTime::CONSTANT_COPY; } template<typename HalModel> -void ExecuteModel(const HalModel& model, armnn_driver::ArmnnDriver& driver, const Request& request) +void ExecuteModel(const HalModel& model, armnn_driver::ArmnnDriver& driver, const V1_0::Request& request) { android::sp<V1_0::IPreparedModel> preparedModel = PrepareModel(model, driver); if (preparedModel.get() != nullptr) @@ -79,7 +79,7 @@ void ExecuteModel(const HalModel& model, armnn_driver::ArmnnDriver& driver, cons template<> void ExecuteModel<armnn_driver::hal_1_2::HalPolicy::Model>(const armnn_driver::hal_1_2::HalPolicy::Model& model, armnn_driver::ArmnnDriver& driver, - const Request& request) + const V1_0::Request& request) { android::sp<V1_2::IPreparedModel> preparedModel = PrepareModel_1_2(model, driver); if (preparedModel.get() != nullptr) @@ -362,7 +362,7 @@ void LstmTestImpl(const hidl_vec<uint32_t>& inputDimensions, outputArguments[2] = CreateRequestArgument<float>(cellStateOutValue, 5); outputArguments[3] = CreateRequestArgument<float>(outputValue, 6); - Request request = {}; + V1_0::Request request = {}; request.inputs = inputArguments; request.outputs = outputArguments; @@ -640,7 +640,7 @@ void QuantizedLstmTestImpl(const hidl_vec<uint32_t>& inputDimensions, outputArguments[0] = CreateRequestArgument<int16_t>(cellStateOutValue, 3); outputArguments[1] = CreateRequestArgument<uint8_t>(outputValue, 4); - Request request = {}; + V1_0::Request request = {}; request.inputs = inputArguments; request.outputs = outputArguments; |