Skip to content

Commit d208d75

Browse files
authored
Update eigen header locations for TF 2.16 (#2863)
1 parent 3380b3c commit d208d75

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

tensorflow_addons/custom_ops/image/cc/kernels/adjust_hsv_in_yiq_op.h

+6
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ limitations under the License.
2323
#include "tensorflow/core/framework/op_kernel.h"
2424
#include "tensorflow/core/framework/register_types.h"
2525
#include "tensorflow/core/framework/types.h"
26+
#include "tensorflow/core/public/version.h"
27+
#if TF_MAJOR_VERSION == 2 && TF_MINOR_VERSION >= 16
28+
#include "Eigen/Core"
29+
#include "unsupported/Eigen/CXX11/Tensor"
30+
#else
2631
#include "third_party/eigen3/Eigen/Core"
2732
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
33+
#endif
2834

2935
namespace tensorflow {
3036
namespace addons {

tensorflow_addons/custom_ops/image/cc/kernels/connected_components.h

+5
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ limitations under the License.
2626
#include "tensorflow/core/framework/op_kernel.h"
2727
#include "tensorflow/core/framework/tensor_types.h"
2828
#include "tensorflow/core/platform/types.h"
29+
#include "tensorflow/core/public/version.h"
2930
#include "tensorflow/core/util/work_sharder.h"
31+
#if TF_MAJOR_VERSION == 2 && TF_MINOR_VERSION >= 16
32+
#include "unsupported/Eigen/CXX11/Tensor"
33+
#else
3034
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
35+
#endif
3136

3237
namespace tensorflow {
3338
namespace addons {

tensorflow_addons/custom_ops/image/cc/kernels/euclidean_distance_transform_op.h

+5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ limitations under the License.
2121
#include "tensorflow/core/framework/op_kernel.h"
2222
#include "tensorflow/core/framework/tensor_types.h"
2323
#include "tensorflow/core/platform/types.h"
24+
#include "tensorflow/core/public/version.h"
25+
#if TF_MAJOR_VERSION == 2 && TF_MINOR_VERSION >= 16
26+
#include "unsupported/Eigen/CXX11/Tensor"
27+
#else
2428
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
29+
#endif
2530

2631
namespace tensorflow {
2732
namespace addons {

tensorflow_addons/custom_ops/seq2seq/cc/kernels/beam_search_ops.cc

+5
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ limitations under the License.
3232
#include "tensorflow/core/framework/types.h"
3333
#include "tensorflow/core/platform/logging.h"
3434
#include "tensorflow/core/platform/macros.h"
35+
#include "tensorflow/core/public/version.h"
3536
#include "tensorflow/core/util/work_sharder.h"
37+
#if TF_MAJOR_VERSION == 2 && TF_MINOR_VERSION >= 16
38+
#include "unsupported/Eigen/CXX11/Tensor"
39+
#else
3640
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
41+
#endif
3742

3843
namespace tensorflow {
3944
namespace addons {

tensorflow_addons/custom_ops/seq2seq/cc/kernels/beam_search_ops.h

+5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ limitations under the License.
1818

1919
#include "tensorflow/core/framework/tensor_types.h"
2020
#include "tensorflow/core/platform/types.h"
21+
#include "tensorflow/core/public/version.h"
22+
#if TF_MAJOR_VERSION == 2 && TF_MINOR_VERSION >= 16
23+
#include "unsupported/Eigen/CXX11/Tensor"
24+
#else
2125
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
26+
#endif
2227

2328
namespace tensorflow {
2429
class OpKernelContext;

0 commit comments

Comments
 (0)