mindscience.sciops.fft.asd_rfft2d

mindscience.sciops.fft.asd_rfft2d(*args, **kwargs)[source]

2D real-to-complex FFT transform using Ascend NPU acceleration.

This function performs 2D Real Fast Fourier Transform on real input tensors, optimized for Ascend NPU hardware acceleration.

Parameters
  • *args

    Variable length argument list. Typically includes:

    • xr (Tensor): Input real tensor with data type float32, at least 2D.

  • **kwargs – Arbitrary keyword arguments.

Returns

Tuple[Tensor, Tensor]. A tuple containing,

  • yr (Tensor). Real part of output complex tensor with data type float32.

  • yi (Tensor). Imaginary part of output complex tensor with data type float32.

Raises

ValueError – If input tensor data type is not float32 or tensor has less than 2 dimensions.

Examples

>>> import mindspore as ms
>>> from mindscience.sciops.fft import asd_rfft2d
>>> xr = ms.Tensor([[[1.0, 2.0], [3.0, 4.0]]], ms.float32)
>>> yr, yi = asd_rfft2d(xr)
>>> print(yr.shape)
(1, 2, 2)
>>> print(yi.shape)
(1, 2, 2)