Skip to content

Commit d65e8f0

Browse files
Merge pull request #68 from david-salinas/update-jenkins-for-clr-repo
Update Jenkinsfile by adding CLR repository
2 parents 3645820 + f3e88e2 commit d65e8f0

File tree

1 file changed

+32
-43
lines changed

1 file changed

+32
-43
lines changed

amd/hipcc/.jenkins/Jenkinsfile

Lines changed: 32 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -15,71 +15,59 @@ def hipBuildTest(String backendLabel) {
1515
env.HIP_DIR = "${WORKSPACE}" + "/hip"
1616
}
1717

18-
// Clone hipamd repository
19-
dir("${WORKSPACE}/hipamd") {
18+
// Clone clr repository
19+
dir("${WORKSPACE}/clr") {
2020
git branch: 'develop',
21-
url: 'https://github.com/ROCm-Developer-Tools/hipamd'
22-
env.HIPAMD_DIR = "${WORKSPACE}" + "/hipamd"
21+
credentialsId: 'branch-credentials',
22+
url: 'https://github.com/ROCm-Developer-Tools/clr'
23+
env.CLR_DIR = "${WORKSPACE}" + "/clr"
2324
}
2425

2526
// Clone hip-tests repository
2627
dir("${WORKSPACE}/hip-tests") {
2728
git branch: 'develop',
2829
url: 'https://github.com/ROCm-Developer-Tools/hip-tests'
2930
}
31+
}
3032

31-
// Clone vdi and opencl for only amd backend server
32-
if (backendLabel =~ /.*amd.*/) {
33-
dir("${WORKSPACE}/ROCm-OpenCL-Runtime") {
34-
git branch:'develop',
35-
url: 'https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime'
36-
env.OPENCL_DIR = "${WORKSPACE}" + "/ROCm-OpenCL-Runtime"
37-
}
38-
dir("${WORKSPACE}/ROCclr") {
39-
git branch:'develop',
40-
url: 'https://github.com/ROCm-Developer-Tools/ROCclr'
41-
env.ROCclr_DIR = "${WORKSPACE}" + "/ROCclr"
42-
}
33+
stage("Build - HIPCC") {
34+
// Running the build on HIPCC workspace
35+
dir("${WORKSPACE}/HIPCC") {
36+
sh """#!/usr/bin/env bash
37+
set -x
38+
rm -rf build
39+
mkdir build
40+
cd build/
41+
cmake ..
42+
make
43+
"""
4344
}
4445
}
4546

4647
stage("BUILD HIP - ${backendLabel}") {
47-
// Running the build on hipamd workspace
48-
dir("${WORKSPACE}/hipamd") {
48+
// Running the build on clr workspace
49+
dir("${WORKSPACE}/clr") {
4950
sh """#!/usr/bin/env bash
5051
set -x
52+
rm -rf build
5153
mkdir -p build
5254
cd build
5355
# Check if backend label contains string "amd" or backend host is a server with amd gpu
5456
if [[ $backendLabel =~ amd ]]; then
55-
cmake -DHIP_PATH=\$PWD/install -DHIP_COMMON_DIR=\$HIP_DIR -DAMD_OPENCL_PATH=\$OPENCL_DIR -DROCCLR_PATH=\$ROCclr_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
57+
cmake -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DCLR_BUILD_HIP=ON -DHIP_PATH=\$PWD/install -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
5658
else
57-
cmake -DHIP_PLATFORM=nvidia -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
59+
cmake -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
5860
fi
5961
make -j\$(nproc)
6062
make install -j\$(nproc)
6163
"""
6264
}
6365
}
6466

65-
stage("Build - HIPCC") {
66-
// Running the build on HIPCC workspace
67-
dir("${WORKSPACE}/HIPCC") {
68-
sh """#!/usr/bin/env bash
69-
set -x
70-
rm -rf build
71-
mkdir build
72-
cd build/
73-
cmake ..
74-
make
75-
"""
76-
}
77-
}
78-
7967
stage("BUILD HIP TESTS - ${backendLabel}") {
8068
// Running the build on HIP TESTS workspace
8169
dir("${WORKSPACE}/hip-tests") {
82-
env.HIP_PATH = "${HIPAMD_DIR}" + "/build/install"
70+
env.HIP_PATH = "${CLR_DIR}" + "/build/install"
8371
sh """#!/usr/bin/env bash
8472
set -x
8573
rm -rf build
@@ -98,20 +86,21 @@ def hipBuildTest(String backendLabel) {
9886
}
9987
}
10088

101-
stage("TEST - ${backendLabel}") {
102-
dir("${WORKSPACE}/hip-tests") {
103-
sh """#!/usr/bin/env bash
104-
set -x
105-
cd build
89+
timeout(time: 1, unit: 'HOURS') {
90+
stage("TEST - ${backendLabel}") {
91+
dir("${WORKSPACE}/hip-tests") {
92+
sh """#!/usr/bin/env bash
93+
set -x
94+
cd build
10695
if [[ $backendLabel =~ amd ]]; then
107-
ctest
96+
ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_amd.xml
10897
else
109-
ctest -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost'
98+
ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_nvidia.xml -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost'
11099
fi
111100
"""
101+
}
112102
}
113103
}
114-
115104
}
116105
}
117106

0 commit comments

Comments
 (0)