From 42c9db2dd09bd44f60aa2da7520ed40696d40737 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Tue, 29 Aug 2023 08:14:38 +0530 Subject: [PATCH 01/24] delete workspace before starting the build --- .jenkins/Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 17d579561b..61c1bcaa92 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -1,7 +1,8 @@ def hipBuildTest(String backendLabel) { node(backendLabel) { stage("SYNC - ${backendLabel}") { - + // Delete the workspace + sh "rm ${env.WORKSPACE}/* -fr" // Checkout hip repository with the PR patch dir("${WORKSPACE}/hip") { checkout scm From 2cd19d7086335bb587ff84b779bb6476345d1533 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Tue, 29 Aug 2023 14:48:33 +0530 Subject: [PATCH 02/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 61c1bcaa92..b94090a3c3 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -3,6 +3,7 @@ def hipBuildTest(String backendLabel) { stage("SYNC - ${backendLabel}") { // Delete the workspace sh "rm ${env.WORKSPACE}/* -fr" + sh "ls -lart ${env.WORKSPACE}" // Checkout hip repository with the PR patch dir("${WORKSPACE}/hip") { checkout scm From 0ffa379ba0e747f79c4506e0a44a5d9bdfca8d40 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Tue, 29 Aug 2023 17:17:22 +0530 Subject: [PATCH 03/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index b94090a3c3..175467fc65 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -44,6 +44,7 @@ def hipBuildTest(String backendLabel) { cd build # Check if backend label contains string "amd" or backend host is a server with amd gpu if [[ $backendLabel =~ amd ]]; then + sleep 120 cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=\$PWD/install -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$PWD/install .. else cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install .. @@ -87,6 +88,7 @@ def hipBuildTest(String backendLabel) { else ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_nvidia.xml -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost' fi + """ } } From 9f3da1753a0d4405cfff9aed063139910ec874d1 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Wed, 30 Aug 2023 08:04:44 +0530 Subject: [PATCH 04/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 175467fc65..37ef846e63 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -4,6 +4,8 @@ def hipBuildTest(String backendLabel) { // Delete the workspace sh "rm ${env.WORKSPACE}/* -fr" sh "ls -lart ${env.WORKSPACE}" + sh "hostname -I" + sh "env" // Checkout hip repository with the PR patch dir("${WORKSPACE}/hip") { checkout scm From 3bbbef4521a927c4b8a346ea43ae00437ea3d2ff Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Wed, 30 Aug 2023 17:03:24 +0530 Subject: [PATCH 05/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 37ef846e63..23cde94440 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -47,6 +47,9 @@ def hipBuildTest(String backendLabel) { # Check if backend label contains string "amd" or backend host is a server with amd gpu if [[ $backendLabel =~ amd ]]; then sleep 120 + env + ls -laRt ${WORKSPACE} + sh "hostname -I" cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=\$PWD/install -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$PWD/install .. else cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install .. From 6ec6c4d1de1c5577db1320dab99bd7c1731fe960 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Wed, 30 Aug 2023 17:03:45 +0530 Subject: [PATCH 06/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 23cde94440..92c5ca9aaa 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -49,7 +49,7 @@ def hipBuildTest(String backendLabel) { sleep 120 env ls -laRt ${WORKSPACE} - sh "hostname -I" + hostname -I cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=\$PWD/install -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$PWD/install .. else cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install .. From bbeca54d9836ad1243ea6f8860cfafaeff5a56f2 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 14:55:14 +0530 Subject: [PATCH 07/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 92c5ca9aaa..e9e6b8aec8 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -2,8 +2,10 @@ def hipBuildTest(String backendLabel) { node(backendLabel) { stage("SYNC - ${backendLabel}") { // Delete the workspace - sh "rm ${env.WORKSPACE}/* -fr" - sh "ls -lart ${env.WORKSPACE}" + sh "rm -rf ${env.WORKSPACE}" + sh "ls -ld ${env.WORKSPACE}" + sh "mkdir ${env.WORKSPACE}" + sh "ls -ld ${env.WORKSPACE}" sh "hostname -I" sh "env" // Checkout hip repository with the PR patch From e36202e21bc23087a87bacd2d9786cc63d09306d Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 14:57:53 +0530 Subject: [PATCH 08/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index e9e6b8aec8..6137fe3b40 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -2,10 +2,8 @@ def hipBuildTest(String backendLabel) { node(backendLabel) { stage("SYNC - ${backendLabel}") { // Delete the workspace - sh "rm -rf ${env.WORKSPACE}" - sh "ls -ld ${env.WORKSPACE}" - sh "mkdir ${env.WORKSPACE}" - sh "ls -ld ${env.WORKSPACE}" + sh "rm -rf ${env.WORKSPACE}/*" + sh "ls -laRt ${env.WORKSPACE}" sh "hostname -I" sh "env" // Checkout hip repository with the PR patch From ea847a8171773c778ef2a6e4832a9b031b26b494 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:13:55 +0530 Subject: [PATCH 09/24] Create amd.sh --- .jenkins/amd.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .jenkins/amd.sh diff --git a/.jenkins/amd.sh b/.jenkins/amd.sh new file mode 100644 index 0000000000..732197a8b5 --- /dev/null +++ b/.jenkins/amd.sh @@ -0,0 +1,36 @@ + +#!/bin/bash + +export WORKSPACE=$PWD/hipanl +rm -rf $WORKSPACE +mkdir $WORKSPACE +cd ${WORKSPACE} + + +cd ${WORKSPACE}/clr +rm -rf build +mkdir -p build +cd build + +cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=$PWD/install -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$PWD/install .. + + +make -j$(nproc) +make install -j$(nproc) + + +cd ${WORKSPACE}/hip-tests +export HIP_PATH="${CLR_DIR}"/build/install + +rm -rf build +mkdir -p build +cd build +echo "testing $HIP_PATH" + +cmake -DHIP_PLATFORM=amd -DHIP_PATH=$CLR_DIR/build/install ../catch + +make -j$(nproc) build_tests + +cd ${WORKSPACE}/hip-tests +cd build +ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_amd.xml From 50d75440c0faff8c42b51f86f15a9309c3e5ffb7 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:16:52 +0530 Subject: [PATCH 10/24] Create nvidia.sh --- .jenkins/nvidia.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .jenkins/nvidia.sh diff --git a/.jenkins/nvidia.sh b/.jenkins/nvidia.sh new file mode 100644 index 0000000000..5dd7d81080 --- /dev/null +++ b/.jenkins/nvidia.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +export WORKSPACE=$PWD/hipanl +rm -rf $WORKSPACE +mkdir $WORKSPACE +cd ${WORKSPACE} + + +cd ${WORKSPACE}/clr +rm -rf build +mkdir -p build +cd build + +cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=$PWD/install .. + + +make -j$(nproc) +make install -j$(nproc) + + +cd ${WORKSPACE}/hip-tests +export HIP_PATH="${CLR_DIR}"/build/install + +rm -rf build +mkdir -p build +cd build +echo "testing $HIP_PATH" + + +export HIP_PLATFORM=nvidia +cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=$CLR_DIR/build/install ../catch + + +make -j$(nproc) build_tests + + + +cd ${WORKSPACE}/hip-tests +cd build +ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_nvidia.xml -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost' + + + From f203dda6b5190cddece030cda3548a52fd28ae00 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:31:05 +0530 Subject: [PATCH 11/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 77 ++++++++------------------------------------ 1 file changed, 13 insertions(+), 64 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 6137fe3b40..d04a35bad9 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -9,18 +9,21 @@ def hipBuildTest(String backendLabel) { // Checkout hip repository with the PR patch dir("${WORKSPACE}/hip") { checkout scm + } + dir("${WORKSPACE}/hipanl/hip") { + checkout scm env.HIP_DIR = "${WORKSPACE}" + "/hip" } // Clone hip-tests repository - dir("${WORKSPACE}/hip-tests") { + dir("${WORKSPACE}/hipanl/hip-tests") { git branch: 'develop', url: 'https://github.com/ROCm-Developer-Tools/hip-tests' env.HIP_TESTS_DIR = "${WORKSPACE}" + "/hip-tests" } // Clone clr repository - dir("${WORKSPACE}/clr") { + dir("${WORKSPACE}/hipanl/clr") { git branch: 'develop', credentialsId: 'branch-credentials', url: 'https://github.com/ROCm-Developer-Tools/clr' @@ -28,7 +31,7 @@ def hipBuildTest(String backendLabel) { } // Clone hipcc repspoitory - dir("${WORKSPACE}/hipcc") { + dir("${WORKSPACE}/hipanl/hipcc") { git branch: 'develop', credentialsId: 'branch-credentials', url: 'https://github.com/ROCm-Developer-Tools/hipcc' @@ -36,69 +39,15 @@ def hipBuildTest(String backendLabel) { } } - stage("BUILD HIP - ${backendLabel}") { - // Running the build on clr workspace - dir("${WORKSPACE}/clr") { - sh """#!/usr/bin/env bash - set -x - rm -rf build - mkdir -p build - cd build - # Check if backend label contains string "amd" or backend host is a server with amd gpu - if [[ $backendLabel =~ amd ]]; then - sleep 120 - env - ls -laRt ${WORKSPACE} - hostname -I - cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=\$PWD/install -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$PWD/install .. - else - cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install .. - fi - make -j\$(nproc) - make install -j\$(nproc) - """ - } - } - - stage("BUILD HIP TESTS - ${backendLabel}") { - // Running the build on HIP TESTS workspace - dir("${WORKSPACE}/hip-tests") { - env.HIP_PATH = "${CLR_DIR}" + "/build/install" + stage("BUILD/TEST HIP - ${backendLabel}") { sh """#!/usr/bin/env bash - set -x - rm -rf build - mkdir -p build - cd build - echo "testing $HIP_PATH" - # Check if backend label contains string "amd" or backend host is a server with amd gpu - if [[ $backendLabel =~ amd ]]; then - cmake -DHIP_PLATFORM=amd -DHIP_PATH=\$CLR_DIR/build/install ../catch - else - export HIP_PLATFORM=nvidia - cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=\$CLR_DIR/build/install ../catch - fi - make -j\$(nproc) build_tests - """ - } + if [[ $backendLabel =~ amd ]]; then + ${WORKSPACE}/hip/.jenkins/amd.sh + else + ${WORKSPACE}/hip/.jenkins/nvidia.sh + fi + """ } - - timeout(time: 1, unit: 'HOURS') { - stage("TEST - ${backendLabel}") { - dir("${WORKSPACE}/hip-tests") { - sh """#!/usr/bin/env bash - set -x - cd build - if [[ $backendLabel =~ amd ]]; then - ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_amd.xml - else - ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_nvidia.xml -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost' - fi - - """ - } - } - } - } } timestamps { From 0bae8b2fc739a6d142f5fde9e758e17ef7c4b368 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:31:40 +0530 Subject: [PATCH 12/24] Update amd.sh --- .jenkins/amd.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.jenkins/amd.sh b/.jenkins/amd.sh index 732197a8b5..ead8cf0bb2 100644 --- a/.jenkins/amd.sh +++ b/.jenkins/amd.sh @@ -2,8 +2,6 @@ #!/bin/bash export WORKSPACE=$PWD/hipanl -rm -rf $WORKSPACE -mkdir $WORKSPACE cd ${WORKSPACE} From 947bf123de6ffe145e972f5deaf40b6d278d346a Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:31:56 +0530 Subject: [PATCH 13/24] Update nvidia.sh --- .jenkins/nvidia.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.jenkins/nvidia.sh b/.jenkins/nvidia.sh index 5dd7d81080..0a1c3fdd2e 100644 --- a/.jenkins/nvidia.sh +++ b/.jenkins/nvidia.sh @@ -1,8 +1,6 @@ #!/bin/bash export WORKSPACE=$PWD/hipanl -rm -rf $WORKSPACE -mkdir $WORKSPACE cd ${WORKSPACE} From 9d6187827422e807c2b2452c547631d88049fa5e Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:35:17 +0530 Subject: [PATCH 14/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index d04a35bad9..c0e32b62f5 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -37,9 +37,9 @@ def hipBuildTest(String backendLabel) { url: 'https://github.com/ROCm-Developer-Tools/hipcc' env.HIPCC_DIR = "${WORKSPACE}" + "/hipcc" } - } + } - stage("BUILD/TEST HIP - ${backendLabel}") { + stage("BUILD/TEST HIP - ${backendLabel}") { sh """#!/usr/bin/env bash if [[ $backendLabel =~ amd ]]; then ${WORKSPACE}/hip/.jenkins/amd.sh @@ -47,6 +47,7 @@ def hipBuildTest(String backendLabel) { ${WORKSPACE}/hip/.jenkins/nvidia.sh fi """ + } } } From 46124e0a8df37448aa1932d61e7199701a419095 Mon Sep 17 00:00:00 2001 From: "Kuppala, Arjun Raj" Date: Thu, 31 Aug 2023 08:19:20 -0700 Subject: [PATCH 15/24] update permission --- .jenkins/amd.sh | 0 .jenkins/nvidia.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .jenkins/amd.sh mode change 100644 => 100755 .jenkins/nvidia.sh diff --git a/.jenkins/amd.sh b/.jenkins/amd.sh old mode 100644 new mode 100755 diff --git a/.jenkins/nvidia.sh b/.jenkins/nvidia.sh old mode 100644 new mode 100755 From ed16eb332ac87d2db0f2ea3916dc50e8ee7db6af Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:52:23 +0530 Subject: [PATCH 16/24] Update amd.sh --- .jenkins/amd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.jenkins/amd.sh b/.jenkins/amd.sh index ead8cf0bb2..3875578ef2 100755 --- a/.jenkins/amd.sh +++ b/.jenkins/amd.sh @@ -1,5 +1,6 @@ #!/bin/bash +set -x export WORKSPACE=$PWD/hipanl cd ${WORKSPACE} From 2caa0a81a5a24df4f5d8fa4129fb0bffde8de9d2 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:52:35 +0530 Subject: [PATCH 17/24] Update nvidia.sh --- .jenkins/nvidia.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.jenkins/nvidia.sh b/.jenkins/nvidia.sh index 0a1c3fdd2e..77ea1800e8 100755 --- a/.jenkins/nvidia.sh +++ b/.jenkins/nvidia.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -x export WORKSPACE=$PWD/hipanl cd ${WORKSPACE} From 9e789446825b1c3f59127947085df1cb55ca5c08 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Thu, 31 Aug 2023 20:59:36 +0530 Subject: [PATCH 18/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index c0e32b62f5..eb38448255 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -12,14 +12,14 @@ def hipBuildTest(String backendLabel) { } dir("${WORKSPACE}/hipanl/hip") { checkout scm - env.HIP_DIR = "${WORKSPACE}" + "/hip" + env.HIP_DIR = "${WORKSPACE}/hipanl" + "/hip" } // Clone hip-tests repository dir("${WORKSPACE}/hipanl/hip-tests") { git branch: 'develop', url: 'https://github.com/ROCm-Developer-Tools/hip-tests' - env.HIP_TESTS_DIR = "${WORKSPACE}" + "/hip-tests" + env.HIP_TESTS_DIR = "${WORKSPACE}/hipanl" + "/hip-tests" } // Clone clr repository @@ -27,7 +27,7 @@ def hipBuildTest(String backendLabel) { git branch: 'develop', credentialsId: 'branch-credentials', url: 'https://github.com/ROCm-Developer-Tools/clr' - env.CLR_DIR = "${WORKSPACE}" + "/clr" + env.CLR_DIR = "${WORKSPACE}/hipanl" + "/clr" } // Clone hipcc repspoitory @@ -35,7 +35,7 @@ def hipBuildTest(String backendLabel) { git branch: 'develop', credentialsId: 'branch-credentials', url: 'https://github.com/ROCm-Developer-Tools/hipcc' - env.HIPCC_DIR = "${WORKSPACE}" + "/hipcc" + env.HIPCC_DIR = "${WORKSPACE}/hipanl" + "/hipcc" } } From cb845ecf84773327de9bd2103228401ea214f9c4 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:55:24 +0530 Subject: [PATCH 19/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 89 ++++++++++++++++++++++++++++++++------------ 1 file changed, 65 insertions(+), 24 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index eb38448255..ca73e43418 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -1,54 +1,95 @@ def hipBuildTest(String backendLabel) { node(backendLabel) { stage("SYNC - ${backendLabel}") { - // Delete the workspace - sh "rm -rf ${env.WORKSPACE}/*" - sh "ls -laRt ${env.WORKSPACE}" - sh "hostname -I" - sh "env" + // Checkout hip repository with the PR patch dir("${WORKSPACE}/hip") { checkout scm - } - dir("${WORKSPACE}/hipanl/hip") { - checkout scm - env.HIP_DIR = "${WORKSPACE}/hipanl" + "/hip" + env.HIP_DIR = "${WORKSPACE}" + "/hip" } // Clone hip-tests repository - dir("${WORKSPACE}/hipanl/hip-tests") { + dir("${WORKSPACE}/hip-tests") { git branch: 'develop', url: 'https://github.com/ROCm-Developer-Tools/hip-tests' - env.HIP_TESTS_DIR = "${WORKSPACE}/hipanl" + "/hip-tests" + env.HIP_TESTS_DIR = "${WORKSPACE}" + "/hip-tests" } // Clone clr repository - dir("${WORKSPACE}/hipanl/clr") { + dir("${WORKSPACE}/clr") { git branch: 'develop', credentialsId: 'branch-credentials', url: 'https://github.com/ROCm-Developer-Tools/clr' - env.CLR_DIR = "${WORKSPACE}/hipanl" + "/clr" + env.CLR_DIR = "${WORKSPACE}" + "/clr" } // Clone hipcc repspoitory - dir("${WORKSPACE}/hipanl/hipcc") { + dir("${WORKSPACE}/hipcc") { git branch: 'develop', credentialsId: 'branch-credentials', url: 'https://github.com/ROCm-Developer-Tools/hipcc' - env.HIPCC_DIR = "${WORKSPACE}/hipanl" + "/hipcc" + env.HIPCC_DIR = "${WORKSPACE}" + "/hipcc" } - } + } - stage("BUILD/TEST HIP - ${backendLabel}") { + stage("BUILD HIP - ${backendLabel}") { + // Running the build on clr workspace + dir("${WORKSPACE}/clr") { + sh """#!/usr/bin/env bash + set -x + rm -rf build + mkdir -p build + cd build + # Check if backend label contains string "amd" or backend host is a server with amd gpu + if [[ $backendLabel =~ amd ]]; then + cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=$PWD/install -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$PWD/install .. + else + cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=$PWD/install .. + fi + make -j\$(nproc) + make install -j\$(nproc) + """ + } + } + + stage("BUILD HIP TESTS - ${backendLabel}") { + // Running the build on HIP TESTS workspace + dir("${WORKSPACE}/hip-tests") { + env.HIP_PATH = "${CLR_DIR}" + "/build/install" sh """#!/usr/bin/env bash - if [[ $backendLabel =~ amd ]]; then - ${WORKSPACE}/hip/.jenkins/amd.sh - else - ${WORKSPACE}/hip/.jenkins/nvidia.sh - fi - """ - } + set -x + rm -rf build + mkdir -p build + cd build + echo "testing $HIP_PATH" + # Check if backend label contains string "amd" or backend host is a server with amd gpu + if [[ $backendLabel =~ amd ]]; then + cmake -DHIP_PLATFORM=amd -DHIP_PATH=\$CLR_DIR/build/install ../catch + else + export HIP_PLATFORM=nvidia + cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=\$CLR_DIR/build/install ../catch + fi + make -j\$(nproc) build_tests + """ + } + } + + timeout(time: 1, unit: 'HOURS') { + stage("TEST - ${backendLabel}") { + dir("${WORKSPACE}/hip-tests") { + sh """#!/usr/bin/env bash + set -x + cd build + if [[ $backendLabel =~ amd ]]; then + ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_amd.xml + else + ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_nvidia.xml -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost' + fi + """ + } + } } + } } timestamps { From a6345a22280775494cf78d1df3b5a2e4e501fa77 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:03:52 +0530 Subject: [PATCH 20/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index ca73e43418..c7d164bbfb 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -64,10 +64,10 @@ def hipBuildTest(String backendLabel) { echo "testing $HIP_PATH" # Check if backend label contains string "amd" or backend host is a server with amd gpu if [[ $backendLabel =~ amd ]]; then - cmake -DHIP_PLATFORM=amd -DHIP_PATH=\$CLR_DIR/build/install ../catch + cmake -DHIP_PLATFORM=amd -DHIP_PATH=$CLR_DIR/build/install ../catch else export HIP_PLATFORM=nvidia - cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=\$CLR_DIR/build/install ../catch + cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=$CLR_DIR/build/install ../catch fi make -j\$(nproc) build_tests """ From 12e83c74d11d00e1bb256d1ffb39209bdcec23ee Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:27:19 +0530 Subject: [PATCH 21/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index c7d164bbfb..c87af98eef 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -37,17 +37,17 @@ def hipBuildTest(String backendLabel) { dir("${WORKSPACE}/clr") { sh """#!/usr/bin/env bash set -x - rm -rf build - mkdir -p build - cd build + rm -rf build; + mkdir -p build; + cd build; # Check if backend label contains string "amd" or backend host is a server with amd gpu if [[ $backendLabel =~ amd ]]; then - cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=$PWD/install -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$PWD/install .. + cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=$PWD/install -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$PWD/install .. ; else - cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=$PWD/install .. + cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=$PWD/install .. ; fi - make -j\$(nproc) - make install -j\$(nproc) + make -j$(nproc) ; + make install -j$(nproc) ; """ } } @@ -58,17 +58,19 @@ def hipBuildTest(String backendLabel) { env.HIP_PATH = "${CLR_DIR}" + "/build/install" sh """#!/usr/bin/env bash set -x - rm -rf build - mkdir -p build - cd build - echo "testing $HIP_PATH" + rm -rf build ; + mkdir -p build ; + cd build ; + echo "testing $HIP_PATH"; # Check if backend label contains string "amd" or backend host is a server with amd gpu if [[ $backendLabel =~ amd ]]; then - cmake -DHIP_PLATFORM=amd -DHIP_PATH=$CLR_DIR/build/install ../catch + cmake -DHIP_PLATFORM=amd -DHIP_PATH=$CLR_DIR/build/install ../catch ; else export HIP_PLATFORM=nvidia - cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=$CLR_DIR/build/install ../catch + cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=$CLR_DIR/build/install ../catch ; fi + pwd; + ls -lart; make -j\$(nproc) build_tests """ } From 46ccec620bc17700e401c07ab505a84fb96b1f14 Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:28:16 +0530 Subject: [PATCH 22/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index c87af98eef..e776658cd6 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -46,8 +46,8 @@ def hipBuildTest(String backendLabel) { else cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=$PWD/install .. ; fi - make -j$(nproc) ; - make install -j$(nproc) ; + make -j\$(nproc) ; + make install -j\$(nproc) ; """ } } From 4d82295779af9d31465a136adf06877ab47a0cbc Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Mon, 4 Sep 2023 20:01:48 +0530 Subject: [PATCH 23/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index e776658cd6..a1077f2e11 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -42,9 +42,9 @@ def hipBuildTest(String backendLabel) { cd build; # Check if backend label contains string "amd" or backend host is a server with amd gpu if [[ $backendLabel =~ amd ]]; then - cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=$PWD/install -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$PWD/install .. ; + cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=$WORKSPACE/clr/build/install -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$WORKSPACE/clr/build/install .. ; else - cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=$PWD/install .. ; + cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=$WORKSPACE/clr/build/install .. ; fi make -j\$(nproc) ; make install -j\$(nproc) ; From c1eed63308c14295081a25d48e8bdb662351dafb Mon Sep 17 00:00:00 2001 From: arjun-raj-kuppala <60718144+arjun-raj-kuppala@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:48:32 +0530 Subject: [PATCH 24/24] Update Jenkinsfile --- .jenkins/Jenkinsfile | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index a1077f2e11..13bff65d10 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -37,17 +37,17 @@ def hipBuildTest(String backendLabel) { dir("${WORKSPACE}/clr") { sh """#!/usr/bin/env bash set -x - rm -rf build; - mkdir -p build; - cd build; + rm -rf build + mkdir -p build + cd build # Check if backend label contains string "amd" or backend host is a server with amd gpu if [[ $backendLabel =~ amd ]]; then - cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=$WORKSPACE/clr/build/install -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$WORKSPACE/clr/build/install .. ; + cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=\$CLR_DIR/build/install -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$CLR_DIR/build/install .. else - cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=$WORKSPACE/clr/build/install .. ; + cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$CLR_DIR/build/install .. fi - make -j\$(nproc) ; - make install -j\$(nproc) ; + make -j\$(nproc) + make install -j\$(nproc) """ } } @@ -58,19 +58,17 @@ def hipBuildTest(String backendLabel) { env.HIP_PATH = "${CLR_DIR}" + "/build/install" sh """#!/usr/bin/env bash set -x - rm -rf build ; - mkdir -p build ; - cd build ; - echo "testing $HIP_PATH"; + rm -rf build + mkdir -p build + cd build + echo "testing $HIP_PATH" # Check if backend label contains string "amd" or backend host is a server with amd gpu if [[ $backendLabel =~ amd ]]; then - cmake -DHIP_PLATFORM=amd -DHIP_PATH=$CLR_DIR/build/install ../catch ; + cmake -DHIP_PLATFORM=amd -DHIP_PATH=\$CLR_DIR/build/install ../catch else export HIP_PLATFORM=nvidia - cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=$CLR_DIR/build/install ../catch ; + cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=\$CLR_DIR/build/install ../catch fi - pwd; - ls -lart; make -j\$(nproc) build_tests """ }