From 2eaa11995b2ed1c9ec48748e73d95d2d66ddbd33 Mon Sep 17 00:00:00 2001 From: Kevin May Date: Wed, 15 Apr 2020 16:50:57 +0100 Subject: IVGCVSW-4672 Fix VTS 1.2/1.3 GetCapabilities test Signed-off-by: Kevin May Change-Id: I13be6896dd313bfeaf2f6b08ce0e47116116c3c0 --- 1.2/ArmnnDriverImpl.cpp | 12 ++++++++++-- 1.3/ArmnnDriverImpl.cpp | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/1.2/ArmnnDriverImpl.cpp b/1.2/ArmnnDriverImpl.cpp index bfa730b5..4571fe0e 100644 --- a/1.2/ArmnnDriverImpl.cpp +++ b/1.2/ArmnnDriverImpl.cpp @@ -237,6 +237,12 @@ Return 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 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 98d038c9..4b2ff148 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 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({FLT_MAX, FLT_MAX}); @@ -322,8 +345,14 @@ Return 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({0.f, 0.0f}); -- cgit v1.2.1