-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding 3d bn gtest #3385
base: develop
Are you sure you want to change the base?
adding 3d bn gtest #3385
Changes from all commits
19aaa74
82f0561
63c6c59
80575cf
eb7223a
29b2fb3
1d48dc9
c67ca33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,112 +33,167 @@ | |
typename DscaleDbiasDataType, | ||
typename MeanVarDataType> */ | ||
|
||
struct GPU_BN_CK_BWD_Large_FP16 | ||
: BNBwdTest<half_float::half, float, float, float, half_float::half, float, float> | ||
struct GPU_BNBWDSmall_FP32 | ||
: BNBwdTest<half_float::half, float, float, float, half_float::half, float, float, BN2DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BN_OCL_BWD_Large_FP16 | ||
: BNBwdTest<half_float::half, half_float::half, half_float::half, float, float, float, float> | ||
struct GPU_BNOCLBWDLarge2D_FP16 : BNBwdTest<half_float::half, | ||
half_float::half, | ||
half_float::half, | ||
float, | ||
float, | ||
float, | ||
float, | ||
BN2DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BN_CK_BWD_Large_BFP16 : BNBwdTest<bfloat16, float, float, float, bfloat16, float, float> | ||
struct GPU_BNOCLBWDLarge3D_FP16 : BNBwdTest<half_float::half, | ||
half_float::half, | ||
half_float::half, | ||
float, | ||
float, | ||
float, | ||
float, | ||
BN3DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BN_OCL_BWD_Large_BFP16 | ||
: BNBwdTest<bfloat16, bfloat16, bfloat16, float, float, float, float> | ||
struct GPU_BNCKBWDLarge2D_BFP16 | ||
: BNBwdTest<bfloat16, float, float, float, bfloat16, float, float, BN2DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BN_BWD_Small_FP32 : BNBwdTest<float, float, float, float, float, float, float> | ||
struct GPU_BNOCLBWDLarge2D_BFP16 | ||
: BNBwdTest<bfloat16, bfloat16, bfloat16, float, float, float, float, BN2DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BN_BWD_Large_FP32 : BNBwdTest<float, float, float, float, float, float, float> | ||
struct GPU_BNOCLBWDLarge3D_BFP16 | ||
: BNBwdTest<bfloat16, bfloat16, bfloat16, float, float, float, float, BN3DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BN_BWD_Small_FP64 : BNBwdTest<double, double, double, double, double, double, double> | ||
struct GPU_BNBWDSmall2D_FP32 | ||
: BNBwdTest<float, float, float, float, float, float, float, BN2DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BN_BWD_Large_FP64 : BNBwdTest<double, double, double, double, double, double, double> | ||
struct GPU_BNBWDLarge2D_FP32 | ||
: BNBwdTest<float, float, float, float, float, float, float, BN2DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BNBWDLarge3D_FP32 | ||
: BNBwdTest<float, float, float, float, float, float, float, BN3DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BNBWDSmall2D_FP64 | ||
: BNBwdTest<double, double, double, double, double, double, double, BN2DTestCase> | ||
{ | ||
}; | ||
|
||
struct GPU_BNBWDLarge2D_FP64 | ||
: BNBwdTest<double, double, double, double, double, double, double, BN2DTestCase> | ||
{ | ||
}; | ||
|
||
// fp16 | ||
TEST_P(GPU_BN_CK_BWD_Large_FP16, DISABLED_BnV2LargeBWDCKfp16) {} | ||
TEST_P(GPU_BN_OCL_BWD_Large_FP16, BnV2LargeBWDOCLfp16) {} | ||
TEST_P(GPU_BNBWDSmall_FP32, DISABLED_BnV2LargeBWDCK2D_fp16) {} | ||
TEST_P(GPU_BNOCLBWDLarge2D_FP16, BnV2LargeBWDOCL2D_fp16) {} | ||
TEST_P(GPU_BNOCLBWDLarge3D_FP16, BnV2LargeBWDOCL3D_fp16) {} | ||
|
||
// bfp16 | ||
TEST_P(GPU_BN_CK_BWD_Large_BFP16, DISABLED_BnV2LargeBWDCKbfp16) {} | ||
TEST_P(GPU_BN_OCL_BWD_Large_BFP16, BnV2LargeBWDOCLbfp16) {} | ||
// // // bfp16 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra //'s |
||
TEST_P(GPU_BNCKBWDLarge2D_BFP16, DISABLED_BnV2LargeBWDCKbfp16_2D) {} | ||
TEST_P(GPU_BNOCLBWDLarge2D_BFP16, BnV2LargeBWDOCLbfp16_2D) {} | ||
TEST_P(GPU_BNOCLBWDLarge3D_BFP16, BnV2LargeBWDOCLbfp16_3D) {} | ||
|
||
// fp32 (float) | ||
TEST_P(GPU_BN_BWD_Small_FP32, BnV1SmallBWDCKfp32) {} | ||
TEST_P(GPU_BN_BWD_Large_FP32, BnV2LargeBWDCKfp32) {} | ||
TEST_P(GPU_BNBWDSmall2D_FP32, BnV1SmallBWDCKfp32_2D) {} | ||
TEST_P(GPU_BNBWDLarge2D_FP32, BnV2LargeBWDCKfp32_2D) {} | ||
TEST_P(GPU_BNBWDLarge3D_FP32, BnV2LargeBWDCKfp32_3D) {} | ||
|
||
// fp64 | ||
TEST_P(GPU_BN_BWD_Small_FP64, DISABLED_BnV1SmallBWDCKfp64) {} | ||
TEST_P(GPU_BN_BWD_Large_FP64, DISABLED_BnV2LargeBWDCKfp64) {} | ||
TEST_P(GPU_BNBWDSmall2D_FP64, DISABLED_BnV1SmallBWDCKfp64_2D) {} | ||
TEST_P(GPU_BNBWDLarge2D_FP64, DISABLED_BnV2LargeBWDCKfp64_2D) {} | ||
|
||
// fp16 | ||
// // fp16 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra //'s |
||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BN_CK_BWD_Large_FP16, | ||
testing::Combine(testing::ValuesIn(NetworkSmall<BNTestCase>()), | ||
GPU_BNBWDSmall_FP32, | ||
testing::Combine(testing::ValuesIn(Network2DSmall<BN2DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCHW, miopenTensorNHWC}), | ||
testing::ValuesIn({testBNAPIV2})), | ||
TestNameGenerator()); | ||
TestNameGenerator<BN2DTestCase>()); | ||
|
||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BN_OCL_BWD_Large_FP16, | ||
testing::Combine(testing::ValuesIn(NetworkLarge<BNTestCase>()), | ||
GPU_BNOCLBWDLarge2D_FP16, | ||
testing::Combine(testing::ValuesIn(Network2DLarge<BN2DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCHW}), | ||
testing::ValuesIn({testBNAPIV2})), | ||
TestNameGenerator()); | ||
TestNameGenerator<BN2DTestCase>()); | ||
|
||
// bfp16 | ||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BN_CK_BWD_Large_BFP16, | ||
testing::Combine(testing::ValuesIn(NetworkLarge<BNTestCase>()), | ||
GPU_BNOCLBWDLarge3D_FP16, | ||
testing::Combine(testing::ValuesIn(Network3DBN<BN3DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCDHW}), | ||
testing::ValuesIn({testBNAPIV2})), | ||
TestNameGenerator<BN3DTestCase>()); | ||
|
||
// // bfp16 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra //'s |
||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BNCKBWDLarge2D_BFP16, | ||
testing::Combine(testing::ValuesIn(Network2DLarge<BN2DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCHW, miopenTensorNHWC}), | ||
testing::ValuesIn({testBNAPIV2})), | ||
TestNameGenerator()); | ||
TestNameGenerator<BN2DTestCase>()); | ||
|
||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BN_OCL_BWD_Large_BFP16, | ||
testing::Combine(testing::ValuesIn(NetworkLarge<BNTestCase>()), | ||
GPU_BNOCLBWDLarge2D_BFP16, | ||
testing::Combine(testing::ValuesIn(Network2DLarge<BN2DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCHW}), | ||
testing::ValuesIn({testBNAPIV2})), | ||
TestNameGenerator()); | ||
TestNameGenerator<BN2DTestCase>()); | ||
|
||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BNOCLBWDLarge3D_BFP16, | ||
testing::Combine(testing::ValuesIn(Network3DBN<BN3DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCDHW}), | ||
testing::ValuesIn({testBNAPIV2})), | ||
TestNameGenerator<BN3DTestCase>()); | ||
|
||
// fp32 | ||
// // fp32 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra //'s |
||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BN_BWD_Small_FP32, | ||
testing::Combine(testing::ValuesIn(NetworkSmall<BNTestCase>()), | ||
GPU_BNBWDSmall2D_FP32, | ||
testing::Combine(testing::ValuesIn(Network2DSmall<BN2DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCHW}), | ||
testing::ValuesIn({testBNAPIV1})), | ||
TestNameGenerator()); | ||
TestNameGenerator<BN2DTestCase>()); | ||
|
||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BN_BWD_Large_FP32, | ||
testing::Combine(testing::ValuesIn(NetworkLarge<BNTestCase>()), | ||
GPU_BNBWDLarge2D_FP32, | ||
testing::Combine(testing::ValuesIn(Network2DLarge<BN2DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCHW}), | ||
testing::ValuesIn({testBNAPIV2})), | ||
TestNameGenerator()); | ||
// // fp64 | ||
TestNameGenerator<BN2DTestCase>()); | ||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BN_BWD_Small_FP64, | ||
testing::Combine(testing::ValuesIn(NetworkSmall<BNTestCase>()), | ||
GPU_BNBWDLarge3D_FP32, | ||
testing::Combine(testing::ValuesIn(Network3DBN<BN3DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCDHW}), | ||
testing::ValuesIn({testBNAPIV2})), | ||
TestNameGenerator<BN3DTestCase>()); | ||
// fp64 | ||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BNBWDSmall2D_FP64, | ||
testing::Combine(testing::ValuesIn(Network2DSmall<BN2DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCHW, miopenTensorNHWC}), | ||
testing::ValuesIn({testBNAPIV1})), | ||
TestNameGenerator()); | ||
|
||
TestNameGenerator<BN2DTestCase>()); | ||
// | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra //'s |
||
INSTANTIATE_TEST_SUITE_P(Smoke, | ||
GPU_BN_BWD_Large_FP64, | ||
testing::Combine(testing::ValuesIn(NetworkLarge<BNTestCase>()), | ||
GPU_BNBWDLarge2D_FP64, | ||
testing::Combine(testing::ValuesIn(Network2DLarge<BN2DTestCase>()), | ||
testing::ValuesIn({miopenTensorNCHW, miopenTensorNHWC}), | ||
testing::ValuesIn({testBNAPIV2})), | ||
TestNameGenerator()); | ||
TestNameGenerator<BN2DTestCase>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should start enforcing invalid types with compile-time failures (not just here, but for all of our tests). You could use std::enable_if, but it's so ugly...here's a cleaner idea: