Check failed in `tf.raw_ops.ConjugateTranspose`
Hi @Lyutoon ,

I have tried to replicate the reported behaviour with tf-nightly(2.14.0-dev20230601) in colab but I have observed that there is no check fail in both cases with or without jit_compile.I executed the code multiple times also and observed no error or check fail.

Please refer the attached [gist](https://colab.research.google.com/gist/SuryanarayanaY/791c7c8270a7e9f92ef0bd0ccec401ef/60755.ipynb) and confirm any deviation.

Thanks! 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/60755">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/60755">No</a>

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

Bug

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

Yes

### Source

source

### Tensorflow Version

2.14.0

### Custom Code

Yes

### OS Platform and Distribution

Ubuntu 20.04

### Mobile device

Ubuntu 20.04

### Python version

3.8.10

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

A check fail can be triggered in `tf.raw_ops.ConjugateTranspose`. While under jit compile, it won't occur. There is an inconsistency problem between jit and normal mode.

### Standalone code to reproduce the issue

```shell
import os 
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
import numpy as np

x=tf.random.uniform([], dtype=tf.dtypes.float32, maxval=100000000)
perm=tf.random.uniform([0], dtype=tf.dtypes.int64, minval=-100000000, maxval=1000000000)

@tf.function(jit_compile=True)
def fuzz_jit():
    y = tf.raw_ops.ConjugateTranspose(x=x, perm=perm)
    return y

def fuzz_normal():
    y = tf.raw_ops.ConjugateTranspose(x=x, perm=perm)
    return y

y1 = fuzz_jit()
print('[+] JIT ok') # Under jit compile, it passed the testcase normally.
y2 = fuzz_normal()  # Check fail.
print('[+] Normal ok')  # Won't be printed.
```


### Relevant log output

```shell
% python test.py 
[+] JIT ok
2023-06-02 11:01:06.844753: F ./tensorflow/core/util/mkl_util.h:1273] Check failed: dims_tf_order.size() > 0 (0 vs. 0)
zsh: abort (core dumped)  python test.py
```
</details>