diff --git a/Jenkinsfile b/Jenkinsfile index 0417571e50..694c9c53cd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,6 +48,7 @@ def cmake_build(Map conf=[:]){ if (package_build == true) { make_targets = "package" + setup_args = " -DMIOPEN_TEST_DISCRETE=OFF " + setup_args } def miopen_install_path = "${env.WORKSPACE}/install" @@ -953,7 +954,7 @@ pipeline { environment{ setup_flags="-DMIOPEN_TEST_DBSYNC=1" make_targets='test_db_sync' - execute_cmd='./bin/test_db_sync' + execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync' } steps{ buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, make_targets: make_targets, execute_cmd: execute_cmd, @@ -972,7 +973,7 @@ pipeline { environment{ setup_flags="-DMIOPEN_TEST_DBSYNC=1" make_targets='test_db_sync' - execute_cmd='./bin/test_db_sync' + execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync' } steps{ buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, make_targets: make_targets, execute_cmd: execute_cmd, diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9940bfe1ff..d36be3146b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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}) @@ -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 $ ${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 $ ${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 $ ${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 $ ${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 @@ -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 $ ${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 $ ${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) diff --git a/test/immed_conv3d.cpp b/test/conv3d.hpp similarity index 84% rename from test/immed_conv3d.cpp rename to test/conv3d.hpp index a968cd6100..8cb7940ca2 100644 --- a/test/immed_conv3d.cpp +++ b/test/conv3d.hpp @@ -23,12 +23,13 @@ * SOFTWARE. * *******************************************************************************/ +#include #include "conv_common.hpp" template -struct conv3d_driver : conv_driver +struct conv3d_driver : conv_driver { - conv3d_driver() : conv_driver() + conv3d_driver() : conv_driver() { this->add(this->input_dims, "input"); this->add(this->weight_tensor_dims, "weights"); @@ -37,16 +38,16 @@ struct conv3d_driver : conv_driver 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)); @@ -59,4 +60,18 @@ struct conv3d_driver : conv_driver } }; -int main(int argc, const char* argv[]) { test_drive(argc, argv); } +class Conv3dFloat : public testing::TestWithParam> +{ +}; + +class Conv3dHalf : public testing::TestWithParam> +{ +}; + +class Conv3dBFloat16 : public testing::TestWithParam> +{ +}; + +class Conv3dInt8 : public testing::TestWithParam> +{ +}; diff --git a/test/driver.hpp b/test/driver.hpp index 825a0d4511..97896d6c5d 100644 --- a/test/driver.hpp +++ b/test/driver.hpp @@ -1242,6 +1242,11 @@ void test_drive_impl_1(std::string program_name, std::vector 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 keywords{ "--help", "-h", "--half", "--float", "--double", "--int8", "--bfloat16"}; d.parse(keyword_set{keywords}); @@ -1381,7 +1386,7 @@ template