diff options
Diffstat (limited to 'tensorflow/core/framework/types.h')
-rw-r--r-- | tensorflow/core/framework/types.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tensorflow/core/framework/types.h b/tensorflow/core/framework/types.h index 9127750d68..3b4362bcc9 100644 --- a/tensorflow/core/framework/types.h +++ b/tensorflow/core/framework/types.h @@ -74,6 +74,28 @@ TF_EXPORT extern const char* const DEVICE_CPU; // "CPU" TF_EXPORT extern const char* const DEVICE_GPU; // "GPU" TF_EXPORT extern const char* const DEVICE_SYCL; // "SYCL" +template <typename Device> +struct DeviceName {}; + +template <> +struct DeviceName<Eigen::ThreadPoolDevice> { + static const std::string value; +}; + +#if GOOGLE_CUDA +template <> +struct DeviceName<Eigen::GpuDevice> { + static const std::string value; +}; +#endif // GOOGLE_CUDA + +#ifdef TENSORFLOW_USE_SYCL +template <> +struct DeviceName<Eigen::SyclDevice> { + static const std::string value; +}; +#endif // TENSORFLOW_USE_SYCL + typedef gtl::InlinedVector<MemoryType, 4> MemoryTypeVector; typedef gtl::ArraySlice<MemoryType> MemoryTypeSlice; |