Skip to content

Commit 8a428cd

Browse files
authored
Merge pull request tensorflow#18846 from yongtang/04252018-FloorDiv-int8
Enable int8 support for FloorDiv
2 parents ce733dc + d42d364 commit 8a428cd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

tensorflow/core/kernels/cwise_op_floor_div.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ limitations under the License.
1616
#include "tensorflow/core/kernels/cwise_ops_common.h"
1717

1818
namespace tensorflow {
19-
REGISTER5(BinaryOp, CPU, "FloorDiv", functor::safe_floor_div, uint8, uint16,
20-
int16, int32, int64);
19+
REGISTER6(BinaryOp, CPU, "FloorDiv", functor::safe_floor_div, uint8, uint16,
20+
int8, int16, int32, int64);
2121
REGISTER3(BinaryOp, CPU, "FloorDiv", functor::floor_div_real, float,
2222
Eigen::half, double);
2323

tensorflow/python/kernel_tests/division_past_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ def testDivision(self):
3535
"""Test all the different ways to divide."""
3636
values = [1, 2, 7, 11]
3737
functions = (lambda x: x), constant_op.constant
38-
# TODO(irving): Test int8, int16 once we support casts for those.
39-
dtypes = np.int32, np.int64, np.float32, np.float64
38+
dtypes = np.int8, np.int16, np.int32, np.int64, np.float32, np.float64
4039

4140
tensors = []
4241
checks = []

0 commit comments

Comments
 (0)