Unverified Commit aba7fefc authored by Illia Silin's avatar Illia Silin Committed by GitHub
Browse files

Fix QA, allow switching compiler versions, fix google test compilation error. (#348)

* allow selecting compiler version

* fix typo

* add Wno-deprecated flag for google tests

* change git repo, fix qa log files names

* change the git clone syntax

* use Omkar's git credentials

* try to use jenkins as git user

* try using illsilin username for gerrit repo with ssh key

* try new gerrit authorization

* change ssh key syntax

* try another way of passing ssh key to docker

* add mount ssh in dockerfile

* create .ssh folder

* move ssh-keyscan to later

* get rid of npm call

* build first docker image on master

* check the contents of the .ssh folder

* try replacing omkars creds with gerrit creds

* use open repo, clean up changes

* get rid of ssh default argument
parent 146972f4
...@@ -16,7 +16,6 @@ RUN sh -c "echo deb [arch=amd64] $DEB_ROCM_REPO ubuntu main > /etc/apt/sources.l ...@@ -16,7 +16,6 @@ RUN sh -c "echo deb [arch=amd64] $DEB_ROCM_REPO ubuntu main > /etc/apt/sources.l
RUN wget --no-check-certificate -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - RUN wget --no-check-certificate -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -
RUN sh -c "echo deb https://apt.kitware.com/ubuntu/ bionic main | tee -a /etc/apt/sources.list" RUN sh -c "echo deb https://apt.kitware.com/ubuntu/ bionic main | tee -a /etc/apt/sources.list"
# ADD requirements.txt requirements.txt
# Install dependencies # Install dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
apt-utils \ apt-utils \
...@@ -86,8 +85,8 @@ WORKDIR / ...@@ -86,8 +85,8 @@ WORKDIR /
ENV compiler_version=$compiler_version ENV compiler_version=$compiler_version
RUN sh -c "echo compiler version = '$compiler_version'" RUN sh -c "echo compiler version = '$compiler_version'"
RUN if [ "$compiler_version" = "9110" ]; then \ RUN --mount=type=ssh if [ "$compiler_version" != "release" ]; then \
git clone -b ck-9110 https://github.com/RadeonOpenCompute/llvm-project.git && \ git clone -b "$compiler_version" https://github.com/RadeonOpenCompute/llvm-project.git && \
cd llvm-project && mkdir build && cd build && \ cd llvm-project && mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=1 -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" ../llvm && \ cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=1 -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" ../llvm && \
make -j 8 ; \ make -j 8 ; \
......
...@@ -92,7 +92,7 @@ def buildHipClangJob(Map conf=[:]){ ...@@ -92,7 +92,7 @@ def buildHipClangJob(Map conf=[:]){
env.HSA_ENABLE_SDMA=0 env.HSA_ENABLE_SDMA=0
checkout scm checkout scm
def image = "composable_kernels" def image = "composable_kernels_${params.COMPILER_VERSION}"
def prefixpath = conf.get("prefixpath", "/opt/rocm") def prefixpath = conf.get("prefixpath", "/opt/rocm")
def gpu_arch = conf.get("gpu_arch", "gfx908") def gpu_arch = conf.get("gpu_arch", "gfx908")
...@@ -102,14 +102,10 @@ def buildHipClangJob(Map conf=[:]){ ...@@ -102,14 +102,10 @@ def buildHipClangJob(Map conf=[:]){
if (conf.get("enforce_xnack_on", false)) { if (conf.get("enforce_xnack_on", false)) {
dockerOpts = dockerOpts + " --env HSA_XNACK=1" dockerOpts = dockerOpts + " --env HSA_XNACK=1"
} }
def dockerArgs def dockerArgs = "--build-arg PREFIX=${prefixpath} --build-arg GPU_ARCH='${gpu_arch}' --build-arg compiler_version='${params.COMPILER_VERSION}' "
if (params.USE_9110){ if (params.COMPILER_VERSION != "release"){
dockerArgs = "--build-arg PREFIX=${prefixpath} --build-arg GPU_ARCH='${gpu_arch}' --build-arg compiler_version='9110' "
dockerOpts = dockerOpts + " --env HIP_CLANG_PATH='/llvm-project/build/bin' " dockerOpts = dockerOpts + " --env HIP_CLANG_PATH='/llvm-project/build/bin' "
} }
else{
dockerArgs = "--build-arg PREFIX=${prefixpath} --build-arg GPU_ARCH='${gpu_arch}' --build-arg compiler_version='release' "
}
def variant = env.STAGE_NAME def variant = env.STAGE_NAME
...@@ -185,7 +181,8 @@ def runCKProfiler(Map conf=[:]){ ...@@ -185,7 +181,8 @@ def runCKProfiler(Map conf=[:]){
env.HSA_ENABLE_SDMA=0 env.HSA_ENABLE_SDMA=0
checkout scm checkout scm
def image = "composable_kernels"
def image = "composable_kernels_${params.COMPILER_VERSION}"
def prefixpath = conf.get("prefixpath", "/opt/rocm") def prefixpath = conf.get("prefixpath", "/opt/rocm")
def gpu_arch = conf.get("gpu_arch", "gfx908") def gpu_arch = conf.get("gpu_arch", "gfx908")
...@@ -195,14 +192,10 @@ def runCKProfiler(Map conf=[:]){ ...@@ -195,14 +192,10 @@ def runCKProfiler(Map conf=[:]){
if (conf.get("enforce_xnack_on", false)) { if (conf.get("enforce_xnack_on", false)) {
dockerOpts = dockerOpts + " --env HSA_XNACK=1" dockerOpts = dockerOpts + " --env HSA_XNACK=1"
} }
def dockerArgs def dockerArgs = "--build-arg PREFIX=${prefixpath} --build-arg GPU_ARCH='${gpu_arch}' --build-arg compiler_version='${params.COMPILER_VERSION}' "
if (params.USE_9110){ if (params.COMPILER_VERSION != "release"){
dockerArgs = "--build-arg PREFIX=${prefixpath} --build-arg GPU_ARCH='${gpu_arch}' --build-arg compiler_version='9110' "
dockerOpts = dockerOpts + " --env HIP_CLANG_PATH='/llvm-project/build/bin' " dockerOpts = dockerOpts + " --env HIP_CLANG_PATH='/llvm-project/build/bin' "
} }
else{
dockerArgs = "--build-arg PREFIX=${prefixpath} --build-arg GPU_ARCH='${gpu_arch}' --build-arg compiler_version='release' "
}
def variant = env.STAGE_NAME def variant = env.STAGE_NAME
def retimage def retimage
...@@ -248,20 +241,15 @@ def runCKProfiler(Map conf=[:]){ ...@@ -248,20 +241,15 @@ def runCKProfiler(Map conf=[:]){
dir("script"){ dir("script"){
if (params.RUN_FULL_QA){ if (params.RUN_FULL_QA){
def qa_log = "qa_${gpu_arch}.log" def qa_log = "qa_${gpu_arch}.log"
if (params.USE_9110){ sh "./run_full_performance_tests.sh 1 QA_${params.COMPILER_VERSION} ${gpu_arch} ${env.BRANCH_NAME} ${NODE_NAME}"
sh "./run_full_performance_tests.sh 1 QA_9110 ${gpu_arch} ${env.BRANCH_NAME} ${NODE_NAME}"
}
else{
sh "./run_full_performance_tests.sh 1 QA_release ${gpu_arch} ${env.BRANCH_NAME} ${NODE_NAME}"
}
archiveArtifacts "perf_gemm_${gpu_arch}.log" archiveArtifacts "perf_gemm_${gpu_arch}.log"
archiveArtifacts "perf_resnet50_N256_${gpu_arch}.log" archiveArtifacts "perf_resnet50_N256_${gpu_arch}.log"
archiveArtifacts "perf_resnet50_N4_${gpu_arch}.log" archiveArtifacts "perf_resnet50_N4_${gpu_arch}.log"
archiveArtifacts "perf_batched_gemm_${gpu_arch}.log" archiveArtifacts "perf_batched_gemm_${gpu_arch}.log"
archiveArtifacts "perf_grouped_gemm_${gpu_arch}.log" archiveArtifacts "perf_grouped_gemm_${gpu_arch}.log"
archiveArtifacts "perf_fwd_conv_${gpu_arch}.log" archiveArtifacts "perf_conv_fwd_${gpu_arch}.log"
archiveArtifacts "perf_bwd_conv_${gpu_arch}.log" archiveArtifacts "perf_conv_bwd_${gpu_arch}.log"
archiveArtifacts "perf_fusion_${gpu_arch}.log" archiveArtifacts "perf_gemm_bilinear_${gpu_arch}.log"
archiveArtifacts "perf_reduction_${gpu_arch}.log" archiveArtifacts "perf_reduction_${gpu_arch}.log"
// stash perf files to master // stash perf files to master
stash name: "perf_gemm_${gpu_arch}.log" stash name: "perf_gemm_${gpu_arch}.log"
...@@ -269,19 +257,14 @@ def runCKProfiler(Map conf=[:]){ ...@@ -269,19 +257,14 @@ def runCKProfiler(Map conf=[:]){
stash name: "perf_resnet50_N4_${gpu_arch}.log" stash name: "perf_resnet50_N4_${gpu_arch}.log"
stash name: "perf_batched_gemm_${gpu_arch}.log" stash name: "perf_batched_gemm_${gpu_arch}.log"
stash name: "perf_grouped_gemm_${gpu_arch}.log" stash name: "perf_grouped_gemm_${gpu_arch}.log"
stash name: "perf_fwd_conv_${gpu_arch}.log" stash name: "perf_conv_fwd_${gpu_arch}.log"
stash name: "perf_bwd_conv_${gpu_arch}.log" stash name: "perf_conv_bwd_${gpu_arch}.log"
stash name: "perf_fusion_${gpu_arch}.log" stash name: "perf_gemm_bilinear_${gpu_arch}.log"
stash name: "perf_reduction_${gpu_arch}.log" stash name: "perf_reduction_${gpu_arch}.log"
//we will process results on the master node //we will process results on the master node
} }
else{ else{
if (params.USE_9110){ sh "./run_performance_tests.sh 0 CI_${params.COMPILER_VERSION} ${gpu_arch} ${env.BRANCH_NAME} ${NODE_NAME}"
sh "./run_performance_tests.sh 0 CI_9110 ${gpu_arch} ${env.BRANCH_NAME} ${NODE_NAME}"
}
else{
sh "./run_performance_tests.sh 0 CI_release ${gpu_arch} ${env.BRANCH_NAME} ${NODE_NAME}"
}
archiveArtifacts "perf_gemm_${gpu_arch}.log" archiveArtifacts "perf_gemm_${gpu_arch}.log"
archiveArtifacts "perf_resnet50_N256_${gpu_arch}.log" archiveArtifacts "perf_resnet50_N256_${gpu_arch}.log"
archiveArtifacts "perf_resnet50_N4_${gpu_arch}.log" archiveArtifacts "perf_resnet50_N4_${gpu_arch}.log"
...@@ -318,7 +301,7 @@ def runPerfTest(Map conf=[:]){ ...@@ -318,7 +301,7 @@ def runPerfTest(Map conf=[:]){
def process_results(Map conf=[:]){ def process_results(Map conf=[:]){
env.HSA_ENABLE_SDMA=0 env.HSA_ENABLE_SDMA=0
checkout scm checkout scm
def image = "composable_kernels" def image = "composable_kernels_${params.COMPILER_VERSION}"
def prefixpath = "/opt/rocm" def prefixpath = "/opt/rocm"
def gpu_arch = conf.get("gpu_arch", "gfx908") def gpu_arch = conf.get("gpu_arch", "gfx908")
...@@ -353,9 +336,9 @@ def process_results(Map conf=[:]){ ...@@ -353,9 +336,9 @@ def process_results(Map conf=[:]){
unstash "perf_resnet50_N4_${gpu_arch}.log" unstash "perf_resnet50_N4_${gpu_arch}.log"
unstash "perf_batched_gemm_${gpu_arch}.log" unstash "perf_batched_gemm_${gpu_arch}.log"
unstash "perf_grouped_gemm_${gpu_arch}.log" unstash "perf_grouped_gemm_${gpu_arch}.log"
unstash "perf_fwd_conv_${gpu_arch}.log" unstash "perf_conv_fwd_${gpu_arch}.log"
unstash "perf_bwd_conv_${gpu_arch}.log" unstash "perf_conv_bwd${gpu_arch}.log"
unstash "perf_fusion_${gpu_arch}.log" unstash "perf_gemm_bilinear_${gpu_arch}.log"
unstash "perf_reduction_${gpu_arch}.log" unstash "perf_reduction_${gpu_arch}.log"
sh "./process_qa_data.sh ${gpu_arch}" sh "./process_qa_data.sh ${gpu_arch}"
} }
...@@ -378,7 +361,7 @@ def process_results(Map conf=[:]){ ...@@ -378,7 +361,7 @@ def process_results(Map conf=[:]){
} }
//launch develop branch daily at 23:00 in FULL_QA mode //launch develop branch daily at 23:00 in FULL_QA mode
CRON_SETTINGS = BRANCH_NAME == "develop" ? '''0 23 * * * % RUN_FULL_QA=true;USE_9110=true''' : "" CRON_SETTINGS = BRANCH_NAME == "develop" ? '''0 23 * * * % RUN_FULL_QA=true''' : ""
pipeline { pipeline {
agent none agent none
...@@ -389,10 +372,10 @@ pipeline { ...@@ -389,10 +372,10 @@ pipeline {
parallelsAlwaysFailFast() parallelsAlwaysFailFast()
} }
parameters { parameters {
booleanParam( string(
name: "USE_9110", name: 'COMPILER_VERSION',
defaultValue: true, defaultValue: 'ck-9110',
description: "Select compiler version: 9110 (default) or release") description: 'Specify which version of compiler to use: ck-9110 (default), release, or amd-mainline-open.')
booleanParam( booleanParam(
name: "RUN_FULL_QA", name: "RUN_FULL_QA",
defaultValue: false, defaultValue: false,
...@@ -406,6 +389,8 @@ pipeline { ...@@ -406,6 +389,8 @@ pipeline {
dbsshuser = "${dbsshuser}" dbsshuser = "${dbsshuser}"
dbsshpassword = "${dbsshpassword}" dbsshpassword = "${dbsshpassword}"
status_wrapper_creds = "${status_wrapper_creds}" status_wrapper_creds = "${status_wrapper_creds}"
gerrit_cred="${gerrit_cred}"
DOCKER_BUILDKIT = "1"
} }
stages{ stages{
stage("Static checks") { stage("Static checks") {
......
...@@ -20,6 +20,7 @@ list(APPEND GTEST_CMAKE_CXX_FLAGS ...@@ -20,6 +20,7 @@ list(APPEND GTEST_CMAKE_CXX_FLAGS
-Wno-unused-member-function -Wno-unused-member-function
-Wno-comma -Wno-comma
-Wno-old-style-cast -Wno-old-style-cast
-Wno-deprecated
) )
message(STATUS "Suppressing googltest warnings with flags: ${GTEST_CMAKE_CXX_FLAGS}") message(STATUS "Suppressing googltest warnings with flags: ${GTEST_CMAKE_CXX_FLAGS}")
......
...@@ -12,5 +12,5 @@ pip3 install sqlalchemy pymysql pandas sshtunnel ...@@ -12,5 +12,5 @@ pip3 install sqlalchemy pymysql pandas sshtunnel
#process results #process results
gpu_arch=$1 gpu_arch=$1
python3 process_perf_data.py perf_gemm_"$gpu_arch".log python3 process_perf_data.py perf_gemm_"$gpu_arch".log
python3 process_perf_data.py perf_resnet50_N265_"$gpu_arch".log python3 process_perf_data.py perf_resnet50_N256_"$gpu_arch".log
python3 process_perf_data.py perf_resnet50_N4_"$gpu_arch".log python3 process_perf_data.py perf_resnet50_N4_"$gpu_arch".log
\ No newline at end of file
...@@ -12,11 +12,11 @@ pip3 install sqlalchemy pymysql pandas sshtunnel ...@@ -12,11 +12,11 @@ pip3 install sqlalchemy pymysql pandas sshtunnel
#process results #process results
gpu_arch=$1 gpu_arch=$1
python3 process_perf_data.py perf_gemm_"$gpu_arch".log python3 process_perf_data.py perf_gemm_"$gpu_arch".log
python3 process_perf_data.py perf_resnet50_N265_"$gpu_arch".log python3 process_perf_data.py perf_resnet50_N256_"$gpu_arch".log
python3 process_perf_data.py perf_resnet50_N4_"$gpu_arch".log python3 process_perf_data.py perf_resnet50_N4_"$gpu_arch".log
python3 process_perf_data.py perf_batched_gemm_"$gpu_arch".log python3 process_perf_data.py perf_batched_gemm_"$gpu_arch".log
python3 process_perf_data.py perf_grouped_gemm_"$gpu_arch".log python3 process_perf_data.py perf_grouped_gemm_"$gpu_arch".log
python3 process_perf_data.py perf_conv_fwd_"$gpu_arch".log python3 process_perf_data.py perf_conv_fwd_"$gpu_arch".log
python3 process_perf_data.py perf_conv_bwd_data_"$gpu_arch".log python3 process_perf_data.py perf_conv_bwd_data_"$gpu_arch".log
python3 process_perf_data.py perf_gemm_bilinear_"$gpu_arch".log python3 process_perf_data.py perf_gemm_bilinear_"$gpu_arch".log
python3 process_perf_data.py perf_reduction_"$gpu_arch".log python3 process_perf_data.py perf_reduction_"$gpu_arch".log
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment