diff options
author | A. Unique TensorFlower <nobody@tensorflow.org> | 2016-03-31 01:43:48 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-03-31 03:03:26 -0700 |
commit | 9b71f96ae83bbc7a7f8ce91d94e3c1de408ac07f (patch) | |
tree | 45ef9b31e42ac7efe8f4f5436eabb06b69ae3db7 /tensorflow/cc/ops | |
parent | e91d596e1d2c69f72c63822374368eafaef73bd2 (diff) |
Add half support for the first basic ops, namely Cast and Const.
Change: 118661449
Diffstat (limited to 'tensorflow/cc/ops')
-rw-r--r-- | tensorflow/cc/ops/const_op.cc | 2 | ||||
-rw-r--r-- | tensorflow/cc/ops/const_op.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/cc/ops/const_op.cc b/tensorflow/cc/ops/const_op.cc index ddfa2a5b0e..5f5680e54e 100644 --- a/tensorflow/cc/ops/const_op.cc +++ b/tensorflow/cc/ops/const_op.cc @@ -84,6 +84,8 @@ DEFINE_CONST(int8, int_val); DEFINE_CONST(int64, int64_val); DEFINE_CONST(bool, bool_val); +DEFINE_CONST_IMPL(Eigen::half, proto.add_half_val(t.begin()->x)); + DEFINE_CONST_IMPL(complex64, proto.add_scomplex_val(t.begin()->real()); proto.add_scomplex_val(t.begin()->imag());); diff --git a/tensorflow/cc/ops/const_op.h b/tensorflow/cc/ops/const_op.h index 0a1ee3f1e0..f29e2ab3da 100644 --- a/tensorflow/cc/ops/const_op.h +++ b/tensorflow/cc/ops/const_op.h @@ -42,6 +42,7 @@ namespace ops { return Const(gtl::ArraySlice<TYPE>(t), shape, options); \ } +DECLARE_CONST(Eigen::half); DECLARE_CONST(float); DECLARE_CONST(double); DECLARE_CONST(int32); |