Enable the generated version of cos and cosh kernels.

PiperOrigin-RevId: 354503126
Change-Id: I1a7b6fdc50e0a74b9ffc95a44827372188cad78d
This commit is contained in:
Stephan Herhut 2021-01-29 03:42:41 -08:00 committed by TensorFlower Gardener
parent 65c24bc28f
commit 78250f869b
5 changed files with 8 additions and 6 deletions

View File

@ -20,8 +20,7 @@ REGISTER6(UnaryOp, CPU, "Cos", functor::cos, float, Eigen::half, bfloat16,
double, complex64, complex128); double, complex64, complex128);
#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_GPU_KERNELS_ENABLED)
REGISTER3(UnaryOp, GPU, "Cos", functor::cos, float, Eigen::half, double); REGISTER3(UnaryOp, GPU, "Cos", functor::cos, float, Eigen::half, double);
#endif #endif
#endif #endif

View File

@ -20,8 +20,7 @@ REGISTER5(UnaryOp, CPU, "Cosh", functor::cosh, float, double, bfloat16,
complex64, complex128); complex64, complex128);
#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_GPU_KERNELS_ENABLED)
REGISTER2(UnaryOp, GPU, "Cosh", functor::cosh, float, double); REGISTER2(UnaryOp, GPU, "Cosh", functor::cosh, float, double);
#endif #endif
#endif #endif

View File

@ -19,7 +19,9 @@ limitations under the License.
namespace tensorflow { namespace tensorflow {
namespace functor { namespace functor {
#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED)
DEFINE_UNARY3(cos, Eigen::half, float, double); DEFINE_UNARY3(cos, Eigen::half, float, double);
#endif
} // namespace functor } // namespace functor
} // namespace tensorflow } // namespace tensorflow

View File

@ -19,7 +19,9 @@ limitations under the License.
namespace tensorflow { namespace tensorflow {
namespace functor { namespace functor {
#if !defined(MLIR_GENERATED_GPU_KERNELS_ENABLED)
DEFINE_UNARY2(cosh, float, double); DEFINE_UNARY2(cosh, float, double);
#endif
} // namespace functor } // namespace functor
} // namespace tensorflow } // namespace tensorflow

View File

@ -41,6 +41,8 @@ filegroup(
"gpu_op_abs.cc", "gpu_op_abs.cc",
"gpu_op_atan.cc", "gpu_op_atan.cc",
"gpu_op_atanh.cc", "gpu_op_atanh.cc",
"gpu_op_cos.cc",
"gpu_op_cosh.cc",
"gpu_op_tan.cc", "gpu_op_tan.cc",
"gpu_op_tanh.cc", "gpu_op_tanh.cc",
], ],
@ -58,8 +60,6 @@ filegroup(
"gpu_op_complex.cc", "gpu_op_complex.cc",
"gpu_op_complex_abs.cc", "gpu_op_complex_abs.cc",
"gpu_op_conj.cc", "gpu_op_conj.cc",
"gpu_op_cos.cc",
"gpu_op_cosh.cc",
"gpu_op_erf.cc", "gpu_op_erf.cc",
"gpu_op_erfc.cc", "gpu_op_erfc.cc",
"gpu_op_exp.cc", "gpu_op_exp.cc",