From 8617f815d5c3d73cbfde27c9eedebd99efdda14c Mon Sep 17 00:00:00 2001 From: Jeffrey Poznanovic Date: Tue, 19 Mar 2019 17:25:57 +0000 Subject: [PATCH 1/2] Added ROCm support for fft ops (note that this test is currently bazel-tagged as 'no-rocm') --- tensorflow/core/kernels/fft_ops.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/core/kernels/fft_ops.cc b/tensorflow/core/kernels/fft_ops.cc index d7105a71bb8419..c08364e70789dc 100644 --- a/tensorflow/core/kernels/fft_ops.cc +++ b/tensorflow/core/kernels/fft_ops.cc @@ -28,7 +28,7 @@ limitations under the License. #include "tensorflow/core/util/env_var.h" #include "tensorflow/core/util/work_sharder.h" -#if GOOGLE_CUDA +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM #include "tensorflow/core/platform/stream_executor.h" #endif @@ -286,7 +286,7 @@ REGISTER_KERNEL_BUILDER(Name("IRFFT3D").Device(DEVICE_CPU).Label(FFT_LABEL), #undef FFT_LABEL -#if GOOGLE_CUDA +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM namespace { template @@ -547,6 +547,6 @@ REGISTER_KERNEL_BUILDER(Name("BatchFFT3D").Device(DEVICE_GPU), FFTGPU); REGISTER_KERNEL_BUILDER(Name("BatchIFFT3D").Device(DEVICE_GPU), FFTGPU); -#endif // GOOGLE_CUDA +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM } // end namespace tensorflow From d2823e37a3b662b8f5a3ccc1b8b1da35ba181541 Mon Sep 17 00:00:00 2001 From: Jeffrey Poznanovic Date: Tue, 19 Mar 2019 17:30:57 +0000 Subject: [PATCH 2/2] Added comment to endif --- tensorflow/core/kernels/fft_ops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/core/kernels/fft_ops.cc b/tensorflow/core/kernels/fft_ops.cc index c08364e70789dc..29b5e89b728023 100644 --- a/tensorflow/core/kernels/fft_ops.cc +++ b/tensorflow/core/kernels/fft_ops.cc @@ -30,7 +30,7 @@ limitations under the License. #if GOOGLE_CUDA || TENSORFLOW_USE_ROCM #include "tensorflow/core/platform/stream_executor.h" -#endif +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM namespace tensorflow {