Commit 513f7df4 authored by Yong Tang's avatar Yong Tang Committed by Vijay Vasudevan
Browse files

Add `int64` out_idx` support for `listdiff`/`list_diff`/`setdiff1d` (#13839)



* Add `int64` out_idx` support for `listdiff`/`list_diff`/`setdiff1d`

This fix tries to add `int64` `out_idx` support for `listdiff`/`list_diff`/`setdiff1d`.
As was specified in docs (`tf.setdiff1d.__doc__`), it is possible to specify
`tf.int32` or `tf.int64` for the type of the output idx. However,
the `tf.int64` kernel has not been registered. As a consequence,
an error will be thrown out if `tf.int64` is used.

This fix adds `int64` out_idx` support for `listdiff`/`list_diff`/`setdiff1d`

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

* Add template for signature matching of ListDiff kernel.

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

* Add test cases for `int64` out_idx support for `tf.listdiff`/`setdiff1d`

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

* Add test case for int32 (missed in the last commit)

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