Add complex128 support to FFT, FFT2D, FFT3D, IFFT, IFFT2D, and IFFT3D.
authorRJ Ryan <rjryan@google.com>
Thu, 3 May 2018 00:57:27 +0000 (17:57 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 3 May 2018 01:00:06 +0000 (18:00 -0700)
commit8f0a90b711480c12716d1a3b1094cc8b34939f2d
treefc13cfb0c8bbd942a5cc46be8cd426f9f3a32b02
parent7833890a0da5226e4c409b1020155f1718c0edb2
Add complex128 support to FFT, FFT2D, FFT3D, IFFT, IFFT2D, and IFFT3D.

NumPy automatically upcasts to complex128 when computing FFTs, leading to issues like:
#10749

This change allows users to choose between 32-bit and 64-bit precision FFTs on CPU and GPU.

PiperOrigin-RevId: 195183206
tensorflow/compiler/tf2xla/kernels/fft_ops.cc
tensorflow/core/kernels/fft_ops.cc
tensorflow/core/ops/spectral_ops.cc
tensorflow/python/kernel_tests/fft_ops_test.py
tensorflow/python/kernel_tests/linalg/linear_operator_circulant_test.py
tensorflow/python/ops/spectral_grad.py