Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
composable_kernel_ROCM
Commits
87f2bbcf
"csrc/git@developer.sourcefind.cn:OpenDAS/torch-scatter.git" did not exist on "9a651d912dabbca391fb56902e3871757ceb408e"
Unverified
Commit
87f2bbcf
authored
Jul 06, 2023
by
Illia Silin
Committed by
GitHub
Jul 06, 2023
Browse files
change the build thread usage in CI (#787)
parent
237f9cd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
Jenkinsfile
Jenkinsfile
+22
-6
No files found.
Jenkinsfile
View file @
87f2bbcf
...
@@ -11,6 +11,20 @@ def show_node_info() {
...
@@ -11,6 +11,20 @@ def show_node_info() {
"""
"""
}
}
def
nthreads
()
{
def
nproc
=
sh
(
returnStdout:
true
,
script:
'nproc'
)
echo
"Number of cores: ${nproc}"
def
n
=
nproc
.
toInteger
()
if
(
n
>
32
){
n
/=
2
}
if
(
n
>
64
){
n
=
64
}
echo
"Number of threads used for building: ${n}"
return
n
}
def
runShell
(
String
command
){
def
runShell
(
String
command
){
def
responseCode
=
sh
returnStatus:
true
,
script:
"${command} > tmp.txt"
def
responseCode
=
sh
returnStatus:
true
,
script:
"${command} > tmp.txt"
def
output
=
readFile
(
file:
"tmp.txt"
)
def
output
=
readFile
(
file:
"tmp.txt"
)
...
@@ -219,7 +233,8 @@ def cmake_build(Map conf=[:]){
...
@@ -219,7 +233,8 @@ def cmake_build(Map conf=[:]){
"""
"""
def
setup_cmd
=
conf
.
get
(
"setup_cmd"
,
"${cmake_envs} cmake ${setup_args} .. "
)
def
setup_cmd
=
conf
.
get
(
"setup_cmd"
,
"${cmake_envs} cmake ${setup_args} .. "
)
// reduce parallelism when compiling, clang uses too much memory
// reduce parallelism when compiling, clang uses too much memory
def
build_cmd
=
conf
.
get
(
"build_cmd"
,
"${build_envs} dumb-init make -j\$(( \$(nproc) / 2 )) ${config_targets}"
)
def
nt
=
nthreads
()
def
build_cmd
=
conf
.
get
(
"build_cmd"
,
"${build_envs} dumb-init make -j${nt} ${config_targets}"
)
def
execute_cmd
=
conf
.
get
(
"execute_cmd"
,
""
)
def
execute_cmd
=
conf
.
get
(
"execute_cmd"
,
""
)
def
cmd
=
conf
.
get
(
"cmd"
,
"""
def
cmd
=
conf
.
get
(
"cmd"
,
"""
...
@@ -461,7 +476,7 @@ def Build_CK(Map conf=[:]){
...
@@ -461,7 +476,7 @@ def Build_CK(Map conf=[:]){
else
{
else
{
echo
"GPU is OK"
echo
"GPU is OK"
}
}
if
(
runShell
(
'grep -n "gfx1030" clinfo.log'
)
){
if
(
runShell
(
'grep -n "gfx1030" clinfo.log'
)
||
runShell
(
'grep -n "gfx1101" clinfo.log'
)
){
navi_node
=
1
navi_node
=
1
}
}
}
}
...
@@ -482,7 +497,7 @@ def Build_CK(Map conf=[:]){
...
@@ -482,7 +497,7 @@ def Build_CK(Map conf=[:]){
else
{
else
{
echo
"GPU is OK"
echo
"GPU is OK"
}
}
if
(
runShell
(
'grep -n "gfx1030" clinfo.log'
)
){
if
(
runShell
(
'grep -n "gfx1030" clinfo.log'
)
||
runShell
(
'grep -n "gfx1101" clinfo.log'
)
){
navi_node
=
1
navi_node
=
1
}
}
}
}
...
@@ -493,8 +508,9 @@ def Build_CK(Map conf=[:]){
...
@@ -493,8 +508,9 @@ def Build_CK(Map conf=[:]){
{
{
cmake_build
(
conf
)
cmake_build
(
conf
)
dir
(
"build"
){
dir
(
"build"
){
//run tests and examples
//run tests and examples
sh
'make -j\$(( \$(nproc) / 2 )) check'
def
nt
=
nthreads
()
sh
'make -j${nt} check'
if
(
navi_node
==
0
){
if
(
navi_node
==
0
){
//we only need the ckProfiler to run the performance tests, so we pack and stash it
//we only need the ckProfiler to run the performance tests, so we pack and stash it
//do not stash profiler on Navi nodes
//do not stash profiler on Navi nodes
...
@@ -717,7 +733,7 @@ pipeline {
...
@@ -717,7 +733,7 @@ pipeline {
Build_CK_and_Reboot
(
setup_args:
setup_args
,
config_targets:
"install"
,
no_reboot:
true
,
build_type:
'Release'
,
execute_cmd:
execute_args
,
prefixpath:
'/usr/local'
)
Build_CK_and_Reboot
(
setup_args:
setup_args
,
config_targets:
"install"
,
no_reboot:
true
,
build_type:
'Release'
,
execute_cmd:
execute_args
,
prefixpath:
'/usr/local'
)
}
}
}
}
stage
(
"Build CK and run Tests on Navi"
)
stage
(
"Build CK and run Tests on Navi
21
"
)
{
{
when
{
when
{
beforeAgent
true
beforeAgent
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment