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
Commits
16402e96
Commit
16402e96
authored
Oct 20, 2023
by
illsilin
Browse files
use the new sccache redis server
parent
bf52b430
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
Jenkinsfile
Jenkinsfile
+22
-22
No files found.
Jenkinsfile
View file @
16402e96
...
...
@@ -65,10 +65,10 @@ def getDockerImageName(){
}
def
check_host
()
{
if
(
"${env.CK_CCACHE}"
!=
"null"
){
def
CCACHE_SERVER
=
"${env.CK_CCACHE.split(':')[0]}"
echo
"ccache server: ${CCACHE_SERVER}"
sh
'''ping -c 1 -p 6379 "${CCACHE_SERVER}" | echo $? > tmp.txt'''
if
(
"${env.CK_
S
CCACHE}"
!=
"null"
){
def
S
CCACHE_SERVER
=
"${env.CK_
S
CCACHE.split(':')[0]}"
echo
"ccache server: ${
S
CCACHE_SERVER}"
sh
'''ping -c 1 -p 6379 "${
S
CCACHE_SERVER}" | echo $? > tmp.txt'''
def
output
=
readFile
(
file:
"tmp.txt"
)
echo
"tmp.txt contents: \$output"
return
(
output
!=
"0"
)
...
...
@@ -99,20 +99,20 @@ def getDockerImage(Map conf=[:]){
def
prefixpath
=
conf
.
get
(
"prefixpath"
,
"/opt/rocm"
)
// prefix:/opt/rocm
def
no_cache
=
conf
.
get
(
"no_cache"
,
false
)
def
dockerArgs
=
"--build-arg BUILDKIT_INLINE_CACHE=1 --build-arg PREFIX=${prefixpath} --build-arg compiler_version='${params.COMPILER_VERSION}' --build-arg compiler_commit='${params.COMPILER_COMMIT}' --build-arg ROCMVERSION='${params.ROCMVERSION}' "
echo
"ccache server: ${env.CK_CCACHE}"
if
(
env
.
CK_CCACHE
)
echo
"ccache server: ${env.CK_
S
CCACHE}"
if
(
env
.
CK_
S
CCACHE
)
{
if
(
check_host
())
{
echo
"FOUND CCACHE SERVER: ${env.CK_CCACHE}"
echo
"FOUND
S
CCACHE SERVER: ${env.CK_
S
CCACHE}"
}
else
{
echo
"CCACHE SERVER: ${env.CK_CCACHE} NOT FOUND, got ${check_host} response"
echo
"
S
CCACHE SERVER: ${env.CK_
S
CCACHE} NOT FOUND, got ${check_host} response"
}
dockerArgs
=
dockerArgs
+
" --build-arg CCACHE_SECONDARY_STORAGE='redis://${env.CK_CCACHE}' --build-arg COMPILER_LAUNCHER='sccache' "
env
.
CCACHE_DIR
=
"""/tmp/ccache
_store
"""
env
.
CCACHE_SECONDARY_STORAGE
=
"""redis://${env.CK_CCACHE}"""
dockerArgs
=
dockerArgs
+
" --build-arg
S
CCACHE_SECONDARY_STORAGE='redis://${env.CK_
S
CCACHE}' --build-arg COMPILER_LAUNCHER='sccache' "
env
.
CCACHE_DIR
=
"""/tmp/
.s
ccache"""
env
.
CCACHE_SECONDARY_STORAGE
=
"""redis://${env.CK_
S
CCACHE}"""
}
if
(
no_cache
)
{
...
...
@@ -142,20 +142,20 @@ def buildDocker(install_prefix){
def
image_name
=
getDockerImageName
()
echo
"Building Docker for ${image_name}"
def
dockerArgs
=
"--build-arg BUILDKIT_INLINE_CACHE=1 --build-arg PREFIX=${install_prefix} --build-arg compiler_version='${params.COMPILER_VERSION}' --build-arg compiler_commit='${params.COMPILER_COMMIT}' --build-arg ROCMVERSION='${params.ROCMVERSION}' "
echo
"ccache server: ${env.CK_CCACHE}"
if
(
env
.
CK_CCACHE
)
echo
"ccache server: ${env.CK_
S
CCACHE}"
if
(
env
.
CK_
S
CCACHE
)
{
if
(
check_host
())
{
echo
"FOUND CCACHE SERVER: ${env.CK_CCACHE}"
echo
"FOUND
S
CCACHE SERVER: ${env.CK_
S
CCACHE}"
}
else
{
echo
"CCACHE SERVER: ${env.CK_CCACHE} NOT FOUND, got ${check_host} response"
echo
"
S
CCACHE SERVER: ${env.CK_
S
CCACHE} NOT FOUND, got ${check_host} response"
}
dockerArgs
=
dockerArgs
+
" --build-arg CCACHE_SECONDARY_STORAGE='redis://${env.CK_CCACHE}' --build-arg COMPILER_LAUNCHER='sccache' "
dockerArgs
=
dockerArgs
+
" --build-arg
S
CCACHE_SECONDARY_STORAGE='redis://${env.CK_
S
CCACHE}' --build-arg COMPILER_LAUNCHER='sccache' "
env
.
CCACHE_DIR
=
"""/tmp/.sccache"""
env
.
CCACHE_SECONDARY_STORAGE
=
"""redis://${env.CK_CCACHE}"""
env
.
CCACHE_SECONDARY_STORAGE
=
"""redis://${env.CK_
S
CCACHE}"""
}
echo
"Build Args: ${dockerArgs}"
...
...
@@ -219,11 +219,11 @@ def cmake_build(Map conf=[:]){
}
else
{
setup_args
=
" -DCMAKE_BUILD_TYPE=release"
+
setup_args
}
if
(
env
.
CK_CCACHE
)
if
(
env
.
CK_
S
CCACHE
)
{
setup_args
=
" -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache "
+
setup_args
}
echo
"ccache server: ${env.CK_CCACHE}"
echo
"ccache server: ${env.CK_
S
CCACHE}"
def
pre_setup_cmd
=
"""
echo \$HSA_ENABLE_SDMA
...
...
@@ -233,7 +233,7 @@ def cmake_build(Map conf=[:]){
rm -rf install
mkdir install
cd build
if [ "${env.CK_CCACHE}" != "null" ]; then \
if [ "${env.CK_
S
CCACHE}" != "null" ]; then \
export ROCM_PATH=/opt/rocm
export SCCACHE_ENABLED=true
export SCCACHE_LOG_LEVEL=debug
...
...
@@ -241,8 +241,8 @@ def cmake_build(Map conf=[:]){
export COMPILERS_HASH_DIR=/tmp/.sccache
export SCCACHE_BIN=/usr/local/.cargo/bin/sccache
export SCCACHE_EXTRAFILES=/tmp/.sccache/rocm_compilers_hash_file
export SCCACHE_REDIS="redis://${env.CK_CCACHE}"
export SCCACHE_SERVER_PORT=6379
export SCCACHE_REDIS="redis://${env.CK_
S
CCACHE}"
../script/sccache_wrapper.sh --enforce_redis
fi
"""
...
...
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