Support for DT_INT64 in Reciprocal and ReciprocalGrad Operations
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this [failed invocation](https://github.com/tensorflow/tensorflow/pull/64255/checks?check_run_id=22965236711) of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request. Hi @hvaria Can you please sign CLA. Thank you! I signed, Maybe it takes time to update

 Hi @hvaria Can you please check @cantonios's [comments](https://github.com/tensorflow/tensorflow/pull/64255#pullrequestreview-2025512767) and keep us posted ? Thank you! Sorry For delay, directory is deleted Reciprocal also doesn't make sense for any integer types- the result will always be zero (except if the input is 1).  What is the use-case? I added int64 support to the Reciprocal operation to make TensorFlow more consistent in how it handles different data types. This change helps prevent errors and simplifies processing when working with integers and floating-point numbers together. > I added int64 support to the Reciprocal operation to make TensorFlow more consistent in how it handles different data types. This change helps prevent errors and simplifies processing when working with integers and floating-point numbers together.

Except it doesn't really help at all, since the reciprocal op only makes sense for floating-point types.  There's never a case where you would instead replace a float with an int in this case. Thanks for your input. You're absolutely right that the reciprocal operation makes the most sense for floating-point types due to their non-integer results. The idea behind adding int64 support isn’t to replace floating-point operations with integers but rather to ensure TensorFlow can handle any data type consistently. This helps prevent errors and keeps the door open for any future functionalities that might need this capability, even if it’s a rare case. >  This helps prevent errors and keeps the door open for any future functionalities that might need this capability, even if it’s a rare case.

No, you can't just swap types likes this and expect it to work.  The ops have meanings, and some ops will only work with some times.  Closing this without a valid use-case.


This pull request introduces support for the DT_INT64 data type in the Reciprocal and ReciprocalGrad operations within TensorFlow. Previously, these operations did not support DT_INT64, which could lead to NotFoundError exceptions when attempting to use these operations with tensors of type int64. This limitation could affect a range of computational graphs where int64 tensors are used, especially in scenarios requiring reciprocal transformations of integer-based tensors.

Problem: #64224
The Reciprocal operation was found to be unsupported for DT_INT64 tensors, resulting in a NotFoundError when attempting to execute this operation on an int64 tensor.

Solution:
The proposed solution involves modifying the kernel registration in cwise_op_reciprocal.cc to include DT_INT64 for both the Reciprocal and ReciprocalGrad operations. By adding support for DT_INT64, TensorFlow can handle reciprocal operations on int64 tensors without throwing a NotFoundError, thus extending the operation's applicability and enhancing usability for a broader range of applications. The proposed solution involves modifying the kernel registration in cwise_op_reciprocal.cc to include DT_INT64 for both the Reciprocal and ReciprocalGrad operations. By adding support for DT_INT64, TensorFlow can handle reciprocal operations on int64 tensors without throwing a NotFoundError, thus extending the operation's applicability and enhancing usability for a broader range of applications. Changes Made Updated the registration of Reciprocal and ReciprocalGrad operations to include DT_INT64 for both CPU and GPU implementations.