tf.linalg.pinv isn't 
Hi @chengdazhi ,

I tested the code with Tf2.12v and I can see the gradients returned by them are almost equal (with precision related differences of order `e-06` range). Also curious why the sample code snippet uses two gradient tapes as there are no second order gradients here. 

Anyways I have tested the code with both ways and results are same except some precision related differences of order 
**e-06** range. Please refer attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/2d8a7aa556651ef701814dce1e69a2de/61675_tf-linalg-inv_pinv.ipynb).

Could you please test with latest versions and let us know the results.

Thanks! Hi @SuryanarayanaY  Thanks for your speedy response. I handcrafted another matrix in [gist](https://colab.research.google.com/gist/chengdazhi/be84e8163d7c5adf810ddd3045d42faa/61675_tf-linalg-inv_pinv.ipynb), and it seems the gradient difference is still pretty large (order e-2).

![image](https://github.com/tensorflow/tensorflow/assets/10631563/e2a9c21f-b2e4-4cbf-99b3-a0b75f979437)


 @chengdazhi ,

Tested the updated code and found differences upto e-02 order. Attached [gist](https://colab.sandbox.google.com/gist/SuryanarayanaY/5a924806383ff8f32b0fbf40139bb0fc/61675_tf-linalg-inv_pinv-r1.ipynb) for reference. Will escalate to Dev team for their review. Thanks!
 I think that's still within expected numerical precision.  The entries where you see the large "error" are near (or exactly) zero in your inverse, which makes them particularly sensitive to small numerical perturbations.  The pseudo inverse needs to do a lot more computation, since it does an SVD, which means small floating-point errors accumulate more. @cantonios  I don't think so. The se3_mat I created is actually pretty well-conditioned. Btw same code seems legit in pytorch.
See the [gist](https://colab.research.google.com/gist/chengdazhi/be84e8163d7c5adf810ddd3045d42faa/61675_tf-linalg-inv_pinv.ipynb#scrollTo=Y-MT7i-T1DxX). I feel there's a bug somewhere.
![image](https://github.com/tensorflow/tensorflow/assets/10631563/0c84d89d-ac34-4c17-b954-34157fe3055c)




### Issue type

Bug

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

No

### Source

binary

### TensorFlow version

2.6.22

### Custom code

No

### OS platform and distribution

Ubuntu 20.04

### 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?

Pinv should give similar gradient to inv. Here's the code snippet and result.
![image](https://github.com/tensorflow/tensorflow/assets/10631563/de9cdb82-1c93-4a18-a79e-95c0b0834ae6)


![image](https://github.com/tensorflow/tensorflow/assets/10631563/cfdadbb9-5506-4181-a868-69830c5ee96b)


### Standalone code to reproduce the issue

```shell
See figures in behavior section.
```


### Relevant log output

_No response_