cuDNN Benchmark Memory: Check PyTorch Convolution OOM
Investigate PyTorch convolution OOM with cuDNN benchmark enabled. Compare input shapes, peak memory and algorithm selection before changing the workload.
When torch.backends.cudnn.benchmark is enabled, PyTorch benchmarks convolution algorithms to select a fast implementation. If an OOM occurs around convolution warmup, compare the same input shapes and runtime with benchmarking enabled and disabled. The timing alone does not prove benchmark search caused the OOM.
- Root cause
- A controlled comparison is needed to distinguish convolution algorithm selection from model capacity, dynamic shapes and competing allocations. An enabled benchmark flag is not sufficient proof.
- Recommended fix
- Record the exact PyTorch, CUDA and cuDNN versions, input shapes, benchmark setting and first OOM traceback.
- How Denpex helps
- Denpex investigates cuDNN Benchmark Memory: Check PyTorch Convolution OOM using the evidence you provide or your connected workload collects. Earlier rank, host or application evidence is needed to distinguish an initiating failure from a downstream report.
What this failure is
cuDNN convolution benchmarking is algorithm selection for a workload configuration. It is distinct from the memory occupied by model weights, inputs, activations and other processes.
Is this what broke your run? Paste your log.
You're reading about cuDNN Benchmark Memory: Check PyTorch Convolution OOM. Paste your own traceback and relevant evidence for an investigation of your workload, with a next action or a specific missing fact. A reference entry does not establish your cause. No account or card for the free diagnosis. Review data handling before submitting sensitive logs.
Before uploading, review cloud data handling and local options.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
Why it happens (the mechanism)
Algorithm search and selected convolution implementations can have different memory requirements. Changing input shapes or concurrent allocations can also change the observation. Preserve the first OOM and compare controlled runs rather than assigning every memory failure to cuDNN.
What you'll observe
- cuDNN benchmark causes OOM
- cuDNN not using optimal algorithm
- cuDNN determinism warnings
Common symptoms and what they mean
Check possible explanations against the incident evidence. A matching symptom alone does not establish its cause.
| Symptom | Possible explanation |
|---|---|
| An OOM appears during convolution initialization or after a change in input shape. | A controlled comparison is needed to distinguish convolution algorithm selection from model capacity, dynamic shapes and competing allocations. An enabled benchmark flag is not sufficient proof. |
| Peak memory or timing differs between controlled benchmark settings. | A controlled comparison is needed to distinguish convolution algorithm selection from model capacity, dynamic shapes and competing allocations. An enabled benchmark flag is not sufficient proof. |
Which systems are affected
- Training with cuDNN benchmark for performance
- CNN training with cuDNN optimization
- Variable input size CNNs
How to confirm this is the problem
Use this checklist to test the hypothesis against a small reproduction. No single line proves the root cause, so preserve the preceding events and compare one variable at a time.
- ✓Keep model, input shapes, dtype and runtime versions fixed across the comparison.
- ✓Separate one-time warmup peaks from steady-state memory and repeated shape changes.
- ✓Verify output correctness and representative throughput after selecting a configuration.
Root cause
- A controlled comparison is needed to distinguish convolution algorithm selection from model capacity, dynamic shapes and competing allocations. An enabled benchmark flag is not sufficient proof.
The fix and how to prevent it
How to fix it
- Record the exact PyTorch, CUDA and cuDNN versions, input shapes, benchmark setting and first OOM traceback.
- In an isolated reproduction, compare the same representative workload with cudnn.benchmark enabled and disabled. Record peak allocated and reserved CUDA memory and other GPU process use.
- Choose the configuration based on measured memory, throughput and correct model outputs. Do not present disabling benchmarking as a universal fix.
How to prevent it
- Test representative input shapes as part of memory budgeting.
- Recheck algorithm-selection behavior after runtime or model changes.
Save this diagnosis and catch the next crash automatically
All root cause, fix, and prevention steps above are free to read. Create a free account with any email or GitHub to keep your saved diagnosis history across the encyclopedia and run cloud checks, or use a work email below for the 30-day Team evaluation. No card required.
Or start a 30-day free Team trial (work email)
Verified work email unlocks all 14 fleet diagnostic tools, Slack alerts, and team history for 30 days. No card and no automatic charge.
Diagnose your own log automatically
The root cause and fix steps above stay free. Create a free account to analyze full job logs, attribute the first failed rank, and keep saved incident history.
Sign up free. Analyze your cluster logsNo credit card. Daily allowance follows verified trust tier. Instant access.
Why the recommended fix works
A controlled comparison isolates whether algorithm selection contributes to the observed peak instead of masking unrelated memory use.
Diagnostic note
“No customer OOM reproduction or memory saving is claimed. benchmark_limit support and behavior depend on the cuDNN API path and PyTorch version.”
Diagnose this failure in VS Code
Select the traceback or open the failed terminal, then run Denpex locally to inspect matched failure patterns, supporting evidence and next checks without uploading the log. Verify recommendations against your workload before changing production.
Install the free VS Code extensionPyTorch GPU errors in context
PyTorch training errors commonly originate at tensor device placement, DataLoader /dev/shm IPC, or checkpoint state restoration.
Compare related pytorch gpu errorsRelated failures to investigate next
Frequently asked questions
Questions engineers and on-call staff commonly ask about this failure.
Does cudnn.benchmark=True always cause OOM?
Should I disable cuDNN benchmarking permanently?
Don't just read the fix, diagnose your run
The encyclopedia explains documented failure patterns. Denpex investigates your logs, configuration and stack, shows the supporting evidence, and asks for missing details when needed.