gromacs: add ROCm support and enhance heFFTe compatibility - #6094
Open
cedricjourdain wants to merge 1 commit into
Open
gromacs: add ROCm support and enhance heFFTe compatibility#6094cedricjourdain wants to merge 1 commit into
cedricjourdain wants to merge 1 commit into
Conversation
al42and
reviewed
Aug 14, 2026
| if self.spec.satisfies("+rocm") and not self.spec.satisfies("+sycl"): | ||
| options.append("-DGMX_GPU_FFT_LIBRARY=rocFFT") | ||
| options.append(f"-DCMAKE_CXX_FLAGS=-I{self.spec['rocfft'].headers.directories[0]}") | ||
| options.append("-DGMX_BUILD_OWN_FFTW=OFF") |
Contributor
There was a problem hiding this comment.
GMX_BUILD_OWN_FFTW is CPU-only and should be orthogonal to GPU FFT library choice
| options.append("-DHeffte_ENABLE_ROCM:BOOL=ON") | ||
| options.append(f"-DHeffte_ROCM_ROOT={self.spec['hip'].prefix}") | ||
|
|
||
| # Use rocFFT backend to perform FFT on GPU only for pure ROCm builds |
Contributor
There was a problem hiding this comment.
- At least with ROCm 7.0 and earlier on MI300A and MI250X, VkFFT tends to perform somewhat better in our tests (on both SYCL/ACpp and native HIP). Is your experience different? In any case, I think it's better handle
+rocmthe same, regardless of whether it uses ACpp or HIP directly, since the FFT part is identical. - This should depend on heffte choice: on AMD GPUs (with SYCL/ACpp and native HIP both), we cannot use HeFFTe with VkFFT, only with rocFFT.
| @@ -96,6 +99,9 @@ class Gromacs(CMakePackage, CudaPackage): | |||
| ) | |||
| depends_on("heffte +cuda", when="+heffte +cuda") | |||
| depends_on("heffte +sycl", when="+heffte +sycl") | |||
Contributor
There was a problem hiding this comment.
If we build +sycl+rocm, we need heffte +rocm, so something like this (untested):
Suggested change
| depends_on("heffte +sycl", when="+heffte +sycl") | |
| depends_on("heffte +sycl", when="+heffte +sycl ~rocm") | |
| depends_on("heffte +rocm", when="+heffte +sycl +rocm") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for ROCm, improve HeFFTe’s compatibility with ROCm, improve the management of the sycl compilation (using the VkFFT FFT backend) and correctly manage CRAY MPICH linking dependencies
Tested 3 differents version with Cray Compiler :
cp2kheffte+mpi+openmp+rocm build_type=Release amdgpu_target=gfx90a ^cray-fftw+mpi+openmp ^cray-libsci+mpi+openmpcp2kheffte+mpi+openmp+rocm+sycl build_type=Release amdgpu_target=gfx90a ^cray-fftw+mpi+openmp ^cray-libsci+mpi+openmp ^hipsycl@25.10.0+use_llvm_amdgpu amdgpu_target=gfx90a