From 52e6195628c163e9bf2c78fa72e4e2f43c0764da Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Wed, 9 May 2018 17:23:55 +0200 Subject: Split channels/strides testing values off from kernel sizes for more flexibility --- test/correctness/testblas.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test/correctness/testblas.hpp') diff --git a/test/correctness/testblas.hpp b/test/correctness/testblas.hpp index 1d1d2ca9..0dc8584e 100644 --- a/test/correctness/testblas.hpp +++ b/test/correctness/testblas.hpp @@ -61,6 +61,8 @@ class TestBlas: public Tester { static const std::vector kKernelSizes; static const std::vector kBatchCounts; static const std::vector kNumKernels; + static const std::vector kStrideValues; + static const std::vector kChannelValues; const std::vector kOffsets; const std::vector kAlphaValues; const std::vector kBetaValues; @@ -138,6 +140,8 @@ template const std::vector TestBlas::kPadS template const std::vector TestBlas::kDilationSizes = { 1, 2 }; template const std::vector TestBlas::kKernelSizes = { 1, 3 }; template const std::vector TestBlas::kNumKernels = { 1, 2 }; +template const std::vector TestBlas::kStrideValues = { 1, 3 }; +template const std::vector TestBlas::kChannelValues = { 1, 4 }; // Test settings for the invalid tests template const std::vector TestBlas::kInvalidIncrements = { 0, 1 }; @@ -287,15 +291,15 @@ size_t RunTests(int argc, char *argv[], const bool silent, const std::string &na if (option == kArgImaxOffset) { imax_offsets = tester.kOffsets; } if (option == kArgAlpha) { alphas = tester.kAlphaValues; } if (option == kArgBeta) { betas = tester.kBetaValues; } - if (option == kArgChannels) { channelss = tester.kKernelSizes; } + if (option == kArgChannels) { channelss = tester.kChannelValues; } if (option == kArgHeight) { heights = tester.kMatrixDims; } if (option == kArgWidth) { widths = tester.kMatrixDims; } if (option == kArgKernelH) { kernel_hs = tester.kKernelSizes; } if (option == kArgKernelW) { kernel_ws = tester.kKernelSizes; } if (option == kArgPadH) { pad_hs = tester.kPadSizes; } if (option == kArgPadW) { pad_ws = tester.kPadSizes; } - if (option == kArgStrideH) { stride_hs = tester.kKernelSizes; } - if (option == kArgStrideW) { stride_ws = tester.kKernelSizes; } + if (option == kArgStrideH) { stride_hs = tester.kStrideValues; } + if (option == kArgStrideW) { stride_ws = tester.kStrideValues; } if (option == kArgDilationH) { dilation_hs = tester.kDilationSizes; } if (option == kArgDilationW) { dilation_ws = tester.kDilationSizes; } if (option == kArgBatchCount) { batch_counts = tester.kBatchCounts; } -- cgit v1.2.3