[QMCPack] Use QMC_GPU instead of removed ENABLE_CUDA/QMC_CUDA2HIP - #2539
Conversation
QMCPack removed ENABLE_CUDA, ENABLE_ROCM, QMC_CUDA2HIP, ENABLE_SYCL and ENABLE_OFFLOAD in b84e4563 (Jan 2025) and now hard-errors at CMakeLists.txt:71 if any of them is defined. Use QMC_GPU, the replacement documented in docs/installation.rst.
| -DQMC_GPU=openmp \ | ||
| -DOFFLOAD_TARGET="amdgcn-amd-amdhsa" \ | ||
| "${custom_opts[@]}" \ | ||
| $AOMP_CMAKE "${custom_opts[@]}" \ |
There was a problem hiding this comment.
Is offload-arch detected automatically?
If so: How does it handle multi-GPU systems?
There was a problem hiding this comment.
only now with QMC_GPU_ARCHS are we actually getting offload-arch:
if(OFFLOAD_TARGET)
set(OPENMP_OFFLOAD_COMPILE_OPTIONS "-fopenmp-targets=${OFFLOAD_TARGET}")
if(OFFLOAD_ARCH)
set(OPENMP_OFFLOAD_COMPILE_OPTIONS
"${OPENMP_OFFLOAD_COMPILE_OPTIONS} -Xopenmp-target=${OFFLOAD_TARGET} -march=${OFFLOAD_ARCH}")
endif()
elseif(QMC_GPU_ARCHS)
string(REGEX REPLACE ";" "," QMC_GPU_ARCHS_COMMA_SEPARATED "${QMC_GPU_ARCHS}")
set(OPENMP_OFFLOAD_COMPILE_OPTIONS "--offload-arch=${QMC_GPU_ARCHS_COMMA_SEPARATED}")
else()
message(FATAL_ERROR "Require QMC_GPU_ARCHS or OFFLOAD_TARGET set for OpenMP offload using Clang.")
endif()There was a problem hiding this comment.
I don't think that any of this affects multi-GPU support (neither positive, nor negative)
There was a problem hiding this comment.
Ok, so we will simply build for all the archs found on a system?
I'm just asking because the auto-detection of the arch(s) has bitten us in the past. ;)
There was a problem hiding this comment.
hm, so previously, OpenMP got its arch via -DOFFLOAD_ARCH=$AOMP_GPU and HIP got its arches by qmcpack-side autodetection (which led to all arches on a given system).
Now, both OpenMP and HIP get their arch from $AOMP_GPU. And this is set in the aomp-side autodetection (which is limited to one arch at the moment - independent of this PR).
There was a problem hiding this comment.
Apologies, I did not see line 123 change / addition.
|
@jplehr can you merge it, please? aomp repository permissions seem to have moved as well ._. |
QMCPack removed ENABLE_CUDA, ENABLE_ROCM, QMC_CUDA2HIP, ENABLE_SYCL and ENABLE_OFFLOAD in b84e4563 (Jan 2025) and now hard-errors at CMakeLists.txt:71 if any of them is defined. Use QMC_GPU, the replacement documented in docs/installation.rst.