Gromacs
2026.0-dev-20250510-519b03c
|
#include "gmxpre.h"
#include "rocfft_common_utils.h"
#include "config.h"
#include <vector>
#include "gromacs/gpu_utils/device_stream.h"
#include "gromacs/gpu_utils/devicebuffer.h"
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
Implements GPU 3D FFT routines for hipSYCL via rocFFT.
For hipSYCL, in order to call FFT APIs from the respective vendors using the same DeviceStream as other operations, a vendor extension called "custom operations" is used (see hipSYCL doc/enqueue-custom-operation.md). That effectively enqueues an asynchronous host-side lambda into the same queue. The body of the lambda unpacks the runtime data structures to get the native handles and calls the native FFT APIs.
hipSYCL queues operate at a higher level of abstraction than hip streams, with the runtime distributing work to the latter to balance load. It is possible to set the HIP stream in rocfft_execution_info, but then there is no guarantee that a subsequent queue item will run using the same stream. So we currently do not attempt to set the stream.
Functions | |
void | gmx::handleRocFftError (rocfft_status result, const std::string &msg) |
Helper for consistent error handling. | |
void | gmx::handleRocFftError (rocfft_status result, const std::string &direction, const std::string &msg) |
Helper for consistent error handling. | |
Variables | |
constexpr std::array< const char *, rocfft_status_invalid_work_buffer+1 > | gmx::anonymous_namespace{rocfft_common_utils.cpp}::c_rocfftErrorStrings |
Strings that match enum rocfft_status_e in rocfft.h. More... | |