diff options
Diffstat (limited to 'tensorflow/core/framework/op_kernel.h')
-rw-r--r-- | tensorflow/core/framework/op_kernel.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/core/framework/op_kernel.h b/tensorflow/core/framework/op_kernel.h index 145b8c5315..4a66d43e50 100644 --- a/tensorflow/core/framework/op_kernel.h +++ b/tensorflow/core/framework/op_kernel.h @@ -53,6 +53,7 @@ limitations under the License. namespace Eigen { struct ThreadPoolDevice; struct GpuDevice; +struct SyclDevice; } // end namespace Eigen namespace tensorflow { @@ -891,6 +892,11 @@ class OpKernelContext { const Eigen::GpuDevice& eigen_gpu_device() const { return params_->eigen_gpu_device->device(); } +#ifdef TENSORFLOW_USE_SYCL + const Eigen::SyclDevice& eigen_sycl_device() const { + return *device()->eigen_sycl_device(); + } +#endif template <typename EigenDeviceType> const EigenDeviceType& eigen_device() const; |