From 96e922e8ee4187906211ee0d1dd0f3e27667c170 Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Wed, 26 Sep 2018 11:25:15 +0100 Subject: COMPMID-1602: Added Winograd tests for kernel 7x1 and 1x7. Change-Id: I9250b2e8020fe87c6ed4de582bbc7460bbd8e94b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/150287 Tested-by: bsgcomp Reviewed-by: Isabella Gottardi --- tests/datasets/LargeConvolutionLayerDataset.h | 36 +++++++++++++++++++++++++++ tests/datasets/SmallConvolutionLayerDataset.h | 20 +++++++++++++++ 2 files changed, 56 insertions(+) (limited to 'tests/datasets') diff --git a/tests/datasets/LargeConvolutionLayerDataset.h b/tests/datasets/LargeConvolutionLayerDataset.h index ca38abb43a..40a8855ace 100644 --- a/tests/datasets/LargeConvolutionLayerDataset.h +++ b/tests/datasets/LargeConvolutionLayerDataset.h @@ -140,6 +140,42 @@ public: } }; +class LargeWinogradConvolutionLayer7x1Dataset final : public ConvolutionLayerDataset +{ +public: + LargeWinogradConvolutionLayer7x1Dataset() + { + // Batch size 1 + add_config(TensorShape(224U, 224U, 3U), TensorShape(7U, 1U, 3U, 64U), TensorShape(64U), TensorShape(218U, 224U, 64U), PadStrideInfo(1, 1, 0, 0)); + add_config(TensorShape(123U, 134U, 16U), TensorShape(7U, 1U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U), PadStrideInfo(1, 1, 3, 0)); + add_config(TensorShape(181U, 152U, 42U), TensorShape(7U, 1U, 42U, 100U), TensorShape(100U), TensorShape(175U, 152U, 100U), PadStrideInfo(1, 1, 0, 0)); + add_config(TensorShape(200U, 201U, 24U), TensorShape(7U, 1U, 24U, 61), TensorShape(61U), TensorShape(200U, 201U, 61), PadStrideInfo(1, 1, 3, 0)); + + // Batch size 2, 3 and 4 + add_config(TensorShape(224U, 224U, 3U, 2U), TensorShape(7U, 1U, 3U, 64U), TensorShape(64U), TensorShape(224U, 224U, 64U, 2U), PadStrideInfo(1, 1, 3, 0)); + add_config(TensorShape(123U, 134U, 16U, 3U), TensorShape(7U, 1U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U, 3U), PadStrideInfo(1, 1, 3, 0)); + add_config(TensorShape(181U, 152U, 42U, 4U), TensorShape(7U, 1U, 42U, 100U), TensorShape(100U), TensorShape(175U, 152U, 100U, 4U), PadStrideInfo(1, 1, 0, 0)); + } +}; + +class LargeWinogradConvolutionLayer1x7Dataset final : public ConvolutionLayerDataset +{ +public: + LargeWinogradConvolutionLayer1x7Dataset() + { + // Batch size 1 + add_config(TensorShape(224U, 224U, 3U), TensorShape(1U, 7U, 3U, 64U), TensorShape(64U), TensorShape(224U, 218U, 64U), PadStrideInfo(1, 1, 0, 0)); + add_config(TensorShape(123U, 134U, 16U), TensorShape(1U, 7U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U), PadStrideInfo(1, 1, 0, 3)); + add_config(TensorShape(181U, 152U, 42U), TensorShape(1U, 7U, 42U, 100U), TensorShape(100U), TensorShape(181U, 146U, 100U), PadStrideInfo(1, 1, 0, 0)); + add_config(TensorShape(200U, 201U, 24U), TensorShape(1U, 7U, 24U, 61), TensorShape(61U), TensorShape(200U, 201U, 61), PadStrideInfo(1, 1, 0, 3)); + + // Batch size 2, 3 and 4 + add_config(TensorShape(224U, 224U, 3U, 2U), TensorShape(1U, 7U, 3U, 64U), TensorShape(64U), TensorShape(224U, 224U, 64U, 2U), PadStrideInfo(1, 1, 0, 3)); + add_config(TensorShape(123U, 134U, 16U, 3U), TensorShape(1U, 7U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U, 3U), PadStrideInfo(1, 1, 0, 3)); + add_config(TensorShape(181U, 152U, 42U, 4U), TensorShape(1U, 7U, 42U, 100U), TensorShape(100U), TensorShape(181U, 146U, 100U, 4U), PadStrideInfo(1, 1, 0, 0)); + } +}; + class LargeWinogradConvolutionLayer1x5Dataset final : public ConvolutionLayerDataset { public: diff --git a/tests/datasets/SmallConvolutionLayerDataset.h b/tests/datasets/SmallConvolutionLayerDataset.h index a288d07902..ca4abd1671 100644 --- a/tests/datasets/SmallConvolutionLayerDataset.h +++ b/tests/datasets/SmallConvolutionLayerDataset.h @@ -112,6 +112,26 @@ public: } }; +class SmallWinogradConvolutionLayer7x1Dataset final : public ConvolutionLayerDataset +{ +public: + SmallWinogradConvolutionLayer7x1Dataset() + { + add_config(TensorShape(14U, 14U, 2U), TensorShape(7U, 1U, 2U, 1U), TensorShape(1U), TensorShape(8U, 14U, 1U), PadStrideInfo(1, 1, 0, 0)); + add_config(TensorShape(14U, 14U, 2U), TensorShape(7U, 1U, 2U), TensorShape(1U), TensorShape(14U, 14U, 1U), PadStrideInfo(1, 1, 3, 0)); + } +}; + +class SmallWinogradConvolutionLayer1x7Dataset final : public ConvolutionLayerDataset +{ +public: + SmallWinogradConvolutionLayer1x7Dataset() + { + add_config(TensorShape(14U, 14U, 2U), TensorShape(1U, 7U, 2U, 1U), TensorShape(1U), TensorShape(14U, 8U, 1U), PadStrideInfo(1, 1, 0, 0)); + add_config(TensorShape(14U, 14U, 2U), TensorShape(1U, 7U, 2U), TensorShape(1U), TensorShape(14U, 14U, 1U), PadStrideInfo(1, 1, 0, 3)); + } +}; + class SmallConvolutionLayerDataset final : public ConvolutionLayerDataset { public: -- cgit v1.2.1