`tf.bitcast` throws assertion on `osx-64` and `osx-arm64` with `2.11.1`
@sumit0190,
Thank you for the issue. I tried to execute the mentioned code on MacOS M1 tensorflow v2.11 and tf-nightly and it was executed without any assertion error. Kindly find the screenshot for the reference and also the output for the code was also as expected. Thank you!

![image (6)](https://user-images.githubusercontent.com/81610181/234526786-97f7298f-e9af-4eeb-aaaf-a5196199431c.png)

![image (7)](https://user-images.githubusercontent.com/81610181/234530148-5108edff-b1b2-4b11-aa4a-4238b0adc53b.png)
 @tilakrayal Thanks for trying this out. This only happens on the binaries from `conda-forge` and `anaconda`, and when building from source. I assume the compiler or something else in our setup has something to do with it, but without any debugging information it's hard to understand what. Would you be able to provide us with some instructions on how we can debug this further? @sumit0190,
Could you please confirm whether you are following the metal plugin instructions for installing tensorflow? Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60369">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60369">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

No

### Source

source

### Tensorflow Version

TF 2.11

### Custom Code

No

### OS Platform and Distribution

`osx-64`, `osx-arm64`

### Mobile device

_No response_

### Python version

3.10.10

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

For some reason, with version `2.11` (and `2.11.1`) the `bitcast` function hits an assertion in `casts.h`, no matter what the input. This only happens on `osx-64` and `osx-arm64`, and that too only with this version - older versions work correctly.

I also tried installing this version from `conda-forge` and `anaconda`, and both have the same behavior. So in summary, regardless of whether you install this from source or from the common `conda` channels the behavior is the same.

This **does not happen** with the versions installed via `pip`.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

x = [1., 2., 3.]
tf.bitcast(x, tf.qint8)
```


### Relevant log output

```shell
Assertion failed: (f == nullptr || dynamic_cast<To>(f) != nullptr), function down_cast, file casts.h, line 58.
```
</details>