diff options
15 files changed, 20 insertions, 122 deletions
diff --git a/tensorflow/core/kernels/cwise_op_div.cc b/tensorflow/core/kernels/cwise_op_div.cc index 472da8f2ca..f1d894b709 100644 --- a/tensorflow/core/kernels/cwise_op_div.cc +++ b/tensorflow/core/kernels/cwise_op_div.cc @@ -18,11 +18,10 @@ limitations under the License. namespace tensorflow { REGISTER5(BinaryOp, CPU, "Div", functor::div, float, Eigen::half, double, complex64, complex128); -REGISTER5(BinaryOp, CPU, "Div", functor::safe_div, uint8, uint16, int16, int32, - int64); +REGISTER4(BinaryOp, CPU, "Div", functor::safe_div, uint8, int16, int32, int64); #if GOOGLE_CUDA -REGISTER7(BinaryOp, GPU, "Div", functor::div, float, Eigen::half, double, uint8, - uint16, int16, int64); +REGISTER6(BinaryOp, GPU, "Div", functor::div, float, Eigen::half, double, uint8, + int16, int64); // A special GPU kernel for int32. // TODO(b/25387198): Also enable int32 in device memory. This kernel diff --git a/tensorflow/core/kernels/cwise_op_mul.cc b/tensorflow/core/kernels/cwise_op_mul.cc index 58564a8f39..96e45ce4c0 100644 --- a/tensorflow/core/kernels/cwise_op_mul.cc +++ b/tensorflow/core/kernels/cwise_op_mul.cc @@ -16,11 +16,11 @@ limitations under the License. #include "tensorflow/core/kernels/cwise_ops_common.h" namespace tensorflow { -REGISTER11(BinaryOp, CPU, "Mul", functor::mul, float, Eigen::half, double, uint8, - int8, uint16, int16, int32, int64, complex64, complex128); +REGISTER10(BinaryOp, CPU, "Mul", functor::mul, float, Eigen::half, double, uint8, + int8, int16, int32, int64, complex64, complex128); #if GOOGLE_CUDA -REGISTER8(BinaryOp, GPU, "Mul", functor::mul, float, Eigen::half, double, uint8, - int8, uint16, int16, int64); +REGISTER7(BinaryOp, GPU, "Mul", functor::mul, float, Eigen::half, double, uint8, + int8, int16, int64); // A special GPU kernel for int32. // TODO(b/25387198): Also enable int32 in device memory. This kernel // registration requires all int32 inputs and outputs to be in host memory. diff --git a/tensorflow/core/ops/compat/ops_history.v0.pbtxt b/tensorflow/core/ops/compat/ops_history.v0.pbtxt index 00b6dca6f6..3752103fb9 100644 --- a/tensorflow/core/ops/compat/ops_history.v0.pbtxt +++ b/tensorflow/core/ops/compat/ops_history.v0.pbtxt @@ -9959,40 +9959,6 @@ op { } } op { - name: "Div" - input_arg { - name: "x" - type_attr: "T" - } - input_arg { - name: "y" - type_attr: "T" - } - output_arg { - name: "z" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - type: DT_UINT8 - type: DT_INT8 - type: DT_UINT16 - type: DT_INT16 - type: DT_INT32 - type: DT_INT64 - type: DT_COMPLEX64 - type: DT_COMPLEX128 - } - } - } -} -op { name: "DrawBoundingBoxes" input_arg { name: "images" @@ -16715,41 +16681,6 @@ op { is_commutative: true } op { - name: "Mul" - input_arg { - name: "x" - type_attr: "T" - } - input_arg { - name: "y" - type_attr: "T" - } - output_arg { - name: "z" - type_attr: "T" - } - attr { - name: "T" - type: "type" - allowed_values { - list { - type: DT_HALF - type: DT_FLOAT - type: DT_DOUBLE - type: DT_UINT8 - type: DT_INT8 - type: DT_UINT16 - type: DT_INT16 - type: DT_INT32 - type: DT_INT64 - type: DT_COMPLEX64 - type: DT_COMPLEX128 - } - } - } - is_commutative: true -} -op { name: "Multinomial" input_arg { name: "logits" diff --git a/tensorflow/core/ops/math_ops.cc b/tensorflow/core/ops/math_ops.cc index 26b5eebbac..e6eb40551e 100644 --- a/tensorflow/core/ops/math_ops.cc +++ b/tensorflow/core/ops/math_ops.cc @@ -503,7 +503,7 @@ Returns element-wise smallest integer in not less than x. #define BINARY_MORE() \ Input("x: T").Input("y: T").Output("z: T").Attr( \ - "T: {half, float, double, uint8, int8, uint16, int16, int32, int64, complex64, complex128}") + "T: {half, float, double, uint8, int8, int16, int32, int64, complex64, complex128}") #define BINARY_FEWER() \ Input("x: T").Input("y: T").Output("z: T").Attr( \ diff --git a/tensorflow/core/ops/ops.pbtxt b/tensorflow/core/ops/ops.pbtxt index 9fb6d584b3..c1df2127d9 100644 --- a/tensorflow/core/ops/ops.pbtxt +++ b/tensorflow/core/ops/ops.pbtxt @@ -5362,7 +5362,6 @@ op { type: DT_DOUBLE type: DT_UINT8 type: DT_INT8 - type: DT_UINT16 type: DT_INT16 type: DT_INT32 type: DT_INT64 @@ -9502,7 +9501,6 @@ op { type: DT_DOUBLE type: DT_UINT8 type: DT_INT8 - type: DT_UINT16 type: DT_INT16 type: DT_INT32 type: DT_INT64 diff --git a/tensorflow/g3doc/api_docs/python/framework.md b/tensorflow/g3doc/api_docs/python/framework.md index 003c4ce9c1..186018b76b 100644 --- a/tensorflow/g3doc/api_docs/python/framework.md +++ b/tensorflow/g3doc/api_docs/python/framework.md @@ -1420,7 +1420,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). @@ -1840,7 +1840,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.mul.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.mul.md index 1ac6abe73a..2efd16e891 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.mul.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.mul.md @@ -8,7 +8,7 @@ Returns x * y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.Tensor.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.Tensor.md index ed8239d1ba..900dd7b879 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.Tensor.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.Tensor.md @@ -306,7 +306,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). @@ -726,7 +726,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.div.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.div.md index bc34738d56..61616c0e6b 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.div.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.div.md @@ -8,7 +8,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.Variable.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.Variable.md index b02a1a3545..43ce582f89 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.Variable.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.Variable.md @@ -458,7 +458,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). @@ -821,7 +821,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). diff --git a/tensorflow/g3doc/api_docs/python/math_ops.md b/tensorflow/g3doc/api_docs/python/math_ops.md index 6b960b759e..a5c30157d2 100644 --- a/tensorflow/g3doc/api_docs/python/math_ops.md +++ b/tensorflow/g3doc/api_docs/python/math_ops.md @@ -69,7 +69,7 @@ Returns x * y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). @@ -90,7 +90,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). diff --git a/tensorflow/g3doc/api_docs/python/state_ops.md b/tensorflow/g3doc/api_docs/python/state_ops.md index 7df7901cd1..c6be7a6442 100644 --- a/tensorflow/g3doc/api_docs/python/state_ops.md +++ b/tensorflow/g3doc/api_docs/python/state_ops.md @@ -473,7 +473,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). @@ -836,7 +836,7 @@ Returns x / y element-wise. ##### Args: -* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `uint16`, `int16`, `int32`, `int64`, `complex64`, `complex128`. +* <b>`x`</b>: A `Tensor`. Must be one of the following types: `half`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`. * <b>`y`</b>: A `Tensor`. Must have the same type as `x`. * <b>`name`</b>: A name for the operation (optional). diff --git a/tensorflow/python/kernel_tests/cwise_ops_test.py b/tensorflow/python/kernel_tests/cwise_ops_test.py index 428e60ecf5..3c37c21037 100644 --- a/tensorflow/python/kernel_tests/cwise_ops_test.py +++ b/tensorflow/python/kernel_tests/cwise_ops_test.py @@ -669,16 +669,6 @@ class BinaryOpTest(tf.test.TestCase): self._compareBoth(x, y, np.multiply, tf.mul) self._compareBoth(x, y, np.multiply, _MUL) - def testUint16Basic(self): - x = np.arange(1, 13, 2).reshape(1, 3, 2).astype(np.uint16) - y = np.arange(1, 7, 1).reshape(1, 3, 2).astype(np.uint16) - self._compareBoth(x, y, np.multiply, tf.mul) - self._compareBoth(x, y, np.multiply, _MUL) - self._compareBoth(x, y, np.true_divide, tf.truediv) - self._compareBoth(x, y, np.floor_divide, tf.floordiv) - self._compareBoth(x, y, np.true_divide, _TRUEDIV) - self._compareBoth(x, y, np.floor_divide, _FLOORDIV) - def testInt32Basic(self): x = np.arange(1, 13, 2).reshape(1, 3, 2).astype(np.int32) y = np.arange(1, 7, 1).reshape(1, 3, 2).astype(np.int32) diff --git a/tensorflow/python/ops/image_ops_test.py b/tensorflow/python/ops/image_ops_test.py index 115aee583a..b6d1cb07e9 100644 --- a/tensorflow/python/ops/image_ops_test.py +++ b/tensorflow/python/ops/image_ops_test.py @@ -1768,24 +1768,5 @@ class ConvertImageTest(test_util.TensorFlowTestCase): self._convert([0, 1.1 / 255.0, 1], dtypes.float32, dtypes.uint8, [0, 1, 255]) - def testConvertBetweenInt16AndInt8(self): - with self.test_session(use_gpu=True): - # uint8, uint16 - self._convert([0, 255 * 256], dtypes.uint16, dtypes.uint8, - [0, 255]) - self._convert([0, 255], dtypes.uint8, dtypes.uint16, - [0, 255 * 256]) - # int8, uint16 - self._convert([0, 127 * 2 * 256], dtypes.uint16, dtypes.int8, - [0, 127]) - self._convert([0, 127], dtypes.int8, dtypes.uint16, - [0, 127 * 2 * 256]) - # int16, uint16 - self._convert([0, 255 * 256], dtypes.uint16, dtypes.int16, - [0, 255 * 128]) - self._convert([0, 255 * 128], dtypes.int16, dtypes.uint16, - [0, 255 * 256]) - - if __name__ == '__main__': googletest.main() diff --git a/tensorflow/python/ops/math_ops.py b/tensorflow/python/ops/math_ops.py index 2f30192196..a7d905f0e4 100644 --- a/tensorflow/python/ops/math_ops.py +++ b/tensorflow/python/ops/math_ops.py @@ -789,7 +789,6 @@ def _OverrideBinaryOperatorHelper(func, op_name, clazz_object=ops.Tensor): _TRUEDIV_TABLE = { dtypes.uint8: dtypes.float32, dtypes.int8: dtypes.float32, - dtypes.uint16: dtypes.float32, dtypes.int16: dtypes.float32, dtypes.int32: dtypes.float64, dtypes.int64: dtypes.float64, |