From 27559caaab72953a7add329957679466ea64cf10 Mon Sep 17 00:00:00 2001 From: Deven Desai Date: Wed, 3 Jul 2019 00:13:49 +0000 Subject: [PATCH] Adding ROCm support for the functional ops --- tensorflow/core/kernels/functional_ops.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/core/kernels/functional_ops.cc b/tensorflow/core/kernels/functional_ops.cc index 52ec30080cf..920c14b36ac 100644 --- a/tensorflow/core/kernels/functional_ops.cc +++ b/tensorflow/core/kernels/functional_ops.cc @@ -15,7 +15,7 @@ limitations under the License. #define EIGEN_USE_THREADS #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" -#if GOOGLE_CUDA +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM #include "tensorflow/core/common_runtime/device.h" #include "tensorflow/core/framework/device_base.h" #endif @@ -424,7 +424,7 @@ class WhileOp : public AsyncOpKernel { return Finish(s); } Tensor cond_t; -#if GOOGLE_CUDA +#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM const DeviceBase::GpuDeviceInfo* gpu_device_info = ctx_->device()->tensorflow_gpu_device_info(); const bool is_hostmem_dtype =