Hello everyone, I’m BDFZ_2012_BrotherLu from Sumavision, Beijing, China.
Summary
cudnnConvolutionBackwardData (reached through ONNX Runtime’s CUDA EP ConvTranspose kernel) never returns for a specific 1D transposed convolution when batch is 2 or 8, while the same node with batch 1, 4 or 16 finishes in ~90 ms.
The GPU stays pinned at 100 % utilization with low power draw (~30–56 W) and one CPU core spinning; no error is reported, no timeout, no TDR — the call simply never completes.
Upgrading cuDNN from 9.14 / 9.18 / 9.19 / 9.20 to 9.21+ makes the identical model run in ~100 ms, so this looks like a cuDNN kernel-selection/implementation bug that was fixed in 9.21.
Environment
| OS | Windows 11 Pro 10.0.26200 |
| GPU | NVIDIA GeForce RTX 3060 Laptop GPU, 6144 MiB, compute capability 8.6 |
| Driver | 591.86 |
| CUDA runtime | 12.9 and 13.1 (both reproduce) |
| ONNX Runtime | 1.22.0 (CUDA 12) and 1.31.0 (CUDA 13) — both reproduce |
| cuDNN | 9.14.0.64 / 9.18.1.3 / 9.19.0.56 / 9.20.0.48 reproduce; 9.21.1.3 / 9.23.2.1 / 9.27.0.42 are fine |
Minimal reproduction
The failing node is the iSTFT synthesis node in an audio processing model, exported as:
input [8, 4098, 340] (float32)
weight [4098, 1, 4096]
ConvTranspose(stride=1024, group=1, pads=[0,0], dilations=[1], output_padding=[0])
output [8, 1, 351232]
Generate the model using gen_convtranspose_repro.py in zip file (2 MB of code, 64 MB of weights):
python gen_convtranspose_repro.py 2 4098 340 4096 1024 ct_b2.onnx
python gen_convtranspose_repro.py 8 4098 340 4096 1024 ct_b8.onnx
batch 1/4/16 variants are produced with the same script and do not hang.
Run it:
import onnxruntime as ort
so = ort.SessionOptions()
sess = ort.InferenceSession("ct_b8.onnx", so, providers=["CUDAExecutionProvider"])
x = np.zeros((8, 4098, 340), dtype=np.float32)
sess.run(None, {sess.get_inputs()[0].name: x}) # never returns on cuDNN 9.14–9.20
Version matrix (batch 2 / batch 8, same model, 25 s budget)
| cuDNN | batch 1 | batch 2 | batch 4 | batch 8 | batch 16 |
|---|---|---|---|---|---|
| 9.14.0.64 | ok 89 ms | hang | ok 94 ms | hang | ok 193 ms |
| 9.18.1.3 | ok | hang | — | hang | — |
| 9.19.0.56 | — | hang | — | hang | — |
| 9.20.0.48 | — | hang | — | hang | — |
| 9.21.1.3 | — | ok | — | ok | — |
| 9.23.2.1 | — | ok 274 ms | — | ok 143 ms | — |
| 9.27.0.42 | ok 268 ms | ok 103 ms | — | ok 134 ms | — |
Things that do not help
cudnn_conv_algo_search=EXHAUSTIVE/HEURISTIC/DEFAULTcudnn_conv_use_max_workspace= 0do_copy_in_default_stream= 0arena_extend_strategy=kNextPowerOfTwo/kSameAsRequestedgpu_mem_limitfrom 256 MB to 4 GB (the standalone node runs fine even with a 256 MB pool)- ONNX Runtime 1.22 (CUDA 12.9) and 1.31 (CUDA 13.1) — identical behaviour
- Batch 1 with the same weights is always fast, so it is not a “too big” / OOM problem
Impact / workaround
I was moving a project that runs the model through the ONNX Runtime CUDA EP to my old laptop when the bug occurred. Every audio segment hung at 0 % progress on this machine (a 16 GB card did not hit it, presumably because it allocated a different workspace and picked a different algorithm). Two workarounds work today:
- ship cuDNN ≥ 9.21 (what I did), or
- replace the node with
MatMul+ overlap-add (mathematically identical, max abs diff 9e-8)
Reporting this because a silent infinite hang inside a library call is hard to diagnose and easy to misattribute to the application (it looks exactly like “the model is just slow” / “the GPU is busy”).
gen_convtranspose_repro.zip (807 Bytes)
Acknowlegements
Special thanks to Ziyi, nicknamed Lulu, a girl in the same grade as me in primary school. We became schoolmates in 2005 when I was 12 years old, and in junior high school she was in the class next to mine.
About Me
BDFZ_2012_BrotherLu
BUPT Master degree in Computer Science
Working for Sumavision