aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-05-13 07:41:35 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-05-13 08:51:59 -0700
commit228709e2e5bfee4b15b72d23479848fe1ee04152 (patch)
treed99910c8c4ee32447be30bcdcee4e5b602e1d86f /tensorflow
parent569b82a9dac0db63dcdcb0df54f8cd5c59baabe6 (diff)
Extend support for uint16.
Change: 122262298
Diffstat (limited to 'tensorflow')
-rw-r--r--tensorflow/core/framework/register_types.h13
-rw-r--r--tensorflow/core/kernels/constant_op.cc3
-rw-r--r--tensorflow/core/util/saved_tensor_slice_util.h1
3 files changed, 11 insertions, 6 deletions
diff --git a/tensorflow/core/framework/register_types.h b/tensorflow/core/framework/register_types.h
index e170883f72..d1baac5d20 100644
--- a/tensorflow/core/framework/register_types.h
+++ b/tensorflow/core/framework/register_types.h
@@ -47,17 +47,18 @@ limitations under the License.
// Call "m" for all number types that support the comparison operations "<" and
// ">".
-#define TF_CALL_INTEGRAL_TYPES(m) \
- m(::tensorflow::int64) m(::tensorflow::int32) m(::tensorflow::uint8) \
- m(::tensorflow::int16) m(::tensorflow::int8)
+#define TF_CALL_INTEGRAL_TYPES(m) \
+ m(::tensorflow::int64) m(::tensorflow::int32) m(::tensorflow::uint16) \
+ m(::tensorflow::int16) m(::tensorflow::uint8) m(::tensorflow::int8)
#define TF_CALL_REAL_NUMBER_TYPES(m) \
TF_CALL_INTEGRAL_TYPES(m) \
m(Eigen::half) m(float) m(double)
-#define TF_CALL_REAL_NUMBER_TYPES_NO_INT32(m) \
- m(Eigen::half) m(float) m(double) m(::tensorflow::int64) \
- m(::tensorflow::uint8) m(::tensorflow::int16) m(::tensorflow::int8)
+#define TF_CALL_REAL_NUMBER_TYPES_NO_INT32(m) \
+ m(Eigen::half) m(float) m(double) m(::tensorflow::int64) \
+ m(::tensorflow::uint16) m(::tensorflow::int16) m(::tensorflow::uint8) \
+ m(::tensorflow::int8)
// Call "m" for all number types, including complex64 and complex128.
#define TF_CALL_NUMBER_TYPES(m) \
diff --git a/tensorflow/core/kernels/constant_op.cc b/tensorflow/core/kernels/constant_op.cc
index aa38bf4270..3cc782a05f 100644
--- a/tensorflow/core/kernels/constant_op.cc
+++ b/tensorflow/core/kernels/constant_op.cc
@@ -61,6 +61,7 @@ REGISTER_KERNEL(GPU, float);
REGISTER_KERNEL(GPU, double);
REGISTER_KERNEL(GPU, uint8);
REGISTER_KERNEL(GPU, int8);
+REGISTER_KERNEL(GPU, uint16);
REGISTER_KERNEL(GPU, int16);
REGISTER_KERNEL(GPU, int64);
REGISTER_KERNEL(GPU, complex64);
@@ -135,6 +136,7 @@ DEFINE_SETZERO_CPU(float);
DEFINE_SETZERO_CPU(double);
DEFINE_SETZERO_CPU(uint8);
DEFINE_SETZERO_CPU(int8);
+DEFINE_SETZERO_CPU(uint16);
DEFINE_SETZERO_CPU(int16);
DEFINE_SETZERO_CPU(int32);
DEFINE_SETZERO_CPU(int64);
@@ -190,6 +192,7 @@ REGISTER_KERNEL(GPU, float);
REGISTER_KERNEL(GPU, double);
REGISTER_KERNEL(GPU, uint8);
REGISTER_KERNEL(GPU, int8);
+REGISTER_KERNEL(GPU, uint16);
REGISTER_KERNEL(GPU, int16);
REGISTER_KERNEL(GPU, int64);
// Currently we do not support filling strings and complex64 on GPU
diff --git a/tensorflow/core/util/saved_tensor_slice_util.h b/tensorflow/core/util/saved_tensor_slice_util.h
index 4167c57ab2..53f74f0eb1 100644
--- a/tensorflow/core/util/saved_tensor_slice_util.h
+++ b/tensorflow/core/util/saved_tensor_slice_util.h
@@ -111,6 +111,7 @@ TENSOR_PROTO_EXTRACT_TYPE_COMPLEX(complex64, scomplex, float);
TENSOR_PROTO_EXTRACT_TYPE_COMPLEX(complex128, dcomplex, double);
TENSOR_PROTO_EXTRACT_TYPE(int32, int, int32);
TENSOR_PROTO_EXTRACT_TYPE(int64, int64, int64);
+TENSOR_PROTO_EXTRACT_TYPE(uint16, int, int32);
TENSOR_PROTO_EXTRACT_TYPE(uint8, int, int32);
TENSOR_PROTO_EXTRACT_TYPE(int8, int, int32);
TENSOR_PROTO_EXTRACT_TYPE(int16, int, int32);