From d7daf946a21744883faf056a207b9b1cb0cf7c56 Mon Sep 17 00:00:00 2001 From: xinlipn Date: Mon, 13 Jan 2025 20:27:31 -0800 Subject: [PATCH] [gTest] Add more test coverage for Batchnorm Forward Training (#3444) * Add fwd training data for fwd spatial multiple variant = 2 and bfp32 * Add more test cases for forward spatial * Replaced NetworkSmall with NetworkLarge for GPU_BN_FWD_Train_Large_FP64 --- test/gtest/bn_fwd_train.cpp | 2 +- test/gtest/bn_test_data.hpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/gtest/bn_fwd_train.cpp b/test/gtest/bn_fwd_train.cpp index 9b4722aaf8..68cb42824b 100644 --- a/test/gtest/bn_fwd_train.cpp +++ b/test/gtest/bn_fwd_train.cpp @@ -144,7 +144,7 @@ INSTANTIATE_TEST_SUITE_P(Smoke, INSTANTIATE_TEST_SUITE_P(Smoke, GPU_BN_FWD_Train_Large_FP64, - testing::Combine(testing::ValuesIn(NetworkSmall()), + testing::Combine(testing::ValuesIn(NetworkLarge()), testing::ValuesIn({miopenTensorNCHW, miopenTensorNHWC}), testing::ValuesIn({testBNAPIV2})), TestNameGenerator()); diff --git a/test/gtest/bn_test_data.hpp b/test/gtest/bn_test_data.hpp index d3b1c6b073..cb474f95e7 100644 --- a/test/gtest/bn_test_data.hpp +++ b/test/gtest/bn_test_data.hpp @@ -93,7 +93,11 @@ inline std::vector NetworkLarge() {64, 64, 112, 112, miopenBNSpatial, miopen::batchnorm::Direction::ForwardInference, 1, 0}, {64, 64, 56, 56, miopenBNSpatial, miopen::batchnorm::Direction::Backward, 0, 1}, {64, 64, 56, 56, miopenBNSpatial, miopen::batchnorm::Direction::ForwardTraining, 1, 1}, - {64, 64, 56, 56, miopenBNSpatial, miopen::batchnorm::Direction::ForwardInference, 1, 0}}; + {64, 64, 56, 56, miopenBNSpatial, miopen::batchnorm::Direction::ForwardInference, 1, 0}, + {768, 1, 14, 14, miopenBNSpatial, miopen::batchnorm::Direction::ForwardTraining, 1, 1}, + {768, 1, 23, 23, miopenBNSpatial, miopen::batchnorm::Direction::ForwardTraining, 1, 1}, + {832, 1, 14, 14, miopenBNSpatial, miopen::batchnorm::Direction::ForwardTraining, 1, 1}, + {832, 1, 28, 28, miopenBNSpatial, miopen::batchnorm::Direction::ForwardTraining, 1, 1}}; } template <>