diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 17d579561b..13bff65d10 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -42,9 +42,9 @@ def hipBuildTest(String backendLabel) { cd build # Check if backend label contains string "amd" or backend host is a server with amd gpu if [[ $backendLabel =~ amd ]]; then - cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=\$PWD/install -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$PWD/install .. + cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=\$CLR_DIR/build/install -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=\$CLR_DIR/build/install .. else - cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$PWD/install .. + cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=\$HIPCC_DIR/bin -DHIP_COMMON_DIR=\$HIP_DIR -DCMAKE_INSTALL_PREFIX=\$CLR_DIR/build/install .. fi make -j\$(nproc) make install -j\$(nproc) diff --git a/.jenkins/amd.sh b/.jenkins/amd.sh new file mode 100755 index 0000000000..3875578ef2 --- /dev/null +++ b/.jenkins/amd.sh @@ -0,0 +1,35 @@ + +#!/bin/bash +set -x + +export WORKSPACE=$PWD/hipanl +cd ${WORKSPACE} + + +cd ${WORKSPACE}/clr +rm -rf build +mkdir -p build +cd build + +cmake -DCLR_BUILD_HIP=ON -DHIP_PATH=$PWD/install -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$PWD/install .. + + +make -j$(nproc) +make install -j$(nproc) + + +cd ${WORKSPACE}/hip-tests +export HIP_PATH="${CLR_DIR}"/build/install + +rm -rf build +mkdir -p build +cd build +echo "testing $HIP_PATH" + +cmake -DHIP_PLATFORM=amd -DHIP_PATH=$CLR_DIR/build/install ../catch + +make -j$(nproc) build_tests + +cd ${WORKSPACE}/hip-tests +cd build +ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_amd.xml diff --git a/.jenkins/nvidia.sh b/.jenkins/nvidia.sh new file mode 100755 index 0000000000..77ea1800e8 --- /dev/null +++ b/.jenkins/nvidia.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -x + +export WORKSPACE=$PWD/hipanl +cd ${WORKSPACE} + + +cd ${WORKSPACE}/clr +rm -rf build +mkdir -p build +cd build + +cmake -DCLR_BUILD_HIP=ON -DHIP_PLATFORM=nvidia -DHIPCC_BIN_DIR=$HIPCC_DIR/bin -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_INSTALL_PREFIX=$PWD/install .. + + +make -j$(nproc) +make install -j$(nproc) + + +cd ${WORKSPACE}/hip-tests +export HIP_PATH="${CLR_DIR}"/build/install + +rm -rf build +mkdir -p build +cd build +echo "testing $HIP_PATH" + + +export HIP_PLATFORM=nvidia +cmake -DHIP_PLATFORM=nvidia -DHIP_PATH=$CLR_DIR/build/install ../catch + + +make -j$(nproc) build_tests + + + +cd ${WORKSPACE}/hip-tests +cd build +ctest --overwrite BuildDirectory=. --output-junit hiptest_output_catch_nvidia.xml -E 'Unit_hipMemcpyHtoD_Positive_Synchronization_Behavior|Unit_hipMemcpy_Positive_Synchronization_Behavior|Unit_hipFreeNegativeHost' + + +