diff options
Diffstat (limited to 'test/correctness/testblas.hpp')
-rw-r--r-- | test/correctness/testblas.hpp | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/test/correctness/testblas.hpp b/test/correctness/testblas.hpp index a553687d..577a289e 100644 --- a/test/correctness/testblas.hpp +++ b/test/correctness/testblas.hpp @@ -56,6 +56,8 @@ class TestBlas: public Tester<T,U> { static const std::vector<size_t> kMatrixDims; static const std::vector<size_t> kMatrixVectorDims; static const std::vector<size_t> kBandSizes; + static const std::vector<size_t> kPadSizes; + static const std::vector<size_t> kKernelSizes; static const std::vector<size_t> kBatchCounts; const std::vector<size_t> kOffsets; const std::vector<U> kAlphaValues; @@ -130,6 +132,8 @@ template <typename T, typename U> const std::vector<size_t> TestBlas<T,U>::kMatr template <typename T, typename U> const std::vector<size_t> TestBlas<T,U>::kMatrixVectorDims = { 61, 256 }; template <typename T, typename U> const std::vector<size_t> TestBlas<T,U>::kBandSizes = { 4, 19 }; template <typename T, typename U> const std::vector<size_t> TestBlas<T,U>::kBatchCounts = { 1, 3 }; +template <typename T, typename U> const std::vector<size_t> TestBlas<T,U>::kPadSizes = { 0 }; +template <typename T, typename U> const std::vector<size_t> TestBlas<T,U>::kKernelSizes = { 1, 3 }; // Test settings for the invalid tests template <typename T, typename U> const std::vector<size_t> TestBlas<T,U>::kInvalidIncrements = { 0, 1 }; @@ -223,6 +227,17 @@ size_t RunTests(int argc, char *argv[], const bool silent, const std::string &na auto imax_offsets = std::vector<size_t>{args.imax_offset}; auto alphas = std::vector<U>{args.alpha}; auto betas = std::vector<U>{args.beta}; + auto channelss = std::vector<size_t>{args.channels}; + auto heights = std::vector<size_t>{args.height}; + auto widths = std::vector<size_t>{args.width}; + auto kernel_hs = std::vector<size_t>{args.kernel_h}; + auto kernel_ws = std::vector<size_t>{args.kernel_w}; + auto pad_hs = std::vector<size_t>{args.pad_h}; + auto pad_ws = std::vector<size_t>{args.pad_w}; + auto stride_hs = std::vector<size_t>{args.stride_h}; + auto stride_ws = std::vector<size_t>{args.stride_w}; + auto dilation_hs = std::vector<size_t>{args.dilation_h}; + auto dilation_ws = std::vector<size_t>{args.dilation_w}; auto batch_counts = std::vector<size_t>{args.batch_count}; auto x_sizes = std::vector<size_t>{args.x_size}; auto y_sizes = std::vector<size_t>{args.y_size}; @@ -267,6 +282,17 @@ 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.kMatrixDims; } + 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 == kArgDilationH) { dilation_hs = tester.kKernelSizes; } + if (option == kArgDilationW) { dilation_ws = tester.kKernelSizes; } if (option == kArgBatchCount) { batch_counts = tester.kBatchCounts; } if (option == kArgXOffset) { x_sizes = tester.kVecSizes; } @@ -310,9 +336,31 @@ size_t RunTests(int argc, char *argv[], const bool silent, const std::string &na for (auto &imax_offset: imax_offsets) { r_args.imax_offset = imax_offset; for (auto &alpha: alphas) { r_args.alpha = alpha; for (auto &beta: betas) { r_args.beta = beta; - for (auto &batch_count: batch_counts) { r_args.batch_count = batch_count; - C::SetSizes(r_args); - regular_test_vector.push_back(r_args); + for (auto &channels: channelss) { r_args.channels = channels; + for (auto &height: heights) { r_args.height = height; + for (auto &width: widths) { r_args.width = width; + for (auto &kernel_h: kernel_hs) { r_args.kernel_h = kernel_h; + for (auto &kernel_w: kernel_ws) { r_args.kernel_w = kernel_w; + for (auto &pad_h: pad_hs) { r_args.pad_h = pad_h; + for (auto &pad_w: pad_ws) { r_args.pad_w = pad_w; + for (auto &stride_h: stride_hs) { r_args.stride_h = stride_h; + for (auto &stride_w: stride_ws) { r_args.stride_w = stride_w; + for (auto &dilation_h: dilation_hs) { r_args.dilation_h = dilation_h; + for (auto &dilation_w: dilation_ws) { r_args.dilation_w = dilation_w; + for (auto &batch_count: batch_counts) { r_args.batch_count = batch_count; + C::SetSizes(r_args); + regular_test_vector.push_back(r_args); + } + } + } + } + } + } + } + } + } + } + } } } } |