### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

tf2.17

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

Version
TensorFlow Version: 2.x (with oneDNN optimization)
CUDA Environment: GPU-enabled system
Total GPU Memory: 11.5 GB (11539054592 bytes)
Python Version: 3.x
Current Behavior
Error Description
The application crashes during CUDA device context initialization when calling tf.signal.rfft2dwith a name parameter containing special characters (;touch tf.signal.rfft2d_Qrfft2d.txt). The failure occurs before any FFT computation, during the GPU context acquisition phase.
Error Log tf-2.10
2025-11-21 11:06:45.363931: F tensorflow/core/platform/statusor.cc:33] Attempting to fetch value instead of handling error INTERNAL: failed initializing StreamExecutor for CUDA device ordinal 0: INTERNAL: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 11539054592
Aborted (core dumped)
### tf2.17
RuntimeError: Bad StatusOr access: INTERNAL: failed initializing StreamExecutor for CUDA device ordinal 0: INTERNAL: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 51041271808

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
input_data = tf.random.uniform(shape=[10, 10], minval=0, maxval=1, dtype=tf
    .float32)
fft_length = tf.constant([10, 10], dtype=tf.int32)
result = tf.signal.rfft2d(input_tensor=input_data, fft_length=fft_length,
    name='txt')
```

### Relevant log output

```shell

```