diff --git a/Jenkinsfile b/Jenkinsfile index e19a4ffacf..0417571e50 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ def show_node_info() { def cmake_build(Map conf=[:]){ def compiler = conf.get("compiler","/opt/rocm/llvm/bin/clang++") - def config_targets = conf.get("config_targets","check") + def make_targets = conf.get("make_targets","check") def debug_flags = "-g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=undefined -Wno-option-ignored " + conf.get("extradebugflags", "") def build_envs = "CTEST_PARALLEL_LEVEL=4 MIOPEN_CONV_PRECISE_ROCBLAS_TIMING=0 " + conf.get("build_env","") def prefixpath = conf.get("prefixpath","/opt/rocm") @@ -47,13 +47,13 @@ def cmake_build(Map conf=[:]){ def package_build = (conf.get("package_build","") == "true") if (package_build == true) { - config_targets = "package" + make_targets = "package" } def miopen_install_path = "${env.WORKSPACE}/install" if(conf.get("build_install","") == "true") { - config_targets = 'install ' + config_targets + make_targets = 'install ' + make_targets setup_args = " -DBUILD_DEV=Off -DCMAKE_INSTALL_PREFIX=${miopen_install_path}" + setup_args } else{ setup_args = ' -DBUILD_DEV=On' + setup_args @@ -110,7 +110,7 @@ def cmake_build(Map conf=[:]){ def setup_cmd = conf.get("setup_cmd", "${cmake_envs} cmake ${setup_args} .. ") // WORKAROUND_SWDEV_290754 // It seems like this W/A is not required since 4.5. - def build_cmd = conf.get("build_cmd", "LLVM_PATH=/opt/rocm/llvm ${build_envs} dumb-init make -j\$(nproc) ${config_targets}") + def build_cmd = conf.get("build_cmd", "LLVM_PATH=/opt/rocm/llvm ${build_envs} dumb-init make -j\$(nproc) ${make_targets}") def execute_cmd = conf.get("execute_cmd", "") def cmd = conf.get("cmd", """ @@ -149,7 +149,7 @@ def cmake_build(Map conf=[:]){ def cmake_fin_build_cmd(prefixpath){ def flags = "-DCMAKE_INSTALL_PREFIX=${prefixpath} -DCMAKE_BUILD_TYPE=release" def compiler = 'clang++' - def config_targets = "install" + def make_targets = "install" def compilerpath = "/opt/rocm/llvm/bin/" + compiler def configargs = "" if (prefixpath != "") @@ -164,7 +164,7 @@ def cmake_fin_build_cmd(prefixpath){ mkdir build cd build CXX=${compilerpath} cmake ${configargs} ${flags} .. - dumb-init make -j\$(nproc) ${config_targets} + dumb-init make -j\$(nproc) ${make_targets} """ return fin_cmd } @@ -406,8 +406,8 @@ def CheckPerfDbValid(Map conf=[:]){ /// * The default compiler is usually not specified. /// BuildType := { Release* | Debug | Install } [ BuildTypeModifier ] /// * BuildTypeModifier := { NOCOMGR | Embedded | Static | Normal-Find | Fast-Find -/// CK | NOMLIR | Tensile | Tensile-Latest | Package | ... } -/// TestSet := { All | Smoke* | Performance Dataset } [ Codecov ] +/// NOCK | NOMLIR | Tensile | Tensile-Latest | Package | ... } +/// TestSet := { All | Smoke* | | Build-only } [ Codecov ] /// * "All" corresponds to "cmake -DMIOPEN_TEST_ALL=On". /// * "Smoke" (-DMIOPEN_TEST_ALL=Off) is the default and usually not specified. /// * "Codecov" is optional code coverage analysis. @@ -613,7 +613,7 @@ pipeline { fin_flags = "-DMIOPEN_BACKEND=HIPNOGPU" } steps{ - buildHipClangJobAndReboot(setup_flags: fin_flags, config_targets: "all", build_fin: "ON", needs_gpu:false, needs_reboot:false, build_install: "true") + buildHipClangJobAndReboot(setup_flags: fin_flags, make_targets: "all", build_fin: "ON", needs_gpu:false, needs_reboot:false, build_install: "true") } } } @@ -633,7 +633,7 @@ pipeline { } agent{ label rocmnode("vega || gfx908 || gfx90a") } steps{ - buildHipClangJobAndReboot(config_targets: Smoke_targets) + buildHipClangJobAndReboot(make_targets: Smoke_targets) } } stage('Fp32 Hip Debug AnyGPU') { @@ -646,7 +646,7 @@ pipeline { } agent{ label rocmnode("vega || gfx908 || gfx90a") } steps{ - buildHipClangJobAndReboot(build_type: 'debug', config_targets: Smoke_targets) + buildHipClangJobAndReboot(build_type: 'debug', make_targets: Smoke_targets) } } stage('Fp32 Hip Debug gfx908') { @@ -659,7 +659,7 @@ pipeline { } agent{ label rocmnode("gfx908") } steps{ - buildHipClangJobAndReboot(build_type: 'debug', config_targets: Smoke_targets) + buildHipClangJobAndReboot(build_type: 'debug', make_targets: Smoke_targets) } } stage('Fp32 Hip Debug gfx90a') { @@ -672,7 +672,7 @@ pipeline { } agent{ label rocmnode("gfx90a") } steps{ - buildHipClangJobAndReboot(build_type: 'debug', config_targets: Smoke_targets) + buildHipClangJobAndReboot(build_type: 'debug', make_targets: Smoke_targets) } } stage('Fp32 Hip Debug gfx94X') { @@ -685,7 +685,7 @@ pipeline { } agent{ label rocmnode("gfx94X") } steps{ - buildHipClangJobAndReboot(build_type: 'debug', config_targets: Smoke_targets) + buildHipClangJobAndReboot(build_type: 'debug', make_targets: Smoke_targets) } } } @@ -729,6 +729,19 @@ pipeline { buildHipClangJobAndReboot( build_type: 'debug', setup_flags: NOMLIR_flags, build_cmd: NOMLIR_build_cmd, test_flags: ' --verbose ') } } + stage('Fp32 Hip Debug NOCK AnyGPU Build-Only') { + when { + beforeAgent true + expression { params.TARGET_VEGA20 || params.TARGET_VEGA10 || params.TARGET_GFX908 || params.TARGET_GFX90A } + } + options { + retry(2) + } + agent{ label rocmnode("vega || gfx908 || gfx90a") } + steps{ + buildHipClangJobAndReboot( build_type: 'debug', setup_flags: "-DMIOPEN_USE_COMPOSABLEKERNEL=Off", make_targets: "") + } + } stage('Fp32 Hip Debug Embedded Vega20') { when { beforeAgent true @@ -768,11 +781,11 @@ pipeline { } agent{ label rocmnode("vega || gfx908 || gfx90a") } environment{ - config_targets = "test_conv2d" + make_targets = "test_conv2d" execute_cmd = "MIOPEN_CONV_PRECISE_ROCBLAS_TIMING=0 bin/test_conv2d --disable-verification-cache" } steps{ - buildHipClangJobAndReboot(config_targets: config_targets, execute_cmd: execute_cmd, find_mode: "Normal") + buildHipClangJobAndReboot(make_targets: make_targets, execute_cmd: execute_cmd, find_mode: "Normal") } } stage('Fp32 Hip Fast-Find AnyGPU') { @@ -785,11 +798,11 @@ pipeline { } agent{ label rocmnode("vega || gfx908 || gfx90a") } environment{ - config_targets = "test_conv2d" + make_targets = "test_conv2d" execute_cmd = "MIOPEN_FIND_MODE=2 CTEST_PARALLEL_LEVEL=4 MIOPEN_CONV_PRECISE_ROCBLAS_TIMING=0 bin/test_conv2d --disable-verification-cache" } steps{ - buildHipClangJobAndReboot( config_targets: config_targets, execute_cmd: execute_cmd) + buildHipClangJobAndReboot( make_targets: make_targets, execute_cmd: execute_cmd) } } stage('Fp32 Hip AnyGPU') { @@ -822,7 +835,7 @@ pipeline { } agent{ label rocmnode("vega20") } steps{ - buildHipClangJobAndReboot( setup_flags: Fp16_flags, config_targets: Smoke_targets) + buildHipClangJobAndReboot( setup_flags: Fp16_flags, make_targets: Smoke_targets) } } stage('Bf16 Hip Vega20') { @@ -835,7 +848,7 @@ pipeline { } agent{ label rocmnode("vega20") } steps{ - buildHipClangJobAndReboot(setup_flags: Bf16_flags, config_targets: Smoke_targets) + buildHipClangJobAndReboot(setup_flags: Bf16_flags, make_targets: Smoke_targets) } } stage('Fp16 Hip gfx908') { @@ -848,7 +861,7 @@ pipeline { } agent{ label rocmnode("gfx908") } steps{ - buildHipClangJobAndReboot( setup_flags: Fp16_flags, config_targets: Smoke_targets) + buildHipClangJobAndReboot( setup_flags: Fp16_flags, make_targets: Smoke_targets) } } stage('Bf16 Hip gfx908') { @@ -861,7 +874,7 @@ pipeline { } agent{ label rocmnode("gfx908") } steps{ - buildHipClangJobAndReboot(setup_flags: Bf16_flags, config_targets: Smoke_targets) + buildHipClangJobAndReboot(setup_flags: Bf16_flags, make_targets: Smoke_targets) } } stage('Fp16 Hip gfx90a') { @@ -874,7 +887,7 @@ pipeline { } agent{ label rocmnode("gfx90a") } steps{ - buildHipClangJobAndReboot( setup_flags: Fp16_flags, config_targets: Smoke_targets) + buildHipClangJobAndReboot( setup_flags: Fp16_flags, make_targets: Smoke_targets) } } stage('Bf16 Hip gfx90a') { @@ -887,7 +900,7 @@ pipeline { } agent{ label rocmnode("gfx90a") } steps{ - buildHipClangJobAndReboot(setup_flags: Bf16_flags, config_targets: Smoke_targets) + buildHipClangJobAndReboot(setup_flags: Bf16_flags, make_targets: Smoke_targets) } } stage('Fp16 Hip gfx94X') { @@ -900,7 +913,7 @@ pipeline { } agent{ label rocmnode("gfx94X") } steps{ - buildHipClangJobAndReboot( setup_flags: Fp16_flags, config_targets: Smoke_targets) + buildHipClangJobAndReboot( setup_flags: Fp16_flags, make_targets: Smoke_targets) } } stage('Bf16 Hip gfx94X') { @@ -913,7 +926,7 @@ pipeline { } agent{ label rocmnode("gfx94X") } steps{ - buildHipClangJobAndReboot(setup_flags: Bf16_flags, config_targets: Smoke_targets) + buildHipClangJobAndReboot(setup_flags: Bf16_flags, make_targets: Smoke_targets) } } } @@ -939,11 +952,11 @@ pipeline { agent{ label rocmnode("gfx908") } environment{ setup_flags="-DMIOPEN_TEST_DBSYNC=1" - config_targets='test_db_sync' - execute_cmd='./bin/test_db_sync' + make_targets='test_db_sync' + execute_cmd='./bin/test_db_sync' } steps{ - buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, config_targets: config_targets, execute_cmd: execute_cmd, + buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, make_targets: make_targets, execute_cmd: execute_cmd, needs_gpu:false, needs_reboot:false, build_install: "true") } } @@ -958,11 +971,11 @@ pipeline { agent{ label rocmnode("gfx90a") } environment{ setup_flags="-DMIOPEN_TEST_DBSYNC=1" - config_targets='test_db_sync' - execute_cmd='./bin/test_db_sync' + make_targets='test_db_sync' + execute_cmd='./bin/test_db_sync' } steps{ - buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, config_targets: config_targets, execute_cmd: execute_cmd, + buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, make_targets: make_targets, execute_cmd: execute_cmd, needs_gpu:false, needs_reboot:false, build_install: "true") } } diff --git a/test/gtest/CMakeLists.txt b/test/gtest/CMakeLists.txt index 2e80fb5eac..eb3a716232 100644 --- a/test/gtest/CMakeLists.txt +++ b/test/gtest/CMakeLists.txt @@ -30,7 +30,8 @@ function(add_gtest TEST_NAME) 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}") + # Extend GTest DISCOVERY_TIMEOUT to 5 mins + gtest_discover_tests(test_${TEST_NAME} DISCOVERY_TIMEOUT 300 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)