fft#
-
nvmath.
device. fft(*, compiler=None, code_type=None, execute_api=None, **kwargs)[source]# Create an
FFTobject that encapsulates a compiled and ready-to-use FFT device function.Deprecated since version 0.7.0.
- Parameters:
size (int) – The size of the FFT to calculate.
precision (str) – The computation precision specified as a numpy float dtype, currently supports
numpy.float16,numpy.float32andnumpy.float64.fft_type (str) – A string specifying the type of FFT operation, can be
'c2c','c2r'or'r2c'.sm (ComputeCapability) – Target mathdx compute-capability.
execution (str) – A string specifying the execution method, can be
'Block'or'Thread'.direction (str) – A string specifying the direction of FFT, can be
'forward'or'inverse'. If not provided, will be'forward'if complex-to-real FFT is specified and'inverse'if real-to-complex FFT is specified.ffts_per_block (int) – The number of FFTs calculated per CUDA block, optional. The default is 1. Alternatively, if provided as
'suggested'will be set to a suggested valueelements_per_thread (int) – The number of elements per thread, optional. The default is 1. Alternatively, if provided as
'suggested', will be set to a suggested value.real_fft_options (dict) –
A dictionary specifying the options for real FFT operation, optional. User may specify the following options in the dictionary:
'complex_layout', currently supports'natural','packed', and'full'.'real_mode', currently supports'normal'and'folded'.
compiler –
A string to specify the compiler for the device code, currently supports
None(default) and'numba'Changed in version 0.7.0: compiler is no longer needed and does not take effect. Use
nvmath.to get device function code.device. compile_fft_execute() code_type (CodeType) –
The target GPU code and compute-capability.
Changed in version 0.7.0: code_type should be used by
nvmath.and no longer needed for numba-cuda usage.device. compile_fft_execute() execute_api (str) –
A string specifying the signature of the function that handles problems with input in register or in shared memory buffers. Could be
'shared_memory'or'register_memory'.Changed in version 0.7.0: execute_api should be used by
nvmath.and no longer needed for numba-cuda usage.device. compile_fft_execute()
See also
The attributes of
FFTprovide a 1:1 mapping with the CUDA C++ cuFFTDx APIs. For further details, please refer to cuFFTDx documentation.Examples
Examples can be found in the nvmath/examples/device directory.