A check fail can be triggered in tf.raw_ops.StatefulPartitionedCall
@vwrewsge,
Could you please confirm whether this check fail is happening with the specific input provided or for every input you are passing? When I tried with the another input it was executed without check fail. Thank you! This check fail is happening for every input. This seems to be a lack of check on `Tout`.  If I set `Tout ` to `[tf.int32]`, there shouldn't be any issues.
### Issue type

Bug

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

Yes

### Source

binary

### TensorFlow version

tf 2.15

### Custom code

Yes

### OS platform and distribution

Ubuntu 20.04

### Mobile device

_No response_

### Python version

3.9

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

In the latest version of TensorFlow, the following code can trigger a crash in `tf.raw_ops.StatefulPartitionedCall` due to check-fail.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

input_data = tf.constant([[1, 2, 3], [4, 5, 6]])

@tf.function
def my_function(inputs):
    return tf.reduce_sum(inputs, axis=1)

callable_function = tf.function(my_function).get_concrete_function(tf.TensorSpec(shape=None, dtype=tf.int32))

output = tf.raw_ops.StatefulPartitionedCall(args=[input_data], Tout=None, f=callable_function)

print(output)
```


### Relevant log output

```shell
2024-03-14 15:58:52.804195: F tensorflow/core/framework/op_kernel.cc:989] Check failed: index < outputs_.size() (0 vs. 0)
Aborted (core dumped)
```
