|
LBANN
0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
|
Wrapper around cuFFT. More...
#include <cufft_wrapper.hpp>
Classes | |
| struct | InternalPlanType |
Public Types | |
| using | InputType = InputTypeT |
| using | OutputType = ToComplex< InputType > |
| using | RealType = ToReal< InputType > |
| using | ComplexType = ToComplex< InputType > |
| using | RealMatType = El::Matrix< RealType, El::Device::GPU > |
| using | ComplexMatType = El::Matrix< ComplexType, El::Device::GPU > |
| using | ComplexBufferType = El::simple_buffer< ComplexType, El::Device::GPU > |
| using | InputMatType = El::Matrix< InputType, El::Device::GPU > |
| using | OutputMatType = El::Matrix< OutputType, El::Device::GPU > |
| using | ExecutorType = cuFFTExecutor< InputType, OutputType > |
| using | PlanType = cufftHandle |
Public Member Functions | |
| cuFFTWrapper ()=default | |
| ~cuFFTWrapper ()=default | |
| cuFFTWrapper (cuFFTWrapper &&other) noexcept=default | |
| cuFFTWrapper (cuFFTWrapper const &)=delete | |
| void | setup_forward (InputMatType &in, OutputMatType &out, std::vector< int > const &full_dims) |
| Setup the forward transform. More... | |
| void | setup_forward (InputMatType &in, std::vector< int > const &full_dims) |
| Setup an in-place forward transform. More... | |
| void | setup_backward (OutputMatType &in, InputMatType &out, std::vector< int > const &full_dims) |
| Setup the backward (inverse) transform. More... | |
| void | setup_backward (OutputMatType &in, std::vector< int > const &full_dims) |
| Setup the in-place backward (inverse) transform. More... | |
| void | compute_forward (InputMatType &in, OutputMatType &out) const |
| void | compute_forward (InputMatType &in) const |
| void | compute_backward (OutputMatType &in, InputMatType &out) const |
| void | compute_backward (OutputMatType &in) const |
Private Member Functions | |
| void | compute_common (OutputMatType &in, InputMatType &out, int dir) const |
| template<typename InMatT , typename OutMatT > | |
| void | setup_common (InMatT &in, OutMatT &out, std::vector< int > const &full_dims) |
Private Attributes | |
| std::vector< InternalPlanType > | plans_ |
Wrapper around cuFFT.
The main constraint is that the sample data to which the DFT will be applied must be fully packed. Batches do not need to be fully packed, but all lower dimensions do. For example, to compute the DFT of each feature map in a batch of N samples with C feature maps of size HxW per sample, the input matrix must have width N and each column must be CHW-packed, in the cuDNN sense.
This class is structured to match the FFTWWrapper, even though the cuFFT interface is simpler and better in many ways.
Definition at line 141 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::ComplexBufferType = El::simple_buffer<ComplexType, El::Device::GPU> |
Definition at line 153 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::ComplexMatType = El::Matrix<ComplexType, El::Device::GPU> |
Definition at line 151 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::ComplexType = ToComplex<InputType> |
Definition at line 148 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::ExecutorType = cuFFTExecutor<InputType, OutputType> |
Definition at line 158 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::InputMatType = El::Matrix<InputType, El::Device::GPU> |
Definition at line 155 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::InputType = InputTypeT |
Definition at line 144 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::OutputMatType = El::Matrix<OutputType, El::Device::GPU> |
Definition at line 156 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::OutputType = ToComplex<InputType> |
Definition at line 145 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::PlanType = cufftHandle |
Definition at line 159 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::RealMatType = El::Matrix<RealType, El::Device::GPU> |
Definition at line 150 of file cufft_wrapper.hpp.
| using lbann::cufft::cuFFTWrapper< InputTypeT >::RealType = ToReal<InputType> |
Definition at line 147 of file cufft_wrapper.hpp.
|
default |
|
default |
|
defaultnoexcept |
|
delete |
|
inline |
Definition at line 254 of file cufft_wrapper.hpp.
|
inline |
Definition at line 259 of file cufft_wrapper.hpp.
|
inlineprivate |
Definition at line 265 of file cufft_wrapper.hpp.
|
inline |
Definition at line 244 of file cufft_wrapper.hpp.
|
inline |
Definition at line 249 of file cufft_wrapper.hpp.
|
inline |
Setup the backward (inverse) transform.
| in | Input array; must be allocated, could be overwritten. |
| out | Output array; must be allocated, could be overwritten. |
| full_dims | Fold dimensions for the tensors in columns of in/out. The format is expected to be [num_feature_maps, feature_map_dims]. |
Definition at line 226 of file cufft_wrapper.hpp.
|
inline |
Setup the in-place backward (inverse) transform.
| in | Input array; must be allocated, could be overwritten. |
| full_dims | Fold dimensions for the tensors in columns of in/out. The format is expected to be [num_feature_maps, feature_map_dims]. |
Definition at line 239 of file cufft_wrapper.hpp.
|
inlineprivate |
|
inline |
Setup the forward transform.
| in | Input array; must be allocated, could be overwritten. |
| out | Output array; must be allocated, could be overwritten. |
| full_dims | Fold dimensions for the tensors in columns of in/out. The format is expected to be [num_feature_maps, feature_map_dims]. |
Definition at line 201 of file cufft_wrapper.hpp.
|
inline |
Setup an in-place forward transform.
| in | Input array; must be allocated, could be overwritten. |
| full_dims | Fold dimensions for the tensors in columns of in/out. The format is expected to be [num_feature_maps, feature_map_dims]. |
Definition at line 213 of file cufft_wrapper.hpp.
|
private |
Definition at line 397 of file cufft_wrapper.hpp.