aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsaoste01 <saoirse.stewart@arm.com>2018-11-02 17:54:10 +0000
committerMatthew Bentham <matthew.bentham@arm.com>2018-11-06 16:59:46 +0000
commit72f02b890912a3323a1d477648bac013e403cfb3 (patch)
treeb95d8f677be1c8b446879e4a1ed9d8a2857aecef
parentbcc561c70bd94fe979917c10a6c68d6e4cd03124 (diff)
downloadarmnn-72f02b890912a3323a1d477648bac013e403cfb3.tar.gz
MLCE-65: Update for DepthwiseConvolution issue
Change-Id: Icad9d16c840049bf182b8784714734524fdb0878
-rw-r--r--src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp b/src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp
index 6b159f15e4..83aa03d727 100644
--- a/src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp
+++ b/src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp
@@ -88,8 +88,11 @@ ClDepthwiseConvolutionWorkload::ClDepthwiseConvolutionWorkload(
const unsigned int depthMultiplier = weightInfo.GetShape()[0];
+ const unsigned int widthIndex = (m_Data.m_Parameters.m_DataLayout == DataLayout::NHWC) ? 3 : 2;
+ const unsigned int heightIndex = (m_Data.m_Parameters.m_DataLayout == DataLayout::NHWC) ? 2 : 1;
+
//Check for optimisation opportunities.
- bool use3x3Optimisation = (weightInfo.GetShape()[3] == 3) && (weightInfo.GetShape()[2] == 3);
+ bool use3x3Optimisation = (weightInfo.GetShape()[widthIndex] == 3) && (weightInfo.GetShape()[heightIndex] == 3);
if (use3x3Optimisation)
{
m_DepthwiseConvolutionLayer = std::make_unique<arm_compute::CLDepthwiseConvolutionLayer3x3>();