Skip to content

Commit

Permalink
[gTest] Add more test coverage for Batchnorm Forward Training (#3444)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
xinlipn authored Jan 14, 2025
1 parent 200bc5d commit d7daf94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/gtest/bn_fwd_train.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<BNTestCase>()),
testing::Combine(testing::ValuesIn(NetworkLarge<BNTestCase>()),
testing::ValuesIn({miopenTensorNCHW, miopenTensorNHWC}),
testing::ValuesIn({testBNAPIV2})),
TestNameGenerator());
6 changes: 5 additions & 1 deletion test/gtest/bn_test_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ inline std::vector<BNTestCase> 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 <>
Expand Down

0 comments on commit d7daf94

Please sign in to comment.