nvmath.fft.ifft

nvmath.fft.ifft(operand, axes=None, options=None, prolog=None, epilog=None, stream=None)[source]

Perform an N-D complex-to-complex (C2C) inverse FFT on the provided complex operand. The direction is implicitly inverse.

Parameters:
  • operand – A tensor (ndarray-like object). The currently supported types are numpy.ndarray, cupy.ndarray, and torch.Tensor.

  • axes – The dimensions along which the FFT is performed. Currently, it is required that the axes are contiguous and include the first or the last dimension. Only up to 3D FFTs are supported.

  • options – Specify options for the FFT as a FFTOptions object. Alternatively, a dict containing the parameters for the FFTOptions constructor can also be provided. If not specified, the value will be set to the default-constructed FFTOptions object.

  • prolog – Provide device-callable function in LTO-IR format to use as load-callback as an object of type DeviceCallable. Alternatively, a dict containing the parameters for the DeviceCallable constructor can also be provided. The default is no prolog.

  • epilog – Provide device-callable function in LTO-IR format to use as store-callback as an object of type DeviceCallable. Alternatively, a dict containing the parameters for the DeviceCallable constructor can also be provided. The default is no epilog.

  • stream – Provide the CUDA stream to use for executing the operation. Acceptable inputs include cudaStream_t (as Python int), cupy.cuda.Stream, and torch.cuda.Stream. If a stream is not provided, the current stream from the operand package will be used.

Returns:

A transformed operand that retains the same data type and shape as the input. It remains on the same device and uses the same package as the input operand.

See also

fft(), irfft(), FFT.

Notes

  • This function only takes complex operand for C2C transformation. If users wishes to perform full FFT transformation on real input, please cast the input to the corresponding complex data type.

  • This function is a convenience wrapper around FFT and and is specifically meant for single use. The same computation can be performed with the stateful API by passing the argument direction='inverse' when calling FFT.execute().