@@ -15,71 +15,59 @@ def hipBuildTest(String backendLabel) {
15
15
env. HIP_DIR = " ${ WORKSPACE} " + " /hip"
16
16
}
17
17
18
- // Clone hipamd repository
19
- dir(" ${ WORKSPACE} /hipamd " ) {
18
+ // Clone clr repository
19
+ dir(" ${ WORKSPACE} /clr " ) {
20
20
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"
23
24
}
24
25
25
26
// Clone hip-tests repository
26
27
dir(" ${ WORKSPACE} /hip-tests" ) {
27
28
git branch : ' develop' ,
28
29
url : ' https://github.com/ROCm-Developer-Tools/hip-tests'
29
30
}
31
+ }
30
32
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
+ """
43
44
}
44
45
}
45
46
46
47
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 " ) {
49
50
sh """ #!/usr/bin/env bash
50
51
set -x
52
+ rm -rf build
51
53
mkdir -p build
52
54
cd build
53
55
# Check if backend label contains string "amd" or backend host is a server with amd gpu
54
56
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 ..
56
58
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 ..
58
60
fi
59
61
make -j\$ (nproc)
60
62
make install -j\$ (nproc)
61
63
"""
62
64
}
63
65
}
64
66
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
-
79
67
stage(" BUILD HIP TESTS - ${ backendLabel} " ) {
80
68
// Running the build on HIP TESTS workspace
81
69
dir(" ${ WORKSPACE} /hip-tests" ) {
82
- env. HIP_PATH = " ${ HIPAMD_DIR } " + " /build/install"
70
+ env. HIP_PATH = " ${ CLR_DIR } " + " /build/install"
83
71
sh """ #!/usr/bin/env bash
84
72
set -x
85
73
rm -rf build
@@ -98,20 +86,21 @@ def hipBuildTest(String backendLabel) {
98
86
}
99
87
}
100
88
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
106
95
if [[ $backendLabel =~ amd ]]; then
107
- ctest
96
+ ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_amd.xml
108
97
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'
110
99
fi
111
100
"""
101
+ }
112
102
}
113
103
}
114
-
115
104
}
116
105
}
117
106
0 commit comments