|
Gromacs
2026.1
|
#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"
Include dependency graph for rocfft_common_utils.cpp:Helper GPU 3D FFT routines for rocFFT via SYCL and HIP backends.
For AdaptiveCpp, 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 AdaptiveCpp 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.
SYCL queues can 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 char *msg) |
| Helper for consistent error handling. | |
| void | gmx::handleRocFftError (rocfft_status result, const char *direction, const char *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... | |
1.8.5