aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backends/reference/test/RefLayerTests.cpp2
-rw-r--r--src/backends/reference/workloads/ConvImpl.hpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/backends/reference/test/RefLayerTests.cpp b/src/backends/reference/test/RefLayerTests.cpp
index b2600029b1..01afff8b02 100644
--- a/src/backends/reference/test/RefLayerTests.cpp
+++ b/src/backends/reference/test/RefLayerTests.cpp
@@ -81,6 +81,8 @@ ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dUint8Nhwc,
DepthwiseConvolution2dUint8Test,
false,
armnn::DataLayout::NHWC)
+ARMNN_AUTO_TEST_CASE(SimpleDepthwiseConvolution2d3x3Dilation3x3Nhwc,
+ SimpleDepthwiseConvolution2d3x3Dilation3x3NhwcTest)
ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1,
diff --git a/src/backends/reference/workloads/ConvImpl.hpp b/src/backends/reference/workloads/ConvImpl.hpp
index 5c07f57ec0..23b402aa77 100644
--- a/src/backends/reference/workloads/ConvImpl.hpp
+++ b/src/backends/reference/workloads/ConvImpl.hpp
@@ -97,6 +97,8 @@ static void ConvImpl(ConvData data,
unsigned int paddingLeft = data.m_Parameters.m_PadLeft;
unsigned int xStride = data.m_Parameters.m_StrideX;
unsigned int yStride = data.m_Parameters.m_StrideY;
+ unsigned int xDilation = data.m_Parameters.m_DilationX;
+ unsigned int yDilation = data.m_Parameters.m_DilationY;
// The world's least efficient convolution.
for (unsigned int batchIdx = 0; batchIdx < batchSize; batchIdx++)
@@ -158,8 +160,8 @@ static void ConvImpl(ConvData data,
AccumulatorType filterValue = filterData[filterIndex] -
boost::numeric_cast<AccumulatorType>(filterOffset);
- unsigned int yInput = yOutput * yStride + yFilter;
- unsigned int xInput = xOutput * xStride + xFilter;
+ unsigned int yInput = yOutput * yStride + yFilter * yDilation;
+ unsigned int xInput = xOutput * xStride + xFilter * xDilation;
AccumulatorType inputValue;