Skip to content

Commit

Permalink
add support for ROCm 6.0 (#2210)
Browse files Browse the repository at this point in the history
* support for ROCm 6.0

- update HIP install script
- ROCm 6 shipped clang is broken and `clang -v` is failing. Therefore this
PR is changing all compiler `-v` querries to `--version`.
- CMake: set ROCM 6.0 as supported version
  • Loading branch information
psychocoderHPC authored Dec 21, 2023
1 parent 2e84f77 commit 1cdf4f9
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 6 deletions.
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 - 5.6) | :white_check_mark: (HIP 5.7) | :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 - 6.0) | :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: 6 additions & 0 deletions cmake/alpakaCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,17 @@ if(alpaka_ACC_GPU_HIP_ENABLE)
# supported HIP version range
set(_alpaka_HIP_MIN_VER 5.0)
set(_alpaka_HIP_MAX_VER 5.7)
set(_alpaka_HIP_NEXT_MAJOR_MIN_VER 6.0)

find_package(hip "${_alpaka_HIP_MIN_VER}...${_alpaka_HIP_MAX_VER}")

if(NOT TARGET hip)
message(WARNING "Could not find HIP <=v${_alpaka_HIP_MAX_VER}. Now searching for unsupported HIP >v${_alpaka_HIP_MAX_VER}")
find_package(hip "${_alpaka_HIP_MAX_VER}")
if(NOT TARGET hip)
message(WARNING "Could not find HIP >=v${_alpaka_HIP_MAX_VER}. Now searching for unsupported HIP >v${_alpaka_HIP_NEXT_MAJOR_MIN_VER}")
find_package(hip "${_alpaka_HIP_NEXT_MAJOR_MIN_VER}")
endif()
endif()

if(NOT TARGET hip)
Expand Down
2 changes: 1 addition & 1 deletion script/install_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ then
fi

which "${CXX}"
${CXX} -v
${CXX} --version
5 changes: 5 additions & 0 deletions script/install_hip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ source ./script/set.sh
: "${ALPAKA_CI_HIP_ROOT_DIR?'ALPAKA_CI_HIP_ROOT_DIR must be specified'}"
: "${ALPAKA_CI_HIP_VERSION?'ALPAKA_CI_HIP_VERSION must be specified'}"

function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }

if agc-manager -e rocm@${ALPAKA_CI_HIP_VERSION} ; then
export ROCM_PATH=$(agc-manager -b rocm@${ALPAKA_CI_HIP_VERSION})
else
Expand All @@ -30,6 +32,9 @@ else
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}
if [ $(version ${ALPAKA_CI_ROCM_VERSION}) -ge $(version "6.0.0") ]; then
apt install --no-install-recommends -y hiprand-dev${ALPAKA_CI_ROCM_VERSION}
fi
export ROCM_PATH=/opt/rocm
fi
# ROCM_PATH required by HIP tools
Expand Down
4 changes: 2 additions & 2 deletions script/install_oneapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ then
fi

which "${CXX}"
${CXX} -v
${CXX} --version
which "${CC}"
${CC} -v
${CC} --version
sycl-ls
2 changes: 2 additions & 0 deletions script/job_generator/generate_job_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ def job_variables(job: Dict[str, Tuple[str, str]]) -> Dict[str, str]:
variables["ALPAKA_CI_CLANG_VER"] = "16"
elif job[DEVICE_COMPILER][VERSION] == "5.7":
variables["ALPAKA_CI_CLANG_VER"] = "17"
elif job[DEVICE_COMPILER][VERSION] == "6.0":
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", "5.6", "5.7"],
HIPCC: ["5.0", "5.1", "5.2", "5.3", "5.4", "5.5", "5.6", "5.7", "6.0"],
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
2 changes: 1 addition & 1 deletion script/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ then
fi

which "${CXX}"
${CXX} -v
${CXX} --version
fi

if [ "$ALPAKA_CI_OS_NAME" = "Linux" ]
Expand Down

0 comments on commit 1cdf4f9

Please sign in to comment.