Update jenkinsfile to build tests against clr (#239)
* Update jenkinsfile to build tests against clr
* Update jenkinsfile
[ROCm/hip-tests commit: 61dce0f72a]
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e28de3dcf0
Коммит
85fd0dfd12
@@ -2,53 +2,40 @@ def hipBuildTest(String backendLabel) {
|
||||
node(backendLabel) {
|
||||
stage("SYNC - ${backendLabel}") {
|
||||
|
||||
// Checkout hip repository with the PR patch
|
||||
// Checkout hip-tests repository with the PR patch
|
||||
dir("${WORKSPACE}/hip-tests") {
|
||||
checkout scm
|
||||
env.HIP_TESTS_DIR = "${WORKSPACE}" + "/hip-tests"
|
||||
}
|
||||
|
||||
// Clone HIP repository
|
||||
// Clone hip repository
|
||||
dir("${WORKSPACE}/hip") {
|
||||
git branch: 'develop',
|
||||
url: 'https://github.com/ROCm-Developer-Tools/HIP'
|
||||
url: 'https://github.com/ROCm-Developer-Tools/hip'
|
||||
env.HIP_DIR = "${WORKSPACE}" + "/hip"
|
||||
}
|
||||
|
||||
// Clone hipamd repository
|
||||
dir("${WORKSPACE}/hipamd") {
|
||||
// Clone clr repository
|
||||
dir("${WORKSPACE}/clr") {
|
||||
git branch: 'develop',
|
||||
url: 'https://github.com/ROCm-Developer-Tools/hipamd'
|
||||
env.HIPAMD_DIR = "${WORKSPACE}" + "/hipamd"
|
||||
}
|
||||
|
||||
// Clone vdi and opencl for only amd backend server
|
||||
if (backendLabel =~ /.*amd.*/) {
|
||||
dir("${WORKSPACE}/ROCm-OpenCL-Runtime") {
|
||||
git branch:'develop',
|
||||
url: 'https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime'
|
||||
env.OPENCL_DIR = "${WORKSPACE}" + "/ROCm-OpenCL-Runtime"
|
||||
}
|
||||
dir("${WORKSPACE}/ROCclr") {
|
||||
git branch:'develop',
|
||||
url: 'https://github.com/ROCm-Developer-Tools/ROCclr'
|
||||
env.ROCclr_DIR = "${WORKSPACE}" + "/ROCclr"
|
||||
}
|
||||
url: 'https://github.com/ROCm-Developer-Tools/clr'
|
||||
env.CLR_DIR = "${WORKSPACE}" + "/clr"
|
||||
}
|
||||
}
|
||||
|
||||
stage("BUILD HIP - ${backendLabel}") {
|
||||
// Running the build on hipamd workspace
|
||||
dir("${WORKSPACE}/hipamd") {
|
||||
// Running the build on clr workspace
|
||||
dir("${WORKSPACE}/clr") {
|
||||
sh """#!/usr/bin/env bash
|
||||
set -x
|
||||
rm -rf build
|
||||
mkdir -p build
|
||||
cd build
|
||||
# Check if backend label contains string "amd" or backend host is a server with amd gpu
|
||||
if [[ $backendLabel =~ amd ]]; then
|
||||
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 ..
|
||||
cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=\$PWD/install -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
|
||||
else
|
||||
cmake -DHIP_PLATFORM=nvidia -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
|
||||
cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
|
||||
fi
|
||||
make -j\$(nproc)
|
||||
make install -j\$(nproc)
|
||||
@@ -59,7 +46,7 @@ def hipBuildTest(String backendLabel) {
|
||||
stage("BUILD HIP TESTS - ${backendLabel}") {
|
||||
// Running the build on HIP TESTS workspace
|
||||
dir("${WORKSPACE}/hip-tests") {
|
||||
env.HIP_PATH = "${HIPAMD_DIR}" + "/build/install"
|
||||
env.HIP_PATH = "${CLR_DIR}" + "/build/install"
|
||||
sh """#!/usr/bin/env bash
|
||||
set -x
|
||||
rm -rf build
|
||||
@@ -78,17 +65,19 @@ def hipBuildTest(String backendLabel) {
|
||||
}
|
||||
}
|
||||
|
||||
stage("TEST - ${backendLabel}") {
|
||||
dir("${WORKSPACE}/hip-tests") {
|
||||
sh """#!/usr/bin/env bash
|
||||
set -x
|
||||
cd build
|
||||
timeout(time: 1, unit: 'HOURS') {
|
||||
stage("TEST - ${backendLabel}") {
|
||||
dir("${WORKSPACE}/hip-tests") {
|
||||
sh """#!/usr/bin/env bash
|
||||
set -x
|
||||
cd build
|
||||
if [[ $backendLabel =~ amd ]]; then
|
||||
ctest
|
||||
ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_amd.xml
|
||||
else
|
||||
ctest -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost'
|
||||
ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_nvidia.xml -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost'
|
||||
fi
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user