Commit 48892001 authored by Yong Tang's avatar Yong Tang Committed by Sourabh Bajaj
Browse files

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: default avatarYong Tang <yong.tang.github@outlook.com>

* Add uint32 and uint64 support for bitwise_and

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Add uint32 and uint64 support for bitwise_or

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Add uint32 and uint64 support for bitwise_xor

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Register GPU functor for bitwise_and, bitwise_or, bitwise_xor

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Sanitize with clang-format -i --style=Google

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent 0fee74ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment