Rework cmakery: (#136)

* Rework cmakery:
  * detect rocm/hip/rocshmem better, make sure that ROCM_PATH and
    ROCM_ROOT don't conflict and are taken by default
  * add /opt/rocm as a fallback when nothing else found
  * obtain hipcc in a sanitized way (ensure we use the same logic we
    use to later find_package hip)
  * factorize redundancies
  * export GPU_TARGETS as part of the cmake target for librocshmem,
    this helps with a clean error when an application tries to link
    with the wrong offload-target flag (rather than a cryptic link error)
  * phased out ROCSHMEM_HOME, in favor of rocshmem_ROOT (the cmake
    blessed way)

* Remove references to ROCSHMEM_HOME, we prefer ROCSHMEM_ROOT

* Pick CMAKE_PREFIX_PATH method for consistent finding hip/rocm

* Undo this pr using LANGUAGE HIP, maybe later

* Use only rocmcmakebuildtools as recommended from 6.4 onward
This commit is contained in:
Aurelien Bouteiller
2025-06-18 11:46:33 -04:00
کامیت شده توسط GitHub
والد bf48bcabf2
کامیت ee5363be7a
6فایلهای تغییر یافته به همراه137 افزوده شده و 231 حذف شده
@@ -33,13 +33,10 @@ else
install_path=$1
fi
if [ -z $1 ] && [ -z $ROCSHMEM_HOME ]
then
export ROCSHMEM_HOME=/opt/rocm/
fi
src_path=$(dirname "$(realpath $0)")/../../
# If as specific rocSHMEM version is required, the recommended approach
# is to set environment variable 'rocshmem_ROOT'
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$install_path \