1/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7    http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#include "tensorflow/compiler/xla/service/cpu/runtime_fft.h"
17
18#define EIGEN_USE_THREADS
19
20#include "tensorflow/compiler/xla/executable_run_options.h"
21#include "tensorflow/compiler/xla/service/cpu/runtime_fft_impl.h"
22#include "tensorflow/core/platform/dynamic_annotations.h"
23#include "tensorflow/core/platform/types.h"
24
25using tensorflow::int32;
26using tensorflow::int64;
27
28TF_ATTRIBUTE_NO_SANITIZE_MEMORY void __xla_cpu_runtime_EigenFft(
29    const void* run_options_ptr, void* out, void* operand, int32 fft_type,
30    int32 fft_rank, int64 input_batch, int64 fft_length0, int64 fft_length1,
31    int64 fft_length2) {
32  const xla::ExecutableRunOptions* run_options =
33      static_cast<const xla::ExecutableRunOptions*>(run_options_ptr);
34  tensorflow::xla::EigenFftImpl(*run_options->intra_op_thread_pool(), out,
35                                operand, fft_type, fft_rank, input_batch,
36                                fft_length0, fft_length1, fft_length2);
37}
38