diff --git a/tensorflow/core/kernels/cwise_op_gpu_atan2.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_atan2.cu.cc index 7de20c68b4c..c651366a49c 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_atan2.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_atan2.cu.cc @@ -19,7 +19,10 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY2(atan2, float, double); +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc index fb1416cebf6..1f96a287f37 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc @@ -19,8 +19,13 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY8(bitwise_and, int8, int16, int32, int64, uint8, uint16, uint32, uint64); +#else +DEFINE_BINARY4(bitwise_and, uint8, uint16, uint32, uint64); +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_bitwise_or.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_bitwise_or.cu.cc index 0d7fca5f87a..bfcde207157 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_bitwise_or.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_bitwise_or.cu.cc @@ -19,8 +19,13 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY8(bitwise_or, int8, int16, int32, int64, uint8, uint16, uint32, uint64); +#else +DEFINE_BINARY4(bitwise_or, uint8, uint16, uint32, uint64); +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_bitwise_xor.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_bitwise_xor.cu.cc index 686f9dd94a8..78d3a2bd341 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_bitwise_xor.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_bitwise_xor.cu.cc @@ -19,8 +19,13 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY8(bitwise_xor, int8, int16, int32, int64, uint8, uint16, uint32, uint64); +#else +DEFINE_BINARY4(bitwise_xor, uint8, uint16, uint32, uint64); +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_div.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_div.cu.cc index 3135ae10bd2..f9d727088d9 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_div.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_div.cu.cc @@ -19,8 +19,13 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY10(div, Eigen::half, float, double, uint8, uint16, int16, int32, int64, complex64, complex128); +#else +DEFINE_BINARY4(div, uint8, uint16, complex64, complex128); +#endif DEFINE_BINARY5(div_no_nan, Eigen::half, float, double, complex64, complex128); } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_equal_to.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_equal_to.cu.cc index f668db420cb..dd649dd77a7 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_equal_to.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_equal_to.cu.cc @@ -19,8 +19,14 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY10(equal_to, float, Eigen::half, double, uint8, int8, int16, int64, complex64, complex128, bool); +#else +DEFINE_BINARY3(equal_to, uint8, complex64, complex128); +#endif + DEFINE_APPROXIMATE_EQUAL2(float, double); } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_greater.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_greater.cu.cc index 9638bd55805..ccf422ac8ec 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_greater.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_greater.cu.cc @@ -19,8 +19,13 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY10(greater, Eigen::half, float, double, int64, uint8, uint16, uint32, uint64, int8, int16); +#else +DEFINE_BINARY4(greater, uint8, uint16, uint32, uint64); +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_greater_equal.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_greater_equal.cu.cc index 22025cc12b5..298224ef82f 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_greater_equal.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_greater_equal.cu.cc @@ -19,8 +19,13 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY10(greater_equal, Eigen::half, float, double, int64, uint8, uint16, uint32, uint64, int8, int16); +#else +DEFINE_BINARY4(greater_equal, uint8, uint16, uint32, uint64); +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_less.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_less.cu.cc index 93b907fd938..4bb340ee82b 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_less.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_less.cu.cc @@ -19,8 +19,13 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY10(less, Eigen::half, float, double, int64, uint8, uint16, uint32, uint64, int8, int16); +#else +DEFINE_BINARY4(less, uint8, uint16, uint32, uint64); +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_less_equal.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_less_equal.cu.cc index ab680c3b8fa..232f70a9c86 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_less_equal.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_less_equal.cu.cc @@ -19,8 +19,13 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY10(less_equal, Eigen::half, float, double, int64, uint8, uint16, uint32, uint64, int8, int16); +#else +DEFINE_BINARY4(less_equal, uint8, uint16, uint32, uint64); +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_logical_and.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_logical_and.cu.cc index 9f0253db2fb..3d87f0e9ad9 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_logical_and.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_logical_and.cu.cc @@ -19,11 +19,14 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) template struct BinaryFunctor<GPUDevice, logical_and, 1>; template struct BinaryFunctor<GPUDevice, logical_and, 2>; template struct BinaryFunctor<GPUDevice, logical_and, 3>; template struct BinaryFunctor<GPUDevice, logical_and, 4>; template struct BinaryFunctor<GPUDevice, logical_and, 5>; +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_logical_or.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_logical_or.cu.cc index 135ba7cec40..bd2dba9ac2c 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_logical_or.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_logical_or.cu.cc @@ -19,11 +19,14 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) template struct BinaryFunctor<GPUDevice, logical_or, 1>; template struct BinaryFunctor<GPUDevice, logical_or, 2>; template struct BinaryFunctor<GPUDevice, logical_or, 3>; template struct BinaryFunctor<GPUDevice, logical_or, 4>; template struct BinaryFunctor<GPUDevice, logical_or, 5>; +#endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_maximum.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_maximum.cu.cc index 0a0fe73a870..e69793d460e 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_maximum.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_maximum.cu.cc @@ -22,6 +22,8 @@ namespace functor { #if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY6(maximum, Eigen::half, float, double, uint8, int16, int64); +#else +DEFINE_BINARY1(maximum, uint8); #endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_minimum.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_minimum.cu.cc index c085a0daf57..99344a53030 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_minimum.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_minimum.cu.cc @@ -22,6 +22,8 @@ namespace functor { #if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY6(minimum, Eigen::half, float, double, uint8, int16, int64); +#else +DEFINE_BINARY1(minimum, uint8); #endif } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_mul.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_mul.cu.cc index 40a3d9130c0..d8ab87d4904 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_mul.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_mul.cu.cc @@ -19,9 +19,11 @@ limitations under the License. namespace tensorflow { namespace functor { -DEFINE_BINARY11(mul, Eigen::half, float, double, uint8, uint32, int8, uint16, - int16, int32, int64, complex64); -DEFINE_BINARY2(mul, uint64, complex128); +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) +DEFINE_BINARY7(mul, Eigen::half, float, double, int8, int16, int32, int64); +#endif +DEFINE_BINARY6(mul, uint8, uint32, uint16, uint64, complex64, complex128); DEFINE_BINARY5(mul_no_nan, Eigen::half, float, double, complex64, complex128); } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_not_equal_to.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_not_equal_to.cu.cc index 67a6057995d..8b6446c4b73 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_not_equal_to.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_not_equal_to.cu.cc @@ -19,8 +19,13 @@ limitations under the License. namespace tensorflow { namespace functor { -DEFINE_BINARY10(not_equal_to, float, Eigen::half, double, uint8, int8, int16, - int64, complex64, complex128, bool); +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) +DEFINE_BINARY7(not_equal_to, float, Eigen::half, double, int8, int16, int64, + bool); +#endif +DEFINE_BINARY3(not_equal_to, uint8, complex64, complex128); + } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_sub.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_sub.cu.cc index d68a0b68445..c5d937adbd0 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_sub.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_sub.cu.cc @@ -19,9 +19,11 @@ limitations under the License. namespace tensorflow { namespace functor { -DEFINE_BINARY9(sub, Eigen::half, float, double, int64, complex64, complex128, - uint8, uint16, uint32); -DEFINE_BINARY1(sub, uint64); +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) +DEFINE_BINARY4(sub, Eigen::half, float, double, int64); +#endif +DEFINE_BINARY6(sub, complex64, complex128, uint8, uint16, uint32, uint64); } // namespace functor } // namespace tensorflow diff --git a/tensorflow/core/kernels/cwise_op_gpu_zeta.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_zeta.cu.cc index 41499ea096f..56b8b461178 100644 --- a/tensorflow/core/kernels/cwise_op_gpu_zeta.cu.cc +++ b/tensorflow/core/kernels/cwise_op_gpu_zeta.cu.cc @@ -19,7 +19,10 @@ limitations under the License. namespace tensorflow { namespace functor { +#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ + !defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED) DEFINE_BINARY2(zeta, float, double); +#endif DEFINE_BINARY2(polygamma, float, double); } // namespace functor } // namespace tensorflow