From 5806e235f96e75046f8a5cb441d1c641911be07e Mon Sep 17 00:00:00 2001 From: atamazov Date: Fri, 27 Oct 2023 19:12:19 +0300 Subject: [PATCH 1/4] tests-small-fixes-ata01(01) [tests] Some clarifications --- test/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9960c1c38e..01b2839c57 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -750,14 +750,14 @@ if(${MIOPEN_TEST_WITH_MIOPENDRIVER}) set_tests_properties(test_miopendriver_regression_big_tensor PROPERTIES TIMEOUT 600) - add_custom_test(test_miopendriver_regression_half_gfx9 SKIP_UNLESS_ALL GFX900_DISABLED GFX906_DISABLED GFX908_DISABLED GFX90A_ENABLED GFX94X_ENABLED GFX103X_DISABLED FLOAT_DISABLED HALF_ENABLED + add_custom_test(test_miopendriver_regression_half_gfx9 SKIP_UNLESS_ALL GFX900_DISABLED GFX906_DISABLED GFX908_DISABLED GFX94X_ENABLED GFX103X_DISABLED FLOAT_DISABLED HALF_ENABLED # Regression test for: # [SWDEV-375617] Fix 3d convolution Host API bug # https://github.com/ROCmSoftwarePlatform/MIOpen/pull/1935 COMMAND $ ${MIOPENDRIVER_MODE_CONV} -n 2 -c 64 --in_d 128 -H 128 -W 128 -k 32 --fil_d 3 -y 3 -x 3 --pad_d 1 -p 1 -q 1 --conv_stride_d 1 -u 1 -v 1 --dilation_d 1 -l 1 -j 1 --spatial_dim 3 -m conv -g 1 -F 1 -t 1 ) - add_custom_test(test_miopendriver_regression OCL_DISABLED GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED HALF_ENABLED BF16_ENABLED INT8_ENABLED + add_custom_test(test_miopendriver_regression_issue_2047 OCL_DISABLED GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED HALF_ENABLED BF16_ENABLED INT8_ENABLED # Regression test for: MIOpenIm3d2Col stuck with ROCm update, https://github.com/ROCmSoftwarePlatform/MIOpen/issues/2047 COMMAND MIOPEN_FIND_MODE=normal MIOPEN_DEBUG_FIND_ONLY_SOLVER=GemmFwdRest $ ${MIOPENDRIVER_MODE_CONV} From 8453c2c68c34a0ffe166eab33287b174e22830ba Mon Sep 17 00:00:00 2001 From: atamazov Date: Fri, 27 Oct 2023 20:45:22 +0300 Subject: [PATCH 2/4] tests-small-fixes-ata01(02) [tests] Do not print rocminfo output unless GPU detection failed. Resolves https://github.com/ROCmSoftwarePlatform/MIOpen/pull/2396/files#r1374642705 --- test/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 01b2839c57..06e13cc69e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -117,7 +117,6 @@ if(NOT (MIOPEN_TEST_GFX900 OR MIOPEN_TEST_GFX906 OR MIOPEN_TEST_GFX908 OR MIOPEN OUTPUT_VARIABLE ROCMINFO_OUTPUT RESULT_VARIABLE ROCMINFO_EXIT_STATUS ) - message(STATUS "${ROCMINFO_OUTPUT}") if(ROCMINFO_OUTPUT MATCHES "no GPU devices") message(WARNING "ROCk module is NOT loaded, possibly no GPU devices") set(MIOPEN_NO_GPU TRUE) @@ -152,6 +151,10 @@ if(NOT (MIOPEN_TEST_GFX900 OR MIOPEN_TEST_GFX906 OR MIOPEN_TEST_GFX908 OR MIOPEN if(NOT (MIOPEN_TEST_GPU_DETECTION_FAILED) AND ROCMINFO_OUTPUT MATCHES "xnack\\+") set(MIOPEN_TEST_GPU_XNACK_ENABLED ON) endif() + + if(MIOPEN_TEST_GPU_DETECTION_FAILED) + message(STATUS "${ROCMINFO_OUTPUT}") + endif() else() message(WARNING "ROCMINFO NOT FOUND, GPU TYPE UNKNOWN. Manually set respective MIOPEN_TEST_GFX* CMake variable to specify target GPU for testing.") set(MIOPEN_TEST_GPU_DETECTION_FAILED TRUE) From 5bf9244a932446c50f6ee3ffd5b476ce5ee353aa Mon Sep 17 00:00:00 2001 From: atamazov Date: Fri, 27 Oct 2023 21:13:52 +0300 Subject: [PATCH 3/4] tests-small-fixes-ata01(03) [tests] Removed support for OCL backend --- test/CMakeLists.txt | 50 ++++++++++----------------------------------- 1 file changed, 11 insertions(+), 39 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 06e13cc69e..3a3691762a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -81,11 +81,6 @@ set(MIOPEN_TEST_LIMIT "2" CACHE STRING "") set(MIOPEN_TEST_FLAGS "" CACHE STRING "") set(MIOPEN_TEST_GDB On CACHE BOOL "") -set(MIOPEN_TEST_OPENCL FALSE) -if(MIOPEN_BACKEND_OPENCL) - set(MIOPEN_TEST_OPENCL TRUE) -endif() - set(MIOPEN_TEST_HIP_NOGPU FALSE) if(MIOPEN_MODE_NOGPU) set(MIOPEN_TEST_HIP_NOGPU TRUE) @@ -241,11 +236,7 @@ option( WORKAROUND_ISSUE_1187 "" ${WORKAROUND_ISSUE_1187_DEFAULT}) set_var_to_condition(WORKAROUND_ISSUE_1148_DEFAULT (MIOPEN_TEST_GFX103X OR MIOPEN_TEST_GFX110X) AND MIOPEN_TEST_FLOAT) option( WORKAROUND_ISSUE_1148 "" ${WORKAROUND_ISSUE_1148_DEFAULT}) -if(MIOPEN_TEST_HALF) - if(MIOPEN_BACKEND_OPENCL) - set(SKIP_TESTS test_gru test_rnn_vanilla test_lstm) - endif() -elseif(MIOPEN_TEST_INT8) +if(MIOPEN_TEST_INT8) set(SKIP_ALL_EXCEPT_TESTS test_tensor_vec test_tensor_cast test_tensor_trans test_tensor_copy test_tensor_set test_tensor_transform test_conv2d test_conv2d_find2) @@ -271,16 +262,6 @@ if(MIOPEN_NO_GPU) test_pooling3d test_perfdb) endif() -#TODO Code Quality WORKAROUND ROCm 5.1 update -if(MIOPEN_BACKEND_OPENCL AND MIOPEN_TEST_ALL) - if(MIOPEN_TEST_GFX900 OR MIOPEN_TEST_GFX906) - list(APPEND SKIP_TESTS test_conv3d test_immed_conv3d test_immed_conv2d test_conv3d_find2) - endif() - if(MIOPEN_TEST_GFX103X OR MIOPEN_TEST_GFX110X) - list(APPEND SKIP_TESTS test_conv3d test_immed_conv3d test_immed_conv2d test_conv3d_find2) - endif() -endif() - #TODO WORKAROUND_ISSUE_1424 if(MIOPEN_TEST_GFX900 OR MIOPEN_TEST_GFX906 OR MIOPEN_TEST_GFX908) list(APPEND SKIP_TESTS test_bn_3d_spatial_test) @@ -539,9 +520,9 @@ endfunction() # SKIP_UNLESS_MLIR - The test should be only run if MIOPEN_TEST_MLIR=TRUE. # SKIP_UNLESS_COMPOSABLEKERNEL - The test should be only run if MIOPEN_TEST_COMPOSABLEKERNEL=TRUE. # -# Backend: OCL HIP HIP_NOGPU +# Backend: HIP HIP_NOGPU # These attributes can be enabled or disabled by using '_ENABLED' and '_DISABLED' suffix. -# Default: OCL_ENABLED HIP_ENABLED HIP_NOGPU_DISABLED. +# Default: HIP_ENABLED HIP_NOGPU_DISABLED. function(add_custom_test NAME) set(options @@ -549,7 +530,7 @@ function(add_custom_test NAME) GFX900_ENABLED GFX900_DISABLED GFX906_ENABLED GFX906_DISABLED GFX908_ENABLED GFX908_DISABLED GFX103X_ENABLED GFX103X_DISABLED GFX110X_ENABLED GFX110X_DISABLED GFX90A_ENABLED GFX90A_DISABLED GFX94X_ENABLED GFX94X_DISABLED SKIP_UNLESS_MLIR SKIP_UNLESS_COMPOSABLEKERNEL SKIP_UNLESS_ALL TEST_PERF_DB_RECORD_NOT_FOUND TEST_TUNING SKIP_XNACK_ON - OCL_ENABLED OCL_DISABLED HIP_ENABLED HIP_DISABLED HIP_NOGPU_ENABLED HIP_NOGPU_DISABLED + HIP_ENABLED HIP_DISABLED HIP_NOGPU_ENABLED HIP_NOGPU_DISABLED ) set(oneValueArgs) set(multiValueArgs) @@ -586,12 +567,6 @@ function(add_custom_test NAME) bool_not_f(${PARSE_SKIP_UNLESS_COMPOSABLEKERNEL} is_composablekernel_check) bool_or_f(${is_composablekernel_check} ${MIOPEN_TEST_COMPOSABLEKERNEL} is_composablekernel_check) - set(is_ocl_check) - set(OCL_TEST_DEFAULT TRUE) - option_support_check(${PARSE_OCL_ENABLED} ${PARSE_OCL_DISABLED} ${OCL_TEST_DEFAULT} is_ocl_check) - bool_not_f(${MIOPEN_TEST_OPENCL} NOT_MIOPEN_TEST_OPENCL) - bool_or_f(${NOT_MIOPEN_TEST_OPENCL} ${is_ocl_check} is_ocl_check) - set(is_hip_check) set(HIP_TEST_DEFAULT TRUE) option_support_check(${PARSE_HIP_ENABLED} ${PARSE_HIP_DISABLED} ${HIP_TEST_DEFAULT} is_hip_check) @@ -679,7 +654,7 @@ function(add_custom_test NAME) AND is_mlir_check AND is_composablekernel_check AND (is_half_check OR is_bfloat16_check OR is_int8_check OR is_float_check) - AND (is_ocl_check AND is_hip_check AND is_hip_nogpu_check) + AND (is_hip_check AND is_hip_nogpu_check) ) if(PARSE_TEST_PERF_DB_RECORD_NOT_FOUND AND PARSE_TEST_TUNING) message(FATAL_ERROR " TEST_PERF_DB_RECORD_NOT_FOUND and TEST_TUNING should not be used together") @@ -760,7 +735,7 @@ if(${MIOPEN_TEST_WITH_MIOPENDRIVER}) COMMAND $ ${MIOPENDRIVER_MODE_CONV} -n 2 -c 64 --in_d 128 -H 128 -W 128 -k 32 --fil_d 3 -y 3 -x 3 --pad_d 1 -p 1 -q 1 --conv_stride_d 1 -u 1 -v 1 --dilation_d 1 -l 1 -j 1 --spatial_dim 3 -m conv -g 1 -F 1 -t 1 ) - add_custom_test(test_miopendriver_regression_issue_2047 OCL_DISABLED GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED HALF_ENABLED BF16_ENABLED INT8_ENABLED + add_custom_test(test_miopendriver_regression_issue_2047 GFX94X_ENABLED GFX103X_ENABLED GFX110X_ENABLED HALF_ENABLED BF16_ENABLED INT8_ENABLED # Regression test for: MIOpenIm3d2Col stuck with ROCm update, https://github.com/ROCmSoftwarePlatform/MIOpen/issues/2047 COMMAND MIOPEN_FIND_MODE=normal MIOPEN_DEBUG_FIND_ONLY_SOLVER=GemmFwdRest $ ${MIOPENDRIVER_MODE_CONV} @@ -1663,11 +1638,6 @@ add_custom_test(test_regression_half_mi100 SKIP_UNLESS_ALL FLOAT_DISABLED HALF_E COMMAND MIOPEN_FIND_MODE=normal MIOPEN_DEBUG_FIND_ONLY_SOLVER=ConvHipImplicitGemmBwdDataV4R1Xdlops $ ${MIOPEN_TEST_FLOAT_ARG} --verbose --input 128 24 14 14 --weights 64 24 5 5 --pads_strides_dilations 2 2 1 1 1 1 --disable-forward --disable-backward-weights ) -add_custom_test(test_regression_float_mi100 SKIP_UNLESS_ALL GFX900_DISABLED GFX906_DISABLED GFX90A_DISABLED -# Regression test for SWDEV-305815 (issue 1206) -COMMAND ${IMPLICITGEMM_TESTING_ENV} MIOPEN_LOG_LEVEL=5 $ ${MIOPEN_TEST_FLOAT_ARG} --verbose --input 32 256 38 38 --weights 256 256 1 1 --pads_strides_dilations 0 0 1 1 1 1 --disable-forward --disable-backward-weights -) - # MIOPEN_DEBUG_CONV_CK_IGEMM_FWD_V6R1_DLOPS_NCHW is explicitly enabled due to the kernel is disabled by default via #2306 set(CONV_CK_IGEMM_FWD_V6R1_DLOPS_NCHW_ENV MIOPEN_FIND_MODE=normal @@ -2099,7 +2069,7 @@ add_custom_test(smoke_solver_ConvHipImplicitGemmForwardV4R5Xdlops GFX900_DISABLE ${TEST_CONV_VERBOSE_F} --input 128 16 54 54 --weights 64 16 3 3 --pads_strides_dilations 1 1 1 1 1 1 ${MIOPEN_TEST_FLAGS_ARGS} ) -add_custom_test(smoke_solver_ConvHipImplicitGemmFwdXdlops OCL_DISABLED GFX900_DISABLED GFX906_DISABLED GFX90A_DISABLED GFX94X_ENABLED HALF_ENABLED INT8_ENABLED +add_custom_test(smoke_solver_ConvHipImplicitGemmFwdXdlops GFX900_DISABLED GFX906_DISABLED GFX90A_DISABLED GFX94X_ENABLED HALF_ENABLED INT8_ENABLED SKIP_UNLESS_COMPOSABLEKERNEL TEST_TUNING COMMAND MIOPEN_FIND_ENFORCE=SEARCH_DB_UPDATE MIOPEN_DEBUG_TUNING_ITERATIONS_MAX=5 MIOPEN_FIND_MODE=normal MIOPEN_DEBUG_FIND_ONLY_SOLVER=ConvHipImplicitGemmFwdXdlops $ @@ -2186,7 +2156,7 @@ add_custom_test(smoke_solver_ConvWinogradFuryRxSf2x3_f16 GFX900_DISABLED GFX906_ ) # FP16 ALT attribute is disabled to enable the backward solver on MI200 for HALF. -add_custom_test(smoke_solver_ConvWinograd3x3MultipassWrW HALF_ENABLED BF16_ENABLED SKIP_XNACK_ON OCL_DISABLED +add_custom_test(smoke_solver_ConvWinograd3x3MultipassWrW HALF_ENABLED BF16_ENABLED SKIP_XNACK_ON COMMAND MIOPEN_DEBUG_CONVOLUTION_ATTRIB_FP16_ALT_IMPL=0 MIOPEN_FIND_MODE=normal MIOPEN_DEBUG_FIND_ONLY_SOLVER='ConvWinograd3x3MultipassWrW<3-2>' $ ${TEST_CONV_VERBOSE_W} --input 1 16 24 24 --weights 16 16 3 3 --pads_strides_dilations 1 1 2 2 1 1 ${MIOPEN_TEST_FLAGS_ARGS} @@ -2288,7 +2258,7 @@ set(ARGS_REGRESSION_ISSUE_1012 --disable-backward-data --disable-validation) -add_custom_test(test_regression_opencl_float_mi100 GFX900_DISABLED GFX906_DISABLED HIP_DISABLED GFX90A_DISABLED +add_custom_test(test_regression_float_mi100 GFX900_DISABLED GFX906_DISABLED GFX90A_DISABLED # Issue #1012. COMMAND ${ENVS_REGRESSION_ISSUE_1012} $ ${MIOPEN_TEST_FLOAT_ARG} --cmode conv --pmode default --group-count 1 --input 128, 832, 7, 7 --weights 32, 832, 1, 1 --pads_strides_dilations 0 0 1 1 1 1 ${ARGS_REGRESSION_ISSUE_1012} COMMAND ${ENVS_REGRESSION_ISSUE_1012} $ ${MIOPEN_TEST_FLOAT_ARG} --cmode conv --pmode default --group-count 1 --input 64, 192, 28, 28 --weights 64, 192, 1, 1 --pads_strides_dilations 0 0 1 1 1 1 ${ARGS_REGRESSION_ISSUE_1012} @@ -2297,6 +2267,8 @@ add_custom_test(test_regression_opencl_float_mi100 GFX900_DISABLED GFX906_DISABL COMMAND ${ENVS_REGRESSION_ISSUE_1012} $ ${MIOPEN_TEST_FLOAT_ARG} --cmode conv --pmode default --group-count 1 --input 64, 512, 14, 14 --weights 128, 512, 1, 1 --pads_strides_dilations 0 0 1 1 1 1 ${ARGS_REGRESSION_ISSUE_1012} COMMAND ${ENVS_REGRESSION_ISSUE_1012} $ ${MIOPEN_TEST_FLOAT_ARG} --cmode conv --pmode default --group-count 1 --input 64, 512, 28, 28 --weights 128, 512, 1, 1 --pads_strides_dilations 0 0 1 1 1 1 ${ARGS_REGRESSION_ISSUE_1012} COMMAND ${ENVS_REGRESSION_ISSUE_1012} $ ${MIOPEN_TEST_FLOAT_ARG} --cmode conv --pmode default --group-count 1 --input 64, 64, 56, 56 --weights 256, 64, 1, 1 --pads_strides_dilations 0 0 1 1 1 1 ${ARGS_REGRESSION_ISSUE_1012} + # SWDEV-305815 (issue 1206) + COMMAND ${IMPLICITGEMM_TESTING_ENV} MIOPEN_LOG_LEVEL=5 $ ${MIOPEN_TEST_FLOAT_ARG} --verbose --input 32 256 38 38 --weights 256 256 1 1 --pads_strides_dilations 0 0 1 1 1 1 --disable-forward --disable-backward-weights ) set(ENVS_FIND_ONLY_HIP_IGEMM_V4R4XDLOPS From 116d3c97b9a4510ccd1ed1352d6cc9be18a23dee Mon Sep 17 00:00:00 2001 From: atamazov Date: Mon, 30 Oct 2023 17:15:09 +0300 Subject: [PATCH 4/4] tests-small-fixes-ata01(06) [tests] Resolve https://github.com/ROCmSoftwarePlatform/MIOpen/pull/2380#discussion_r1376250045 --- test/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 24a0cfce11..5fedc96c08 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1665,7 +1665,8 @@ add_custom_test(test_conv_igemm_dynamic_dlops_nchwc_chwnc_fwd_fp16x8 SKIP_UNLESS ) add_custom_test(test_regression_half_mi100 SKIP_UNLESS_ALL FLOAT_DISABLED HALF_ENABLED GFX908_ENABLED GFX900_DISABLED GFX906_DISABLED GFX90A_DISABLED -# Regression test for SWDEV-291202 + # Regression test for SWDEV-291202 + ENVIRONMENT MIOPEN_FIND_MODE=normal MIOPEN_DEBUG_FIND_ONLY_SOLVER=ConvHipImplicitGemmBwdDataV4R1Xdlops COMMAND $ ${MIOPEN_TEST_FLOAT_ARG} --verbose --input 128 24 14 14 --weights 64 24 5 5 --pads_strides_dilations 2 2 1 1 1 1 --disable-forward --disable-backward-weights )