tf.linalg.eigvals outputs UnboundLocalError when receiving a float16 tensor
@drewshark you are correct it accepts tf.float32, tf.complex64, tf.float64, tf.complex128 and doesn't accept tf.float64

```python
if tensor.dtype == dtypes.float32 or tensor.dtype == dtypes.complex64:
    out_dtype = dtypes.complex64
elif tensor.dtype == dtypes.float64 or tensor.dtype == dtypes.complex128:
    out_dtype = dtypes.complex128
e, _ = gen_linalg_ops.eig(tensor, Tout=out_dtype, compute_v=False, name=name)
return e
```
 Can I take a shot at this issue? hey @sahusiddharth can I try to solve this one @sachinprasadhs I was able to replicate the issue reported here. Please find the attached [gist](https://colab.research.google.com/gist/sushreebarsa/75e17bf472b2ebfbccb4fa4f6a48feef/61827.ipynb).
Thank you!
### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

2.13.0

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

Given a float16 tensor, tf.linalg.eigvals outputs `UnboundLocalError: local variable 'out_dtype' referenced before assignment`. If tf.linalg.eigvals does not accept float16 tensor, it would be better if it can be explicit in the documentation and the error message can point this issue out.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
tensor = tf.constant([[1,2],[3,4]], dtype=tf.float16)
tf_out = tf.linalg.eigvals(tf.constant(tensor))
print("TensorFlow's result: ",tf_out)
```


### Relevant log output

```shell
---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-69-5a0470cb5082> in <cell line: 3>()
      1 import tensorflow as tf
      2 tensor = tf.constant([[1,2],[3,4]], dtype=tf.float16)
----> 3 tf_out = tf.linalg.eigvals(tf.constant(tensor))
      4 print("TensorFlow's result: ",tf_out)

1 frames
/usr/local/lib/python3.10/dist-packages/tensorflow/python/ops/linalg_ops.py in eigvals(tensor, name)
    431   elif tensor.dtype == dtypes.float64 or tensor.dtype == dtypes.complex128:
    432     out_dtype = dtypes.complex128
--> 433   e, _ = gen_linalg_ops.eig(tensor, Tout=out_dtype, compute_v=False, name=name)
    434   return e
    435 

UnboundLocalError: local variable 'out_dtype' referenced before assignment
```
