mindscience.sciops.fft.ASD_FFT2D

class mindscience.sciops.fft.ASD_FFT2D[source]

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

This operator performs 2D Fast Fourier Transform on complex input tensors, optimized for Ascend NPU hardware acceleration.

Inputs:
  • xr (Tensor): Real part of input complex tensor with data type float32, at least 2D.

  • xi (Tensor): Imaginary part of input complex tensor with data type float32.

Outputs:
  • 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_FFT2D
>>> xr = ms.Tensor([[[1.0, 2.0], [3.0, 4.0]]], ms.float32)
>>> xi = ms.Tensor([[[0.0, 0.0], [0.0, 0.0]]], ms.float32)
>>> asd_fft2d = ASD_FFT2D()
>>> yr, yi = asd_fft2d(xr, xi)
>>> print(yr.shape)
(1, 2, 2)
>>> print(yi.shape)
(1, 2, 2)