diff options
author | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
---|---|---|
committer | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
commit | f41959ccb2d9d4c722fe8fc3351401d53bcf4900 (patch) | |
tree | ef0ca22cb2a5ac4bdec9d080d8e0788a53ed496d /tensorflow/core/kernels/matmul_op_gpu.cu.cc |
TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation
using data flow graphs.
Base CL: 107276108
Diffstat (limited to 'tensorflow/core/kernels/matmul_op_gpu.cu.cc')
-rw-r--r-- | tensorflow/core/kernels/matmul_op_gpu.cu.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/matmul_op_gpu.cu.cc b/tensorflow/core/kernels/matmul_op_gpu.cu.cc new file mode 100644 index 0000000000..17107ce5df --- /dev/null +++ b/tensorflow/core/kernels/matmul_op_gpu.cu.cc @@ -0,0 +1,32 @@ +#if GOOGLE_CUDA + +#define EIGEN_USE_GPU + +#include "tensorflow/core/kernels/matmul_op.h" + +namespace tensorflow { +namespace functor { + +typedef Eigen::GpuDevice GPUDevice; + +// Partial specialization MatMulTensorFunctor<Device=GPUDevice, T> +template <typename T> +struct MatMulFunctor<GPUDevice, T> { + void operator()( + const GPUDevice& d, typename MatMulTypes<T>::out_type out, + typename MatMulTypes<T>::in_type in0, + typename MatMulTypes<T>::in_type in1, + const Eigen::array<Eigen::IndexPair<Eigen::DenseIndex>, 1>& dim_pair) { + MatMul<GPUDevice>(d, To32Bit(out), To32Bit(in0), To32Bit(in1), dim_pair); + } +}; + +#define DEFINE(T) template struct MatMulFunctor<GPUDevice, T>; +DEFINE(float); +// DEFINE(double); // Does not compile 1/2015. +#undef DEFINE + +} // end namespace functor +} // end namespace tensorflow + +#endif // GOOGLE_CUDA |