Skip to content

cuDNN Python frontend returns raw int handle and fails to build graph on fresh environment (CUDA 12.4, cuDNN 9.1.4) #175

@svaraikyam

Description

@svaraikyam

cudnn_log.txt

cudnn_conv2d_build.py

When creating a cuDNN handle using the Python frontend in a fresh conda environment, the returned handle is a raw integer rather than a proper Python handle object. This leads to graph build failures (plan is None) even though cuDNN and the frontend appear to be correctly installed and linked.

🧪 Steps to Reproduce

Create a clean conda env

conda create -n dnnenv python=3.11 -y
conda activate dnnenv

Install dependencies

pip install --upgrade pip
git clone https://github.com/NVIDIA/cudnn-frontend.git
cd cudnn-frontend
pip install --no-cache-dir --no-deps .

Run the test script
(e.g. cudnn_conv2d_build.py
attached)

python cudnn_conv2d_build.py

Observe the output:

[INFO] cudnn module path: /.../site-packages/cudnn/init.py
[INFO] Handle value: 105026403519184
[INFO] Handle type: <class 'int'>
[❌] ERROR: Got raw int handle — likely logging env set too late or frontend not initialized properly

[ERROR] Graph build failed — plan is None

🧰 Environment

GPU: NVIDIA GeForce RTX 3060

OS: Ubuntu 22.04 (x86-64)

Python: 3.11 (conda)

CUDA Toolkits installed: 12.2 and 12.4

cuDNN Backend: 9.1.4

cuDNN Frontend Python: 1.14.1 (built from source)

PyTorch: 2.5.1+cu121 (for compatibility check)

(dnnenv) avaish@avaish-dekstop:/media/avaish/aiwork/anaconda3/envs/dnnenv/lib/python3.11/site-packages/cudnn$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Feb_27_16:19:38_PST_2024
Cuda compilation tools, release 12.4, V12.4.99
Build cuda_12.4.r12.4/compiler.33961263_0

(dnnenv) avaish@avaish-dekstop:/media/avaish/aiwork/anaconda3/envs/dnnenv/lib/python3.11/site-packages/cudnn$ nvidia-smi
Fri Oct 10 19:16:35 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.163.01 Driver Version: 550.163.01 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3060 Off | 00000000:04:00.0 Off | N/A |
| 0% 50C P8 20W / 170W | 5MiB / 12288MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 4224 G /usr/bin/gnome-shell 2MiB |
+-----------------------------------------------------------------------------------------+
(dnnenv) avaish@avaish-dekstop:/media/avaish/aiwork/anaconda3/envs/dnnenv/lib/python3.11/site-packages/cudnn$

📝 Expected Behavior

cudnn.create_handle() should return a proper cudnn.FrontendHandle object, not a raw int.

Graph build should succeed when using a valid Conv2D graph.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions