IVGCVSW-4672 Fix VTS 1.2/1.3 GetCapabilities test
Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: I13be6896dd313bfeaf2f6b08ce0e47116116c3c0
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 @@
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 @@
}
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 @@
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 @@
}
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});