File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 3535#include < roctracer/roctx.h>
3636#endif
3737#endif
38+ #if defined(AMREX_USE_FFT)
39+ # if __has_include(<rocfft/rocfft.h>) // ROCm 5.3+
40+ # include < rocfft/rocfft.h>
41+ # else
42+ # include < rocfft.h>
43+ # endif
44+ #endif
3845#endif
3946
4047#ifdef AMREX_USE_ACC
@@ -310,6 +317,10 @@ Device::Initialize ()
310317 }
311318#endif /* AMREX_USE_MPI */
312319
320+ #if defined(AMREX_USE_HIP) && defined(AMREX_USE_FFT)
321+ AMREX_ROCFFT_SAFE_CALL (rocfft_setup ());
322+ #endif
323+
313324 if (amrex::Verbose ()) {
314325#if defined(AMREX_USE_CUDA)
315326 amrex::Print () << " CUDA"
@@ -349,6 +360,10 @@ Device::Finalize ()
349360#ifdef AMREX_USE_GPU
350361 Device::profilerStop ();
351362
363+ #if defined(AMREX_USE_HIP) && defined(AMREX_USE_FFT)
364+ AMREX_ROCFFT_SAFE_CALL (rocfft_cleanup ());
365+ #endif
366+
352367#ifdef AMREX_USE_SYCL
353368 for (auto & s : gpu_stream_pool) {
354369 delete s.queue ;
You can’t perform that action at this time.
0 commit comments