1 /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 #ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_OPTIMIZED_EIGEN_SPATIAL_CONVOLUTIONS_H_
17 #define TENSORFLOW_LITE_KERNELS_INTERNAL_OPTIMIZED_EIGEN_SPATIAL_CONVOLUTIONS_H_
18 
19 #define EIGEN_USE_CUSTOM_THREAD_POOL
20 #define EIGEN_USE_THREADS
21 
22 // NOTE: Eigen is slightly different internally and externally. We need to
23 // hack the unsupported/Eigen/CXX11/Tensor header instantiation macros at
24 // specific places, so we need two copies of the hacked file, one for
25 // internal and one for external.
26 // If you have trouble simply undef out the reducer macro e.g.
27 // TFLITE_REDUCE_INSTANTIATIONS_GOOGLE, but be aware this will make
28 // the binary much bigger!
29 #define TFLITE_REDUCE_INSTANTIATIONS_OPEN_SOURCE
30 #define Eigen EigenForTFLite
31 #if defined(TFLITE_REDUCE_INSTANTIATIONS_GOOGLE)
32 #include "tensorflow/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_google.h"
33 #elif defined(TFLITE_REDUCE_INSTANTIATIONS_OPEN_SOURCE)
34 #include "tensorflow/lite/kernels/internal/optimized/eigen_tensor_reduced_instantiations_oss.h"
35 #else
36 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
37 #endif
38 
39 #include "tensorflow/core/kernels/eigen_spatial_convolutions-inl.h"
40 
41 #endif  // TENSORFLOW_LITE_KERNELS_INTERNAL_OPTIMIZED_EIGEN_SPATIAL_CONVOLUTIONS_H_
42