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

[ROCm/rocshmem commit: ee5363be7a]
Cette révision appartient à :
Aurelien Bouteiller
2025-06-18 11:46:33 -04:00
révisé par GitHub
Parent 14756a73b1
révision 08d8324f74
6 fichiers modifiés avec 137 ajouts et 231 suppressions
+2 -5
Voir le fichier
@@ -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 \