# InternalError: cuDNN execution failed: CUDNN_STATUS_EXECUTION_FAILED

- **ID:** `tensorflow/cudnn-status-execution-failed`
- **Domain:** tensorflow
- **Category:** gpu_error
- **Error Code:** `ECF`
- **Verification:** ai_generated
- **Fix Rate:** 75%

## Root Cause

cuDNN encountered an execution failure, typically due to incompatible tensor shapes or corrupted GPU state.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| tensorflow 2.10.0 | active | — | — |
| cudnn 8.4.1 | active | — | — |
| cuda 11.7 | active | — | — |

## Workarounds

1. **Reduce batch size to avoid memory pressure: model.fit(..., batch_size=16)** (80% success)
   ```
   Reduce batch size to avoid memory pressure: model.fit(..., batch_size=16)
   ```
2. **Set TF_GPU_ALLOCATOR=cuda_malloc_async to use async allocator: export TF_GPU_ALLOCATOR=cuda_malloc_async** (70% success)
   ```
   Set TF_GPU_ALLOCATOR=cuda_malloc_async to use async allocator: export TF_GPU_ALLOCATOR=cuda_malloc_async
   ```
3. **Clear GPU memory and reset: tf.keras.backend.clear_session()** (75% success)
   ```
   Clear GPU memory and reset: tf.keras.backend.clear_session()
   ```

## Dead Ends

- **** — Increases batch size thinking more data helps, but often makes shape mismatch worse. (60% fail)
- **** — Restarting kernel may fix transient state but doesn't address underlying shape issue. (30% fail)
