Enable the generated version of maximum and minimum.

PiperOrigin-RevId: 361091405
Change-Id: I6bcdf971aec2ec8788c92ba55f14b475eda5a2a8
This commit is contained in:
Stephan Herhut 2021-03-05 00:45:03 -08:00 committed by TensorFlower Gardener
parent e6966f066a
commit 548976c0de
5 changed files with 6 additions and 10 deletions

View File

@ -19,8 +19,7 @@ limitations under the License.
namespace tensorflow { namespace tensorflow {
namespace functor { namespace functor {
#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ #if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED)
!defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED)
DEFINE_BINARY6(maximum, Eigen::half, float, double, uint8, int16, int64); DEFINE_BINARY6(maximum, Eigen::half, float, double, uint8, int16, int64);
#else #else
DEFINE_BINARY1(maximum, uint8); DEFINE_BINARY1(maximum, uint8);

View File

@ -19,8 +19,7 @@ limitations under the License.
namespace tensorflow { namespace tensorflow {
namespace functor { namespace functor {
#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ #if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED)
!defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED)
DEFINE_BINARY6(minimum, Eigen::half, float, double, uint8, int16, int64); DEFINE_BINARY6(minimum, Eigen::half, float, double, uint8, int16, int64);
#else #else
DEFINE_BINARY1(minimum, uint8); DEFINE_BINARY1(minimum, uint8);

View File

@ -19,8 +19,7 @@ namespace tensorflow {
REGISTER8(BinaryOp, CPU, "Maximum", functor::maximum, float, Eigen::half, REGISTER8(BinaryOp, CPU, "Maximum", functor::maximum, float, Eigen::half,
bfloat16, double, uint8, int16, int32, int64); bfloat16, double, uint8, int16, int32, int64);
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM #if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ #if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED)
!defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED)
REGISTER6(BinaryOp, GPU, "Maximum", functor::maximum, float, Eigen::half, REGISTER6(BinaryOp, GPU, "Maximum", functor::maximum, float, Eigen::half,
double, uint8, int16, int64); double, uint8, int16, int64);
#else #else

View File

@ -19,8 +19,7 @@ namespace tensorflow {
REGISTER8(BinaryOp, CPU, "Minimum", functor::minimum, float, Eigen::half, REGISTER8(BinaryOp, CPU, "Minimum", functor::minimum, float, Eigen::half,
bfloat16, double, uint8, int16, int32, int64); bfloat16, double, uint8, int16, int32, int64);
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM #if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED) || \ #if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED)
!defined(MLIR_GENERATED_EXPERIMENTAL_KERNELS_ENABLED)
REGISTER6(BinaryOp, GPU, "Minimum", functor::minimum, float, Eigen::half, REGISTER6(BinaryOp, GPU, "Minimum", functor::minimum, float, Eigen::half,
double, uint8, int16, int64); double, uint8, int16, int64);
#else #else

View File

@ -109,6 +109,8 @@ filegroup(
"gpu_op_complex.cc", "gpu_op_complex.cc",
"gpu_op_logical_and.cc", "gpu_op_logical_and.cc",
"gpu_op_logical_or.cc", "gpu_op_logical_or.cc",
"gpu_op_maximum.cc",
"gpu_op_minimum.cc",
], ],
compatible_with = get_compatible_with_cloud(), compatible_with = get_compatible_with_cloud(),
) )
@ -125,8 +127,6 @@ filegroup(
"gpu_op_left_shift.cc", "gpu_op_left_shift.cc",
"gpu_op_less.cc", "gpu_op_less.cc",
"gpu_op_less_equal.cc", "gpu_op_less_equal.cc",
"gpu_op_maximum.cc",
"gpu_op_minimum.cc",
"gpu_op_mul.cc", "gpu_op_mul.cc",
"gpu_op_not_equal.cc", "gpu_op_not_equal.cc",
"gpu_op_pow.cc", "gpu_op_pow.cc",