Merge 'develop' into 'amd-staging'

Change-Id: I8f905b9904bf3876b33fc8d984d2a6ea37482b8d
Esse commit está contido em:
Jenkins
2022-12-27 14:15:13 +00:00
7 arquivos alterados com 116 adições e 7 exclusões
+108
Ver Arquivo
@@ -0,0 +1,108 @@
def hipBuildTest(String backendLabel) {
node(backendLabel) {
stage("Source sync ${backendLabel}") {
// Checkout hip repository with the PR patch
dir("${WORKSPACE}/hip-tests") {
checkout scm
env.HIP_TESTS_DIR = "${WORKSPACE}" + "/hip-tests"
}
// Clone HIP repository
dir("${WORKSPACE}/hip") {
git branch: 'develop',
url: 'https://github.com/ROCm-Developer-Tools/HIP'
env.HIP_DIR = "${WORKSPACE}" + "/hip"
}
// Clone hipamd repository
dir("${WORKSPACE}/hipamd") {
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"
}
}
}
stage("Build - Catch2 framework") {
// Running the build on hipamd workspace
dir("${WORKSPACE}/hipamd") {
sh """#!/usr/bin/env bash
set -x
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 ..
else
cmake -DHIP_PLATFORM=nvidia -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install ..
fi
make -j\$(nproc)
make install -j\$(nproc)
"""
}
}
stage("Build - HIP TESTS") {
// Running the build on HIP TESTS workspace
dir("${WORKSPACE}/hip-tests") {
env.HIP_PATH = "${HIPAMD_DIR}" + "/build/install"
sh """#!/usr/bin/env bash
set -x
rm -rf build
mkdir -p build
cd build
echo "testing $HIP_PATH"
# Check if backend label contains string "amd" or backend host is a server with amd gpu
if [[ $backendLabel =~ amd ]]; then
cmake -DHIP_PLATFORM=amd ../catch
else
export HIP_PLATFORM=nvidia
cmake -DHIP_PLATFORM=nvidia ../catch
fi
make -j\$(nproc) build_tests
"""
}
}
stage('HIP Unit Tests - Catch2 framework') {
dir("${WORKSPACE}/hip-tests") {
sh """#!/usr/bin/env bash
set -x
cd build
ctest
"""
}
}
}
}
timestamps {
node('external-bootstrap') {
skipDefaultCheckout()
// labels belonging to each backend - AMD, NVIDIA
String[] labels = ['hip-amd-vg20-ubu1804', 'hip-nvidia-rtx5000-ubu1804']
buildMap = [:]
labels.each { backendLabel ->
echo "backendLabel: ${backendLabel}"
buildMap[backendLabel] = { hipBuildTest(backendLabel) }
}
buildMap['failFast'] = false
parallel buildMap
}
}
+1 -1
Ver Arquivo
@@ -270,4 +270,4 @@ TestContext::~TestContext() {
std::abort(); // Crash to bring users attention to this message and avoid accidental passing of
// tests without checking for errors
}
}
}
+1 -1
Ver Arquivo
@@ -193,4 +193,4 @@ static bool _log_enable = (!TestContext::getEnvVar("HT_LOG_ENABLE").empty() ? tr
printf(format, __VA_ARGS__); \
printf("%c", '\n'); \
} \
}
}
+1 -1
Ver Arquivo
@@ -227,4 +227,4 @@ class StreamGuard {
private:
const Streams stream_type_;
hipStream_t stream_;
};
};
+1 -1
Ver Arquivo
@@ -142,4 +142,4 @@ inline bool DeviceAttributesSupport(const int device, Attributes... attributes)
return value;
};
return (... && DeviceAttributeSupport(device, attributes));
}
}
+3 -2
Ver Arquivo
@@ -78,9 +78,10 @@ set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.")
set(CPACK_PACKAGE_CONTACT "HIP Support <hip.support@amd.com>")
set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_VERSION_PATCH_GITHASH@)
set (CPACK_RPM_PACKAGE_AUTOREQ 0)
# to remove hip-catch-* package during uninstallation of rocm
set (CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-core")
set (CPACK_RPM_PACKAGE_REQUIRES "rocm-core")
set (CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-core, hip-runtime-amd")
set (CPACK_RPM_PACKAGE_REQUIRES "rocm-core, hip-runtime-amd")
if(NOT WIN32)
set(CPACK_GENERATOR "TGZ;DEB;RPM" CACHE STRING "Linux package types for catch tests")
+1 -1
Ver Arquivo
@@ -419,4 +419,4 @@ TEMPLATE_TEST_CASE("Unit_hipFreeMultiTArray", "", char, int, float2, float4) {
HIP_CHECK_THREAD_FINALIZE();
}
#endif
#endif