A check fail can be triggered in UnicodeDecodeWithOffsets
Hi @shijy16, thank you for reporting the issue!
I was able to replicate the issue using tf-nightly(2.13.0-dev20230406). Please find the screenshot below.
![image](https://user-images.githubusercontent.com/98147397/231736730-a6520439-4f32-430e-abcc-e3c224f1da8b.png)
 Thank you! @shijy16,
Tsplits has to be one of the dtype from tf.dtypes.

`Tsplits | An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int64.`

I tried to execute the mentioned code on tf-nightly with alternative work-around and it was executed without any fail or error. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/4a38cf2173412697737e43c6140000cb/untitled1679.ipynb). 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/60273">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/60273">No</a>

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

Bug

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

Yes

### Source

binary

### Tensorflow Version

2.13.0-dev20230406

### Custom Code

No

### OS Platform and Distribution

Linux Ubuntu 20.04

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

CUDA 11.8

### GPU model and memory

_No response_

### Current Behaviour?

```shell
The following code can trigger a crash in `tf.raw_ops.UnicodeDecodeWithOffsets` due to check-fail in the latest version of TensorFlow.
```


### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import numpy as np
with tf.device("GPU:0"):
    input_encoding = "l9"
    errors = "strict"
    replacement_char = 965
    replace_control_characters = True
    Tsplits = tf.int32
    input = tf.strings.unicode_encode(np.random.randint(0, 128, size=[2, 15, 16, 1, 6, 18], dtype=np.int32), output_encoding='UTF-8')
    res = tf.raw_ops.UnicodeDecodeWithOffsets(
        input_encoding=input_encoding,
        errors=errors,
        replacement_char=replacement_char,
        replace_control_characters=replace_control_characters,
        Tsplits=Tsplits,
        input=input,
    )
```


### Relevant log output

```shell
2023-04-09 13:47:10.094296: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2023-04-09 13:47:10.141240: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-04-09 13:47:10.947591: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2023-04-09 13:47:12.490727: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 14561 MB memory:  -> device: 0, name: Tesla V100-PCIE-16GB, pci bus id: 0000:2f:00.0, compute capability: 7.0
2023-04-09 13:47:12.779782: F tensorflow/core/framework/tensor.cc:770] Check failed: dtype() == expected_dtype (9 vs. 3) int32 expected, got int64
Aborted (core dumped)
```
</details>