Abort when running tensorflow.python.ops.nn_ops.pool
@dmc1778,

I was able to reproduce the issue on colab using TF v2.12, [2.13](https://colab.research.google.com/gist/tilakrayal/cea566242dc6e54e16a8b96961563219/untitled1321.ipynb), tf-nightly. Please find the attached [gist](https://colab.research.google.com/gist/tilakrayal/7fa1d3c4dd277a3b435064430d5fbe7e/untitled1320.ipynb). 

Since Segmentation faults can be considered as potential security vulnerabilities please read [SECURITY.md](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) and report them through proper channel as mentioned in SECURITY.md. If you want to stick to a specific version then please follow [this](https://github.com/tensorflow/tensorflow/blob/master/README.md#patching-guidelines) and create your own patch to resolve such issues.

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/61579">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/61579">No</a>
 @tilakrayal 
I am not sure if the issue is reproducible is it Ok to close it here without confirming whether its resolved or ignored. Whether can you confirm whether this needs to be fixed or not ? Can we expect this fixed in up-coming versions?
### Issue type

Bug

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

No

### Source

binary

### TensorFlow version

2.13.0

### Custom code

Yes

### OS platform and distribution

22.04

### Mobile device

_No response_

### Python version

3.9

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

nvidia-cudnn-cu11==8.6.0.163, cudatoolkit=11.8.0

### GPU model and memory

_No response_

### Current behavior?

Due to Large list element

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import os
import numpy as np
from tensorflow.python.ops import nn_ops
try:
  input_tensor = tf.constant(-8968073515812833920, shape=[2, 9, 10, 2], dtype=tf.float32,)
  input = tf.identity(input_tensor)
  window_shape_0 = 1e+38
  window_shape_1 = 536870912
  window_shape = [window_shape_0,window_shape_1,]
  padding = "SAME"
  pooling_type = "MAX"
  dilation_rate_0 = 1
  dilation_rate_1 = 1
  dilation_rate = [dilation_rate_0,dilation_rate_1,]
  strides_0 = 1
  strides_1 = 1
  strides = [strides_0,strides_1,]
  out = nn_ops.pool(input=input,window_shape=window_shape,padding=padding,pooling_type=pooling_type,dilation_rate=dilation_rate,strides=strides,)
except Exception as e:
  print("Error:"+str(e))
```
```


### Relevant log output

```shell
2023-08-14 22:03:21.255791: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-14 22:03:21.273228: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-14 22:03:21.273370: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-14 22:03:21.273661: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-08-14 22:03:21.274910: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-14 22:03:21.275021: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-14 22:03:21.275124: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-14 22:03:21.328191: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-14 22:03:21.328333: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-14 22:03:21.328435: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:980] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-08-14 22:03:21.328519: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1616] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 4361 MB memory:  -> device: 0, name: NVIDIA GeForce GTX 1660 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5
2023-08-14 22:03:21.392635: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384] Loaded cuDNN version 8600
2023-08-14 22:03:21.392690: F tensorflow/stream_executor/cuda/cuda_dnn.cc:886] Check failed: cudnnSetPoolingNdDescriptor( handle_.get(), (pooling_descriptor.mode() == dnn::PoolingMode::kMaximum ? cudnn_max_pooling_mode : CUDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING), propagate_nans ? CUDNN_PROPAGATE_NAN : CUDNN_NOT_PROPAGATE_NAN, nd, shape.data(), padding.data(), strides.data()) == CUDNN_STATUS_SUCCESS (3 vs. 0)
Aborted

```
```
