diff --git a/tensorflow/core/kernels/betainc_op.cc b/tensorflow/core/kernels/betainc_op.cc index e1fab18d153589..8683006ed3839f 100644 --- a/tensorflow/core/kernels/betainc_op.cc +++ b/tensorflow/core/kernels/betainc_op.cc @@ -122,7 +122,7 @@ REGISTER_KERNELS(float); REGISTER_KERNELS(double); #undef REGISTER_KERNELS -#if GOOGLE_CUDA +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM // Forward declarations of the functor specializations for GPU. namespace functor { #define DECLARE_GPU_SPEC_NDIM(T, NDIM) \ @@ -164,6 +164,6 @@ REGISTER_GPU_KERNELS(float); REGISTER_GPU_KERNELS(double); #undef REGISTER_GPU_KERNELS -#endif // GOOGLE_CUDA +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM } // namespace tensorflow diff --git a/tensorflow/core/kernels/betainc_op_gpu.cu.cc b/tensorflow/core/kernels/betainc_op_gpu.cu.cc index 3b99ef323d147e..4c8b0aa10b4114 100644 --- a/tensorflow/core/kernels/betainc_op_gpu.cu.cc +++ b/tensorflow/core/kernels/betainc_op_gpu.cu.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#if GOOGLE_CUDA +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM #define EIGEN_USE_GPU @@ -41,4 +41,4 @@ DEFINE_GPU_KERNELS(double); } // end namespace tensorflow -#endif // GOOGLE_CUDA +#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM