This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Jenkinsfile
69 lines (66 loc) · 2.02 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
def rocmnode(name) {
def node_name = 'rocmtest'
if(name == 'fiji') {
node_name = 'rocmtest && fiji';
} else if(name == 'vega') {
node_name = 'rocmtest && vega';
} else if(name == 'vega10') {
node_name = 'rocmtest && vega10';
} else if(name == 'vega20') {
node_name = 'rocmtest && vega20';
} else if(name == 'gfx908') {
node_name = 'gfx908';
} else {
node_name = name
}
return node_name + '&& !nogpu';
}
def buildJob(config_targets="check"){
retimage = docker.build("miopentensile")
def cmd = ""
if(config_targets == "package")
cmd = """
rm -rf build deps
export HIPCC_LINK_FLAGS_APPEND='-O3 -parallel-jobs=4'
export HIPCC_COMPILE_FLAGS_APPEND='-O3 -Wno-format-nonliteral -parallel-jobs=4'
rbuild package -d deps --cxx /opt/rocm/hip/bin/hipcc -DCMAKE_INSTALL_PREFIX="/opt/rocm"
"""
else
cmd = """
rm -rf build
mkdir build
cd build
CXX=/opt/rocm/hip/bin/hipcc cmake -DCMAKE_INSTALL_PREFIX="/opt/rocm" ..
make -j check
"""
withDockerContainer(image: "miopentensile", args: '-v=/var/jenkins/:/var/jenkins'){
echo cmd
sh cmd
}
return retimage
}
pipeline{
agent none
stages{
stage("Test"){
parallel{
stage("Logic vega20"){
agent{ label rocmnode("vega20") }
steps{ buildJob("check") }
}
stage("Packaging vega20"){
agent{ label rocmnode("vega20") }
steps{ buildJob("package")}
}
stage("Logic gfx908"){
agent{ label rocmnode("gfx908") }
steps{ buildJob("check") }
}
stage("Packaging gfx908"){
agent{ label rocmnode("gfx908") }
steps{ buildJob("package")}
}
}
}
}
}