Highly Efficient FFT for Exascale: HeFFTe v2.3
Collaboration diagram for Backend rocfft:

Classes

struct  heffte::backend::default_backend< tag::gpu >
 In CUDA mode, the default GPU backend is cufft. More...
 
struct  heffte::backend::data_manipulator< tag::gpu >
 Specialization for the data operations in CUDA mode. More...
 
struct  heffte::backend::is_enabled< rocfft >
 Indicate that the rocFFT backend has been enabled. More...
 
struct  heffte::backend::is_enabled< rocfft_cos >
 Indicate that the rocFFT backend has been enabled. More...
 
struct  heffte::backend::is_enabled< rocfft_sin >
 Indicate that the rocFFT backend has been enabled. More...
 
struct  heffte::backend::device_instance< tag::gpu >
 The CUDA backend uses a CUDA stream. More...
 
struct  heffte::backend::buffer_traits< rocfft >
 Defines the location type-tag and the cuda container. More...
 
struct  heffte::backend::buffer_traits< rocfft_cos >
 Defines the location type-tag and the cuda container. More...
 
struct  heffte::backend::buffer_traits< rocfft_sin >
 Defines the location type-tag and the cuda container. More...
 
struct  heffte::plan_rocfft< precision_type, dir >
 Plan for the r2c single precision transform. More...
 
struct  heffte::plan_rocfft< std::complex< precision_type >, dir >
 Plan for the single precision complex transform. More...
 
class  heffte::rocfft_executor
 Wrapper around the rocFFT API. More...
 
class  heffte::rocfft_executor_r2c
 Wrapper to rocFFT API for real-to-complex transform with shortening of the data. More...
 
struct  heffte::one_dim_backend< backend::rocfft >
 Helper struct that defines the types and creates instances of one-dimensional executors. More...
 
struct  heffte::one_dim_backend< backend::rocfft_cos >
 Helper struct that defines the types and creates instances of one-dimensional executors. More...
 
struct  heffte::one_dim_backend< backend::rocfft_sin >
 Helper struct that defines the types and creates instances of one-dimensional executors. More...
 
struct  heffte::default_plan_options< backend::rocfft >
 Sets the default options for the cufft backend. More...
 
struct  heffte::default_plan_options< backend::rocfft_cos >
 Sets the default options for the cufft backend. More...
 
struct  heffte::default_plan_options< backend::rocfft_sin >
 Sets the default options for the cufft backend. More...
 
struct  heffte::backend::rocfft
 Type-tag for the rocFFT backend. More...
 
struct  heffte::backend::rocfft_cos
 Type-tag for the Cosine Transform using the rocFFT backend. More...
 
struct  heffte::backend::rocfft_sin
 Type-tag for the Sine Transform using the rocFFT backend. More...
 

Functions

void heffte::rocm::check_error (hipError_t status, const char *function_name)
 Checks the status of a ROCm command and in case of a failure, converts it to a C++ exception.
 
void heffte::rocm::check_error (rocfft_status status, const char *function_name)
 Checks the status of a cufft command and in case of a failure, converts it to a C++ exception.
 
template<typename precision_type , typename index >
void heffte::rocm::convert (hipStream_t stream, index num_entries, precision_type const source[], std::complex< precision_type > destination[])
 Convert real numbers to complex when both are located on the GPU device. More...
 
template<typename precision_type , typename index >
void heffte::rocm::convert (hipStream_t stream, index num_entries, std::complex< precision_type > const source[], precision_type destination[])
 Convert complex numbers to real when both are located on the GPU device. More...
 
template<typename scalar_type , typename index >
void heffte::rocm::scale_data (hipStream_t stream, index num_entries, scalar_type *data, double scale_factor)
 Scales real data (double or float) by the scaling factor.
 
template<typename scalar_type , typename index >
void heffte::rocm::direct_pack (hipStream_t stream, index nfast, index nmid, index nslow, index line_stride, index plane_stide, scalar_type const source[], scalar_type destination[])
 Performs a direct-pack operation for data sitting on the GPU device. More...
 
template<typename scalar_type , typename index >
void heffte::rocm::direct_unpack (hipStream_t stream, index nfast, index nmid, index nslow, index line_stride, index plane_stide, scalar_type const source[], scalar_type destination[])
 Performs a direct-unpack operation for data sitting on the GPU device. More...
 
template<typename scalar_type , typename index >
void heffte::rocm::transpose_unpack (hipStream_t stream, index nfast, index nmid, index nslow, index line_stride, index plane_stide, index buff_line_stride, index buff_plane_stride, int map0, int map1, int map2, scalar_type const source[], scalar_type destination[])
 Performs a transpose-unpack operation for data sitting on the GPU device. More...
 
template<>
std::string heffte::backend::name< rocfft > ()
 Returns the human readable name of the rocFFT backend.
 
template<>
std::string heffte::backend::name< rocfft_cos > ()
 Returns the human readable name of the rocFFT backend.
 
template<>
std::string heffte::backend::name< rocfft_sin > ()
 Returns the human readable name of the rocFFT backend.
 
plan_options heffte::force_reorder (plan_options opts)
 Forces the reorder logic for the ROCM r2c variant.
 

Detailed Description

Wrappers and template specializations related to the rocFFT backend. Requires CMake option:

-D Heffte_ENABLE_ROCM=ON

In addition to the rocFFT wrappers, this also includes a series of kernels for packing/unpacking/scaling the data, as well as a simple container that wraps around ROCM arrays for RAII style of resource management.

Function Documentation

◆ convert() [1/2]

template<typename precision_type , typename index >
void heffte::rocm::convert ( hipStream_t  stream,
index  num_entries,
precision_type const  source[],
std::complex< precision_type >  destination[] 
)

Convert real numbers to complex when both are located on the GPU device.

Launches a ROCM kernel.

◆ convert() [2/2]

template<typename precision_type , typename index >
void heffte::rocm::convert ( hipStream_t  stream,
index  num_entries,
std::complex< precision_type > const  source[],
precision_type  destination[] 
)

Convert complex numbers to real when both are located on the GPU device.

Launches a ROCM kernel.

◆ direct_pack()

template<typename scalar_type , typename index >
void heffte::rocm::direct_pack ( hipStream_t  stream,
index  nfast,
index  nmid,
index  nslow,
index  line_stride,
index  plane_stide,
scalar_type const  source[],
scalar_type  destination[] 
)

Performs a direct-pack operation for data sitting on the GPU device.

Launches a HIP kernel.

◆ direct_unpack()

template<typename scalar_type , typename index >
void heffte::rocm::direct_unpack ( hipStream_t  stream,
index  nfast,
index  nmid,
index  nslow,
index  line_stride,
index  plane_stide,
scalar_type const  source[],
scalar_type  destination[] 
)

Performs a direct-unpack operation for data sitting on the GPU device.

Launches a HIP kernel.

◆ transpose_unpack()

template<typename scalar_type , typename index >
void heffte::rocm::transpose_unpack ( hipStream_t  stream,
index  nfast,
index  nmid,
index  nslow,
index  line_stride,
index  plane_stide,
index  buff_line_stride,
index  buff_plane_stride,
int  map0,
int  map1,
int  map2,
scalar_type const  source[],
scalar_type  destination[] 
)

Performs a transpose-unpack operation for data sitting on the GPU device.

Launches a HIP kernel.