aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin May <kevin.may@arm.com>2020-04-15 16:50:57 +0100
committerKevin May <kevin.may@arm.com>2020-04-16 08:38:33 +0100
commit2eaa11995b2ed1c9ec48748e73d95d2d66ddbd33 (patch)
tree4c3888fdde6859a1094d5ba12b0a6b12a8db730c
parentef8a393e1945535721fea09a11cce50d7c607c47 (diff)
downloadandroid-nn-driver-2eaa11995b2ed1c9ec48748e73d95d2d66ddbd33.tar.gz
IVGCVSW-4672 Fix VTS 1.2/1.3 GetCapabilities test
Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I13be6896dd313bfeaf2f6b08ce0e47116116c3c0
-rw-r--r--1.2/ArmnnDriverImpl.cpp12
-rw-r--r--1.3/ArmnnDriverImpl.cpp35
2 files changed, 42 insertions, 5 deletions
diff --git a/1.2/ArmnnDriverImpl.cpp b/1.2/ArmnnDriverImpl.cpp
index bfa730b..4571fe0 100644
--- a/1.2/ArmnnDriverImpl.cpp
+++ b/1.2/ArmnnDriverImpl.cpp
@@ -237,6 +237,12 @@ Return<void> ArmnnDriverImpl::getCapabilities_1_2(const armnn::IRuntimePtr& runt
capabilities.relaxedFloat32toFloat16PerformanceScalar.execTime =
ParseSystemProperty(g_RelaxedFloat32toFloat16PerformanceExecTime, defaultValue);
+ capabilities.relaxedFloat32toFloat16PerformanceScalar.powerUsage =
+ ParseSystemProperty(g_RelaxedFloat32toFloat16PerformancePowerUsage, defaultValue);
+
+ capabilities.relaxedFloat32toFloat16PerformanceTensor.execTime =
+ ParseSystemProperty(g_RelaxedFloat32toFloat16PerformanceExecTime, defaultValue);
+
capabilities.relaxedFloat32toFloat16PerformanceTensor.powerUsage =
ParseSystemProperty(g_RelaxedFloat32toFloat16PerformancePowerUsage, defaultValue);
@@ -314,8 +320,10 @@ Return<void> ArmnnDriverImpl::getCapabilities_1_2(const armnn::IRuntimePtr& runt
}
else
{
- capabilities.relaxedFloat32toFloat16PerformanceScalar.execTime = 0;
- capabilities.relaxedFloat32toFloat16PerformanceTensor.execTime = 0;
+ capabilities.relaxedFloat32toFloat16PerformanceScalar.execTime = 0;
+ capabilities.relaxedFloat32toFloat16PerformanceScalar.powerUsage = 0;
+ capabilities.relaxedFloat32toFloat16PerformanceTensor.execTime = 0;
+ capabilities.relaxedFloat32toFloat16PerformanceTensor.powerUsage = 0;
// Set the base value for all operand types
#ifdef ARMNN_ANDROID_R
diff --git a/1.3/ArmnnDriverImpl.cpp b/1.3/ArmnnDriverImpl.cpp
index 98d038c..4b2ff14 100644
--- a/1.3/ArmnnDriverImpl.cpp
+++ b/1.3/ArmnnDriverImpl.cpp
@@ -12,10 +12,15 @@
namespace
{
-
const char *g_RelaxedFloat32toFloat16PerformanceExecTime = "ArmNN.relaxedFloat32toFloat16Performance.execTime";
const char *g_RelaxedFloat32toFloat16PerformancePowerUsage = "ArmNN.relaxedFloat32toFloat16Performance.powerUsage";
+const char *g_ifPerformanceExecTime = "ArmNN.ifPerformance.execTime";
+const char *g_ifPerformancePowerUsage = "ArmNN.ifPerformance.powerUsage";
+
+const char *g_whilePerformanceExecTime = "ArmNN.whilePerformance.execTime";
+const char *g_whilePerformancePowerUsage = "ArmNN.whilePerformance.powerUsage";
+
const char *g_OperandTypeTensorFloat32PerformanceExecTime = "Armnn.operandTypeTensorFloat32Performance.execTime";
const char *g_OperandTypeTensorFloat32PerformancePowerUsage = "Armnn.operandTypeTensorFloat32Performance.powerUsage";
@@ -242,9 +247,27 @@ Return<void> ArmnnDriverImpl::getCapabilities_1_3(const armnn::IRuntimePtr& runt
capabilities.relaxedFloat32toFloat16PerformanceScalar.execTime =
ParseSystemProperty(g_RelaxedFloat32toFloat16PerformanceExecTime, defaultValue);
+ capabilities.relaxedFloat32toFloat16PerformanceScalar.powerUsage =
+ ParseSystemProperty(g_RelaxedFloat32toFloat16PerformancePowerUsage, defaultValue);
+
+ capabilities.relaxedFloat32toFloat16PerformanceTensor.execTime =
+ ParseSystemProperty(g_RelaxedFloat32toFloat16PerformanceExecTime, defaultValue);
+
capabilities.relaxedFloat32toFloat16PerformanceTensor.powerUsage =
ParseSystemProperty(g_RelaxedFloat32toFloat16PerformancePowerUsage, defaultValue);
+ capabilities.ifPerformance.execTime =
+ ParseSystemProperty(g_ifPerformanceExecTime, defaultValue);
+
+ capabilities.ifPerformance.powerUsage =
+ ParseSystemProperty(g_ifPerformancePowerUsage, defaultValue);
+
+ capabilities.whilePerformance.execTime =
+ ParseSystemProperty(g_whilePerformanceExecTime, defaultValue);
+
+ capabilities.whilePerformance.powerUsage =
+ ParseSystemProperty(g_whilePerformancePowerUsage, defaultValue);
+
// Set the base value for all operand types
capabilities.operandPerformance = nonExtensionOperandPerformance<HalVersion::V1_3>({FLT_MAX, FLT_MAX});
@@ -322,8 +345,14 @@ Return<void> ArmnnDriverImpl::getCapabilities_1_3(const armnn::IRuntimePtr& runt
}
else
{
- capabilities.relaxedFloat32toFloat16PerformanceScalar.execTime = 0;
- capabilities.relaxedFloat32toFloat16PerformanceTensor.execTime = 0;
+ capabilities.relaxedFloat32toFloat16PerformanceScalar.execTime = 0;
+ capabilities.relaxedFloat32toFloat16PerformanceScalar.powerUsage = 0;
+ capabilities.relaxedFloat32toFloat16PerformanceTensor.execTime = 0;
+ capabilities.relaxedFloat32toFloat16PerformanceTensor.powerUsage = 0;
+ capabilities.ifPerformance.execTime = 0;
+ capabilities.ifPerformance.powerUsage = 0;
+ capabilities.whilePerformance.execTime = 0;
+ capabilities.whilePerformance.powerUsage = 0;
// Set the base value for all operand types
capabilities.operandPerformance = nonExtensionOperandPerformance<HalVersion::V1_3>({0.f, 0.0f});