Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ROCm CI tests for version 5.6, 5.7 #2207

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ This library uses C++17 (or newer when available).
| TBB | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| CUDA (nvcc) | :white_check_mark: <br/> (CUDA 11.0 - 12.2)[^2] | :white_check_mark: <br/> (CUDA 11.4 - 12.0)[^2] | :white_check_mark: <br/> (CUDA 12.0 - 12.2) | :x: | :white_check_mark: <br/> (CUDA 11.0-11.2; 11.6 - 12.0)[^2] | :white_check_mark: <br/> (CUDA 11.2, 11.6 - 12.0)[^2] | :white_check_mark: <br/> (CUDA 11.6 - 12.0)[^2] | :white_check_mark: <br/> (CUDA 11.7 - 12.0) | :white_check_mark: <br/> (CUDA 11.8 - 12.0) | :white_check_mark: <br/> (CUDA 12.2) | :x: | :x: | :x: | :x: | :x: |
| CUDA (clang) | - | - | - | :x: | :x: | :x: | :x: | :x: | :white_check_mark: (CUDA 11.0 - 11.5) | :white_check_mark: (CUDA 11.0 - 11.5)[^1] | :white_check_mark: (CUDA 11.0 - 11.5)[^1] | :white_check_mark: (CUDA 11.0 - 11.8)[^1] | :x: | - | - |
| [HIP](https://alpaka.readthedocs.io/en/latest/install/HIP.html) (clang) | - | - | - | :x: | :x: | :x: | :x: | :x: | :white_check_mark: (HIP 5.0 - 5.2) | :white_check_mark: (HIP 5.3 - 5.4) | :white_check_mark: (HIP 5.5) | :x: | :x: | - | - |
| [HIP](https://alpaka.readthedocs.io/en/latest/install/HIP.html) (clang) | - | - | - | :x: | :x: | :x: | :x: | :x: | :white_check_mark: (HIP 5.0 - 5.2) | :white_check_mark: (HIP 5.3 - 5.4) | :white_check_mark: (HIP 5.5 - 5.6) | :white_check_mark: (HIP 5.7) | :x: | - | - |
| SYCL | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark:[^4] | :x: | :x: |

Other compilers or combinations marked with :x: in the table above may work but are not tested in CI and are therefore not explicitly supported.
Expand Down
6 changes: 3 additions & 3 deletions cmake/alpakaCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ if(alpaka_ACC_GPU_HIP_ENABLE)

# supported HIP version range
set(_alpaka_HIP_MIN_VER 5.0)
set(_alpaka_HIP_MAX_VER 5.5)
set(_alpaka_HIP_MAX_VER 5.7)
find_package(hip "${_alpaka_HIP_MIN_VER}...${_alpaka_HIP_MAX_VER}")

if(NOT TARGET hip)
Expand All @@ -525,12 +525,12 @@ if(alpaka_ACC_GPU_HIP_ENABLE)
# hiprand requires ROCm implementation of random numbers by rocrand
# hip::hiprand is currently not expressing this dependency
find_package(rocrand REQUIRED CONFIG
HINTS "${HIP_ROOT_DIR}/rocrand"
HINTS "${ROCM_ROOT_DIR}/rocrand"
HINTS "/opt/rocm/rocrand")
if(rocrand_FOUND)
target_link_libraries(alpaka INTERFACE roc::rocrand)
else()
MESSAGE(FATAL_ERROR "Could not find rocRAND (also searched in: HIP_ROOT_DIR=${HIP_ROOT_DIR}/rocrand).")
MESSAGE(FATAL_ERROR "Could not find rocRAND (also searched in: ROCM_ROOT_DIR=${ROCM_ROOT_DIR}/rocrand).")
endif()

# HIP random numbers
Expand Down
21 changes: 14 additions & 7 deletions script/install_hip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,24 @@ else
travis_retry apt-get -y --quiet update
travis_retry apt-get -y --quiet install wget gnupg2
# AMD container keys are outdated and must be updated
source /etc/os-release
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
echo "deb https://repo.radeon.com/rocm/apt/${ALPAKA_CI_HIP_VERSION} ${VERSION_CODENAME} main" | sudo tee -a /etc/apt/sources.list.d/rocm.list
travis_retry apt-get -y --quiet update

# AMD container are not shipped with rocrand/hiprand
travis_retry sudo apt-get -y --quiet install rocrand
ALPAKA_CI_ROCM_VERSION=$ALPAKA_CI_HIP_VERSION
# append .0 if no patch level is defined
if ! echo $ALPAKA_CI_ROCM_VERSION | grep -Eq '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'; then
ALPAKA_CI_ROCM_VERSION="${ALPAKA_CI_ROCM_VERSION}.0"
fi

apt install --no-install-recommends -y rocm-llvm${ALPAKA_CI_ROCM_VERSION} hip-runtime-amd${ALPAKA_CI_ROCM_VERSION} rocm-dev${ALPAKA_CI_ROCM_VERSION} rocm-utils${ALPAKA_CI_ROCM_VERSION} rocrand-dev${ALPAKA_CI_ROCM_VERSION} rocminfo${ALPAKA_CI_ROCM_VERSION} rocm-cmake${ALPAKA_CI_ROCM_VERSION} rocm-device-libs${ALPAKA_CI_ROCM_VERSION} rocm-core${ALPAKA_CI_ROCM_VERSION} rocm-smi-lib${ALPAKA_CI_ROCM_VERSION}
export ROCM_PATH=/opt/rocm
fi
# ROCM_PATH required by HIP tools
export HIP_PATH=${ROCM_PATH}/hip

export HIP_LIB_PATH=${HIP_PATH}/lib
export HIP_PLATFORM="amd"
export HIP_DEVICE_LIB_PATH=${ROCM_PATH}/amdgcn/bitcode
export HSA_PATH=$ROCM_PATH

export PATH=${ROCM_PATH}/bin:$PATH
export PATH=${ROCM_PATH}/llvm/bin:$PATH
Expand All @@ -38,8 +45,8 @@ sudo update-alternatives --install /usr/bin/clang++ clang++ ${ROCM_PATH}/llvm/bi
sudo update-alternatives --install /usr/bin/cc cc ${ROCM_PATH}/llvm/bin/clang 50
sudo update-alternatives --install /usr/bin/c++ c++ ${ROCM_PATH}/llvm/bin/clang++ 50

export LD_LIBRARY_PATH=${ROCM_PATH}/lib64:${ROCM_PATH}/hiprand/lib:${LD_LIBRARY_PATH}:${ROCM_PATH}/llvm/lib
export CMAKE_PREFIX_PATH=${ROCM_PATH}:${ROCM_PATH}/hiprand:${CMAKE_PREFIX_PATH:-}
export LD_LIBRARY_PATH=${ROCM_PATH}/lib:${ROCM_PATH}/lib64:${ROCM_PATH}/hiprand/lib:${ROCM_PATH}/hip/lib:${ROCM_PATH}/llvm/lib:${LD_LIBRARY_PATH}
export CMAKE_PREFIX_PATH=${ROCM_PATH}:${ROCM_PATH}/hiprand:${ROCM_PATH}/hip:${CMAKE_PREFIX_PATH:-}

if [[ "$CI_RUNNER_TAGS" =~ .*cpuonly.* ]] ; then
# In cases where the compile-only job is executed on a GPU runner but with different kinds of accelerators
Expand Down
4 changes: 4 additions & 0 deletions script/job_generator/generate_job_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ def job_variables(job: Dict[str, Tuple[str, str]]) -> Dict[str, str]:
variables["ALPAKA_CI_CLANG_VER"] = "15"
elif job[DEVICE_COMPILER][VERSION] == "5.5":
variables["ALPAKA_CI_CLANG_VER"] = "16"
elif job[DEVICE_COMPILER][VERSION] == "5.6":
variables["ALPAKA_CI_CLANG_VER"] = "16"
elif job[DEVICE_COMPILER][VERSION] == "5.7":
variables["ALPAKA_CI_CLANG_VER"] = "17"
else:
raise RuntimeError(
"generate_job_yaml.job_variables(): unknown hip version: "
Expand Down
2 changes: 1 addition & 1 deletion script/job_generator/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"12.1",
"12.2",
],
HIPCC: ["5.0", "5.1", "5.2", "5.3", "5.4", "5.5"],
HIPCC: ["5.0", "5.1", "5.2", "5.3", "5.4", "5.5", "5.6", "5.7"],
ICPX: ["2023.1.0", "2023.2.0"],
# Contains all enabled back-ends.
# There are special cases for ALPAKA_ACC_GPU_CUDA_ENABLE and ALPAKA_ACC_GPU_HIP_ENABLE
Expand Down