Skip to content
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

[gtest] Combine gtests into single binary. #2599

Merged
merged 40 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
faac072
draft changes for combining gtest binaries
cderb Dec 11, 2023
ad3e487
more linking fixes
cderb Dec 12, 2023
645e289
add inline to avoid duplicate definition error
amberhassaan Dec 12, 2023
f094cc9
replace GetDataType with miopen_type
cderb Dec 12, 2023
85e64f8
Merge branch 'cderb/gtest_package' of https://github.com/ROCmSoftware…
cderb Dec 12, 2023
47ee6e0
fix template body missing error
amberhassaan Dec 12, 2023
457d265
fix linking issues
cderb Dec 12, 2023
3dc71ef
resolve compile errors
cderb Dec 12, 2023
c3229b8
Merge remote-tracking branch 'origin/develop' into cderb/gtest_package
cderb Dec 12, 2023
532c75f
reset hip_f8_impl
cderb Dec 12, 2023
3e9d843
resolve warnings, cleanup
cderb Dec 12, 2023
9c45745
remove if block from cmake
cderb Dec 13, 2023
1f87519
Merge branch 'develop' into cderb/gtest_package
cderb Dec 13, 2023
89f4782
add gtest binary to deb package
cderb Dec 14, 2023
b0d705d
Merge branch 'cderb/gtest_package' of https://github.com/ROCmSoftware…
cderb Dec 14, 2023
f529d95
tidy
cderb Dec 14, 2023
0f54296
Merge remote-tracking branch 'origin/develop' into cderb/gtest_package
cderb Dec 14, 2023
a6cbc3b
Merge remote-tracking branch 'origin/develop' into cderb/gtest_package
cderb Dec 14, 2023
c67f69e
move namespace for hip tidy to recognize gtest macro
cderb Dec 14, 2023
8ac0916
format
cderb Dec 15, 2023
f68938d
add flag for discrete gtest
cderb Dec 15, 2023
d912f17
Merge branch 'develop' into cderb/gtest_package
cderb Dec 15, 2023
7711895
fix ci call to test_db_sync
cderb Dec 15, 2023
d13348e
Merge branch 'cderb/gtest_package' of https://github.com/ROCmSoftware…
cderb Dec 15, 2023
48a16ba
Merge remote-tracking branch 'origin/develop' into cderb/gtest_package
cderb Dec 18, 2023
ce6a22c
add unique names for tests
cderb Dec 18, 2023
aeaa83f
resolve build conflicts
cderb Dec 18, 2023
9b8cfa4
add gtest precision checks, disable gtest pooling float
cderb Dec 18, 2023
eb3812c
default smoketest true, suspend nightly action
cderb Dec 18, 2023
1e7c6fc
test name + scope correction
cderb Dec 19, 2023
6d4e0e5
Merge branch 'cderb/gtest_package' of https://github.com/ROCmSoftware…
cderb Dec 19, 2023
5c88612
fix jenkins db_sync call
cderb Dec 19, 2023
ed002f5
Revert "[HotFix] revert #2580 and re-enable smoke tests (#2616)"
cderb Dec 19, 2023
7132297
Merge branch 'cderb/2580_revertx2' into cderb/gtest_package
cderb Dec 19, 2023
a13243f
Merge branch 'develop' into cderb/gtest_package
cderb Dec 19, 2023
fed0b7c
Merge remote-tracking branch 'origin/develop' into cderb/gtest_package
CAHEK7 Dec 20, 2023
b2eeb23
Merge branch 'develop' into cderb/gtest_package
junliume Dec 21, 2023
a719d15
Build discrete tests by default,
JehandadKhan Dec 21, 2023
cfdd95c
revert nightly workflow change
JehandadKhan Dec 21, 2023
996e342
Merge branch 'develop' into cderb/gtest_package
junliume Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def cmake_build(Map conf=[:]){

if (package_build == true) {
config_targets = "package"
setup_args = " -DMIOPEN_TEST_DISCRETE=OFF " + setup_args
}

def miopen_install_path = "${env.WORKSPACE}/install"
Expand Down Expand Up @@ -939,8 +940,8 @@ pipeline {
agent{ label rocmnode("gfx908") }
environment{
setup_flags="-DMIOPEN_TEST_DBSYNC=1"
config_targets='test_db_sync'
execute_cmd='./bin/test_db_sync'
config_targets='test_db_sync'
execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync'
}
steps{
buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, config_targets: config_targets, execute_cmd: execute_cmd,
Expand All @@ -958,8 +959,8 @@ pipeline {
agent{ label rocmnode("gfx90a") }
environment{
setup_flags="-DMIOPEN_TEST_DBSYNC=1"
config_targets='test_db_sync'
execute_cmd='./bin/test_db_sync'
config_targets='test_db_sync'
execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync'
}
steps{
buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, config_targets: config_targets, execute_cmd: execute_cmd,
Expand Down
23 changes: 1 addition & 22 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ option( MIOPEN_TEST_CONV "" OFF)
option( MIOPEN_TEST_DEEPBENCH "" OFF)
option( MIOPEN_TEST_DRIVER_ITER_MODE "" OFF)
option( MIOPEN_TEST_COMPOSABLEKERNEL "Test with composable_kernel library" ${MIOPEN_USE_COMPOSABLEKERNEL} )
option( MIOPEN_TEST_DISCRETE "Build Discrete Test Binaries" ON)

set_var_to_condition(MIOPEN_TEST_WITH_MIOPENDRIVER_DEFAULT MIOPEN_BUILD_DRIVER)
option( MIOPEN_TEST_WITH_MIOPENDRIVER "Use MIOpenDriver in tests" ${MIOPEN_TEST_WITH_MIOPENDRIVER_DEFAULT})
Expand Down Expand Up @@ -673,20 +674,6 @@ function(add_custom_test NAME)
set_tests_properties(${NAME} PROPERTIES DISABLED On)
endif()
endfunction()
if(${CODECOV_TEST})
add_custom_test(test_conv3d_codecov
COMMAND $<TARGET_FILE:test_conv3d> ${MIOPEN_TEST_FLOAT_ARG} --input 2 4 4 4 4 --weights 2 4 1 1 1 --pads_strides_dilations 0 0 0 1 1 1 1 1 1 ${MIOPEN_TEST_FLAGS_ARGS}
)
add_custom_test(test_immed_conv2d_codecov
COMMAND $<TARGET_FILE:test_immed_conv2d> ${MIOPEN_TEST_FLOAT_ARG} --input 2 2 14 14 --weights 8 2 3 3 --pads_strides_dilations 0 0 1 1 1 1 ${MIOPEN_TEST_FLAGS_ARGS}
)
add_custom_test(test_immed_conv3d_codecov
COMMAND $<TARGET_FILE:test_immed_conv3d> ${MIOPEN_TEST_FLOAT_ARG} --input 1 4 4 4 4 --weights 2 4 3 3 3 --pads_strides_dilations 0 0 0 1 1 1 1 1 1 ${MIOPEN_TEST_FLAGS_ARGS}
)
add_custom_test(test_pooling2d_codecov
COMMAND $<TARGET_FILE:test_pooling2d> ${MIOPEN_TEST_FLOAT_ARG} --input 1, 192, 28, 28 --lens 2 2 --strides 2 2 --pads 0 0 ${MIOPEN_TEST_FLAGS_ARGS}
)
endif()

if(${MIOPEN_TEST_WITH_MIOPENDRIVER})
add_custom_test(test_miopendriver_regression_issue_1576 SKIP_UNLESS_ALL GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED FLOAT_DISABLED HALF_ENABLED
Expand Down Expand Up @@ -776,14 +763,6 @@ set(TEST_CONV_VERBOSE_F ${MIOPEN_TEST_FLOAT_ARG} --verbose --disable-backward-da
set(TEST_CONV_VERBOSE_B ${MIOPEN_TEST_FLOAT_ARG} --verbose --disable-forward --disable-backward-weights)
set(TEST_CONV_VERBOSE_W ${MIOPEN_TEST_FLOAT_ARG} --verbose --disable-forward --disable-backward-data)

add_custom_test(test_pooling2d_asymmetric SKIP_UNLESS_ALL HALF_ENABLED GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED
COMMAND $<TARGET_FILE:test_pooling2d> ${MIOPEN_TEST_FLOAT_ARG} --all --dataset 1 --limit 0 ${MIOPEN_TEST_FLAGS_ARGS}
)

add_custom_test(test_pooling2d_wide SKIP_UNLESS_ALL HALF_ENABLED GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED
COMMAND $<TARGET_FILE:test_pooling2d> ${MIOPEN_TEST_FLOAT_ARG} --all --dataset 2 --limit 0 ${MIOPEN_TEST_FLAGS_ARGS}
)

set(IMPLICITGEMM_MLIR_ENV_F_XDLOPS ${IMPLICITGEMM_MLIR_ENV_BASE} MIOPEN_DEBUG_FIND_ONLY_SOLVER=ConvMlirIgemmFwdXdlops)
set(IMPLICITGEMM_MLIR_ENV_B_XDLOPS ${IMPLICITGEMM_MLIR_ENV_BASE} MIOPEN_DEBUG_FIND_ONLY_SOLVER=ConvMlirIgemmBwdXdlops)
set(IMPLICITGEMM_MLIR_ENV_W_XDLOPS ${IMPLICITGEMM_MLIR_ENV_BASE} MIOPEN_DEBUG_FIND_ONLY_SOLVER=ConvMlirIgemmWrWXdlops)
Expand Down
27 changes: 21 additions & 6 deletions test/immed_conv3d.cpp → test/conv3d.hpp
Copy link
Contributor

@atamazov atamazov Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming of .cpp to .hpp silently removes test_* executable, and, consequently, test_* --all from full tests etc.

Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
* SOFTWARE.
*
*******************************************************************************/
#include <gtest/gtest.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include "conv_common.hpp"

template <class T>
struct conv3d_driver : conv_driver<T, ConvApi::Immediate>
struct conv3d_driver : conv_driver<T>
{
conv3d_driver() : conv_driver<T, ConvApi::Immediate>()
conv3d_driver() : conv_driver<T>()
{
this->add(this->input_dims, "input");
this->add(this->weight_tensor_dims, "weights");
Expand All @@ -37,16 +38,16 @@ struct conv3d_driver : conv_driver<T, ConvApi::Immediate>
this->generate_data_limited(this->get_batch_sizes(), 1, {8}));
this->add(this->input_channels,
"input_channels",
this->generate_data_limited(this->get_input_channels(), 1, {2}));
this->generate_data_limited(this->get_input_channels(), 1, {32}));
this->add(this->output_channels,
"output_channels",
this->generate_data_limited(this->get_output_channels(), 1, {16}));
this->generate_data_limited(this->get_output_channels(), 1, {32}));
this->add(this->spatial_dim_elements,
"spatial_dim_elements",
this->generate_data_limited(this->get_3d_spatial_dims(), 1, {16, 16, 16}));
this->add(this->filter_dims,
"filter_dims",
this->generate_data_limited(this->get_3d_filter_dims(), 2, {5, 5, 5}));
this->generate_data_limited(this->get_3d_filter_dims(), 2, {3, 3, 3}));
this->add(this->pads_strides_dilations,
"pads_strides_dilations",
this->generate_data_limited(this->get_3d_pads_strides_dilations(), 2));
Expand All @@ -59,4 +60,18 @@ struct conv3d_driver : conv_driver<T, ConvApi::Immediate>
}
};

int main(int argc, const char* argv[]) { test_drive<conv3d_driver>(argc, argv); }
class Conv3dFloat : public testing::TestWithParam<std::vector<std::string>>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are all these class definitions exactly the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are ostensibly configuration definitions split by precision. Though in this instance their data is defined entirely by the test fetching function and as such have no defined members at this level. It's conceivable that they could be summarized into a single class.

{
};

class Conv3dHalf : public testing::TestWithParam<std::vector<std::string>>
{
};

class Conv3dBFloat16 : public testing::TestWithParam<std::vector<std::string>>
{
};

class Conv3dInt8 : public testing::TestWithParam<std::vector<std::string>>
{
};
Comment on lines +67 to +77
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These definitions are used by gtests only and should reside in gtest/*.cpp files within respective namespaces.

7 changes: 6 additions & 1 deletion test/driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,11 @@ void test_drive_impl_1(std::string program_name, std::vector<std::string> as)
Driver d{};
d.program_name = program_name;

std::cout << program_name << " ";
for(const auto& str : as)
std::cout << str << " ";
std::cout << std::endl;

std::set<std::string> keywords{
"--help", "-h", "--half", "--float", "--double", "--int8", "--bfloat16"};
d.parse(keyword_set{keywords});
Expand Down Expand Up @@ -1381,7 +1386,7 @@ template <template <class...> class Driver>
void test_drive(int argc, const char* argv[])
{
std::vector<std::string> as(argv + 1, argv + argc);
as.emplace_back("--float");
// as.emplace_back("--float");
for(auto&& arg : as)
{
if(arg == "--half")
Expand Down
82 changes: 51 additions & 31 deletions test/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,34 @@ set(SOURCES
)

if(MIOPEN_BACKEND_OPENCL)
set(SKIP_TESTS dumpTensorTest)
set(SKIP_TESTS dumpTensorTest.cpp)
endif()

function(add_gtest TEST_NAME)
if( NOT (TEST_NAME IN_LIST SKIP_TESTS))
message("Adding Test: " ${TEST_NAME})
add_executable(test_${TEST_NAME} ${TEST_NAME}.cpp ${SOURCES})
if(WIN32)
target_compile_definitions(test_${TEST_NAME} PRIVATE NOMINMAX)
endif()
add_dependencies(tests test_${TEST_NAME})
add_dependencies(check test_${TEST_NAME})
target_compile_options(test_${TEST_NAME} PRIVATE -Wno-global-constructors -Wno-undef)
target_include_directories(test_${TEST_NAME} PRIVATE ../ ../../src/kernels)
if(MIOPEN_ENABLE_AI_KERNEL_TUNING)
target_link_libraries(test_${TEST_NAME} frugally-deep::fdeep Eigen3::Eigen)
endif()
target_link_libraries(test_${TEST_NAME} GTest::gtest GTest::gtest_main MIOpen ${Boost_LIBRARIES} hip::host $<BUILD_INTERFACE:roc::rocblas>)
if(NOT MIOPEN_EMBED_DB STREQUAL "")
target_link_libraries(test_${TEST_NAME} $<BUILD_INTERFACE:miopen_data>)
endif()
if(NOT WIN32) # TODO: cannot run on Windows due to missing DLL dependencies
# Enable CMake to discover the test binary
gtest_discover_tests(test_${TEST_NAME} PROPERTIES ENVIRONMENT "MIOPEN_USER_DB_PATH=${CMAKE_CURRENT_BINARY_DIR};MIOPEN_TEST_FLOAT_ARG=${MIOPEN_TEST_FLOAT_ARG};MIOPEN_TEST_ALL=${MIOPEN_TEST_ALL};MIOPEN_TEST_MLIR=${MIOPEN_TEST_MLIR};MIOPEN_TEST_COMPOSABLEKERNEL=${MIOPEN_TEST_COMPOSABLEKERNEL}")
endif()

if(WIN32)
# Refer to https://en.cppreference.com/w/cpp/language/types for details.
target_compile_options(test_${TEST_NAME} PRIVATE $<BUILD_INTERFACE:$<$<CXX_COMPILER_ID:Clang>:-U__LP64__>>)
endif()
function(add_gtest TEST_NAME TEST_CPP)
message("Adding Test: " ${TEST_NAME} " : " ${TEST_CPP})
add_executable(${TEST_NAME} ${TEST_CPP} ${SOURCES})
if(WIN32)
target_compile_definitions(${TEST_NAME} PRIVATE NOMINMAX)
endif()
add_dependencies(tests ${TEST_NAME})
add_dependencies(check ${TEST_NAME})
target_compile_options(${TEST_NAME} PRIVATE -Wno-global-constructors -Wno-undef)
target_include_directories(${TEST_NAME} PRIVATE ../ ../../src/kernels)
if(MIOPEN_ENABLE_AI_KERNEL_TUNING)
target_link_libraries(${TEST_NAME} frugally-deep::fdeep Eigen3::Eigen)
endif()
target_link_libraries(${TEST_NAME} GTest::gtest GTest::gtest_main MIOpen ${Boost_LIBRARIES} hip::host $<BUILD_INTERFACE:roc::rocblas>)
if(NOT MIOPEN_EMBED_DB STREQUAL "")
target_link_libraries(${TEST_NAME} $<BUILD_INTERFACE:miopen_data>)
endif()
if(NOT WIN32) # TODO: cannot run on Windows due to missing DLL dependencies
# Enable CMake to discover the test binary
gtest_discover_tests(${TEST_NAME} PROPERTIES ENVIRONMENT "MIOPEN_USER_DB_PATH=${CMAKE_CURRENT_BINARY_DIR};MIOPEN_TEST_FLOAT_ARG=${MIOPEN_TEST_FLOAT_ARG};MIOPEN_TEST_ALL=${MIOPEN_TEST_ALL};MIOPEN_TEST_MLIR=${MIOPEN_TEST_MLIR};MIOPEN_TEST_COMPOSABLEKERNEL=${MIOPEN_TEST_COMPOSABLEKERNEL};CODECOV_TEST=${CODECOV_TEST};MIOPEN_TEST_DBSYNC=${MIOPEN_TEST_DBSYNC}")
endif()

if(WIN32)
# Refer to https://en.cppreference.com/w/cpp/language/types for details.
target_compile_options(${TEST_NAME} PRIVATE $<BUILD_INTERFACE:$<$<CXX_COMPILER_ID:Clang>:-U__LP64__>>)
endif()
endfunction()

Expand All @@ -46,7 +44,29 @@ foreach(SOURCE ${SOURCES})
list(REMOVE_ITEM TESTS ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE})
endforeach()

foreach(TEST ${TESTS})
get_filename_component(BASE_NAME ${TEST} NAME_WE)
add_gtest(${BASE_NAME})
foreach(SOURCE ${SKIP_TESTS})
list(REMOVE_ITEM TESTS ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE})
endforeach()

if( MIOPEN_TEST_DISCRETE )
foreach(TEST ${TESTS})
get_filename_component(BASE_NAME ${TEST} NAME_WE)
add_gtest(test_${BASE_NAME} ${BASE_NAME}.cpp)
endforeach()

else()
foreach(TEST ${TESTS})
get_filename_component(BASE_NAME ${TEST} NAME)
list(APPEND TESTS_CPP ${BASE_NAME})
endforeach()

add_gtest(miopen_gtest "${TESTS_CPP}")

if( NOT ENABLE_ASAN_PACKAGING )
install(TARGETS miopen_gtest
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
endif()


2 changes: 1 addition & 1 deletion test/gtest/ai_heuristics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

struct AIModelTestCase
{
struct ConvTestCase conv;
struct ConvTestCaseBase conv;
miopen::conv::Direction direction;
miopenDataType_t data_type;
miopenTensorLayout_t layout;
Expand Down
21 changes: 9 additions & 12 deletions test/gtest/bad_fusion_plan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@

#include "tensor_holder.hpp"
#include "get_handle.hpp"
#include "conv_test_base.hpp"

#if MIOPEN_BACKEND_HIP

namespace bad_fusion_plan {

void setEnvironmentVariable(const std::string& name, const std::string& value)
{
int ret = 0;
Expand All @@ -45,16 +48,7 @@ void setEnvironmentVariable(const std::string& name, const std::string& value)
EXPECT_EQ(ret, 0);
}

template <typename T>
miopenDataType_t GetDataType();

template <>
miopenDataType_t GetDataType<half_float::half>()
{
return miopenHalf;
}

struct ConvTestCase
struct ConvTestCaseFusion
{
size_t N;
size_t C;
Expand All @@ -69,7 +63,7 @@ struct ConvTestCase
size_t stride_y;
size_t dilation_x;
size_t dilation_y;
friend std::ostream& operator<<(std::ostream& os, const ConvTestCase& tc)
friend std::ostream& operator<<(std::ostream& os, const ConvTestCaseFusion& tc)
{
return os << "(N: " << tc.N << " C:" << tc.C << " H:" << tc.H << " W:" << tc.W
<< " k: " << tc.k << " y:" << tc.y << " x:" << tc.x << " pad_y:" << tc.pad_y
Expand All @@ -88,7 +82,7 @@ struct ConvTestCase
}
};

const static ConvTestCase conv_config = {64, 64, 56, 56, 64, 3, 3, 1, 1, 1, 1, 1, 1};
const static ConvTestCaseFusion conv_config = {64, 64, 56, 56, 64, 3, 3, 1, 1, 1, 1, 1, 1};

template <typename Solver, typename T>
class TestFusionPlan
Expand Down Expand Up @@ -172,6 +166,9 @@ class TestFusionPlan
bool skip_test;
};

} // namespace bad_fusion_plan
using namespace bad_fusion_plan;

TEST(TestFusionPlan, GoodFusionPlan)
{
TestFusionPlan<miopen::solver::fusion::ConvCKIgemmFwdBiasActivFused, half_float::half> obj(
Expand Down
8 changes: 4 additions & 4 deletions test/gtest/bn_bwd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ TEST_P(BNBwdTestDouble, DISABLED_BnBwdCKDouble) {}

INSTANTIATE_TEST_SUITE_P(BNBwdTestTestHalfNHWCSuite,
BNBwdTestTestHalf,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));

INSTANTIATE_TEST_SUITE_P(BNBwdTestFloatNHWCSuite,
BNBwdTestFloat,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));

INSTANTIATE_TEST_SUITE_P(BNBwdTestBFloat16NHWCSuite,
BNBwdTestBFloat16,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));

INSTANTIATE_TEST_SUITE_P(BNBwdTestDoubleNHWCSuite,
BNBwdTestDouble,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));
8 changes: 4 additions & 4 deletions test/gtest/bn_fwd_train.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ TEST_P(BNFwdTrainTestBFloat16, DISABLED_BnFwdTrainCKBFloat16) {}

INSTANTIATE_TEST_SUITE_P(BNFwdTrainTestHalfNHWCSuite,
BNFwdTrainTestHalf,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));

INSTANTIATE_TEST_SUITE_P(BNFwdTrainTestFloatNHWCSuite,
BNFwdTrainTestFloat,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));

INSTANTIATE_TEST_SUITE_P(BNFwdTrainTestFloatNHWCSuite,
BNFwdTrainTestDouble,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));

INSTANTIATE_TEST_SUITE_P(BNFwdTrainTestFloatNHWCSuite,
BNFwdTrainTestBFloat16,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));
8 changes: 4 additions & 4 deletions test/gtest/bn_infer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ TEST_P(BNInferTestBFloat16, DISABLED_BnInferCKBFloat16) {}

INSTANTIATE_TEST_SUITE_P(BNInferTestHalfNHWCSuite,
BNInferTestHalf,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));

INSTANTIATE_TEST_SUITE_P(BNInferTestFloatNHWCSuite,
BNInferTestFloat,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));

INSTANTIATE_TEST_SUITE_P(BNInferTestFloatNHWCSuite,
BNInferTestDouble,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));

INSTANTIATE_TEST_SUITE_P(BNInferTestFloatNHWCSuite,
BNInferTestBFloat16,
testing::Combine(testing::ValuesIn(Network1()),
testing::Combine(testing::ValuesIn(Network1<BNTestCase>()),
testing::Values(miopenTensorNHWC)));
Loading