aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com>2017-12-03 06:30:40 -0800
committerGravatar Sourabh Bajaj <1517779+sb2nov@users.noreply.github.com>2017-12-03 06:30:40 -0800
commit48892001b48d628a00a535d4cc19d9d7b5fcac11 (patch)
tree98768985b3df81508d0b8417aa0f558a7f72d41c /tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc
parent0fee74eadea48baec80a979763eb19096d148026 (diff)
Add uint32 and uint64 support for `bitwise_and/or/xor` (#14883)
* Add uint32 and uint64 support for `bitwise_and/or/xor` In `tensorflow/core/ops/bitwise_ops.cc`, uint32 and uint64 have been enabled for bitwise operations `and/or/xor/left_shift/right_shift`. However, the kernels of `and/or/xor` have no support of uint32 and uint64. This is in comparision to `left_shift/right_shift` which have the uint32/uint64 support, and, is tested in `bitwise_ops_test.py`. This fix adds uint32 and uint64 to bitwise `and/or/xor` kernels and adds relevant test cases in `bitwise_ops_test.py`, to bring `and/or/xor` as `left_shift/right_shift`. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Add uint32 and uint64 support for bitwise_and Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Add uint32 and uint64 support for bitwise_or Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Add uint32 and uint64 support for bitwise_xor Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Register GPU functor for bitwise_and, bitwise_or, bitwise_xor Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Sanitize with clang-format -i --style=Google Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc')
-rw-r--r--tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc b/tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc
index 27f973c90d..3fbf69c114 100644
--- a/tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc
+++ b/tensorflow/core/kernels/cwise_op_gpu_bitwise_and.cu.cc
@@ -19,7 +19,8 @@ limitations under the License.
namespace tensorflow {
namespace functor {
-DEFINE_BINARY6(bitwise_and, int8, int16, int32, int64, uint8, uint16);
+DEFINE_BINARY8(bitwise_and, int8, int16, int32, int64, uint8, uint16, uint32,
+ uint64);
} // namespace functor
} // namespace tensorflow