Check fail in `tf.raw_ops.MaxPoolGradWithArgmax`
@LongZE666,
Thank you for reporting the issue. I was able to reproduce the issue on tensorflow v2.15, v2.16 and tf-nightly. Kindly find the gist of it [here](https://colab.sandbox.google.com/gist/tilakrayal/e4624af1befe303c784951661e836fdd/untitled1879.ipynb) and the screenshot of the check fail for the reference.


![image](https://github.com/tensorflow/tensorflow/assets/81610181/27c7c85f-fd61-48cf-aae2-48154485bf64)

### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf 2.16.1

### Custom code

Yes

### OS platform and distribution

Ubuntu 20.04

### Mobile device

_No response_

### Python version

3.11

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

When argmax is set to a maximum value， `tf.raw_ops.MaxPoolGradWithArgmax` encounters "Aborted (core dumped)".

### Standalone code to reproduce the issue

```shell
import tensorflow as tf

ksize = [1, 1, 1, 1]
strides = [1, 1, 1, 1]
padding = "VALID"
include_batch_in_index = False
input = tf.constant(1, shape=[1,1,1,1], dtype=tf.float32)
grad = tf.constant(1, shape=[1,1,1,1], dtype=tf.float32)
argmax = tf.constant(1250999896764, shape=[1,1,1,1], dtype=tf.int64)
tf.raw_ops.MaxPoolGradWithArgmax(input=input, grad=grad, argmax=argmax, ksize=ksize, strides=strides, padding=padding, include_batch_in_index=include_batch_in_index)
```


### Relevant log output

```shell
2024-05-01 03:42:17.994627: F tensorflow/core/kernels/maxpooling_op.cc:1081] Check failed: grad_out_index >= output_start && grad_out_index < output_end Invalid output gradient index: 1250999896764, 0, 1
Aborted (core dumped)
```
