CUDA fails to load
Open
Nobody has claimed this yet.
GPU
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
Windows Version
10.0.26200.8037
WSL Version
2.6.3.0, 2.7.0.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
6.6.87.2-1, 6.6.114.1-1
Distro Version
Ubuntu 24.04
Other Software
CUDA 12 as loaded by TensorFlow.
NVIDIA Studio Driver 595.79.
Repro Steps
$ python3 -m venv /tmp/repro/
$ . /tmp/repro/bin/activate
$ pip install 'tensorflow[and-cuda]'
$ LD_DEBUG=libs python3 -c 'import tensorflow as tf; print(tf.config.list_physical_devices("GPU"))' 2> ld_debug.log
Expected Behavior
TensorFlow detects the NVIDIA GPU.
Actual Behavior
It does not, presumably because of these errors:
320: calling init: /usr/lib/wsl/drivers/nv_dispsi.inf_amd64_fe1c50c690e00e9a/libcuda.so.1.1
320:
320: /usr/lib/wsl/drivers/nv_dispsi.inf_amd64_fe1c50c690e00e9a/libcuda.so.1.1: error: symbol lookup error: undefined symbol: cuPvtCompilePtx (fatal)
320: /usr/lib/wsl/drivers/nv_dispsi.inf_amd64_fe1c50c690e00e9a/libcuda.so.1.1: error: symbol lookup error: undefined symbol: cuPvtBinaryFree (fatal)
320:
320: calling init: /usr/lib/wsl/drivers/nv_dispsi.inf_amd64_fe1c50c690e00e9a/libnvdxgdmal.so.1
320:
320: /usr/lib/wsl/lib/libdxcore.so: error: symbol lookup error: undefined symbol: D3DKMTOpenSyncObjectFromNtHandle (fatal)
320: /usr/lib/wsl/lib/libdxcore.so: error: symbol lookup error: undefined symbol: D3DKMTAcquireKeyedMutex (fatal)
320: /usr/lib/wsl/lib/libdxcore.so: error: symbol lookup error: undefined symbol: D3DKMTReleaseKeyedMutex (fatal)
320: /usr/lib/wsl/lib/libdxcore.so: error: symbol lookup error: undefined symbol: D3DKMTOpenKeyedMutex (fatal)
320: /usr/lib/wsl/lib/libdxcore.so: error: symbol lookup error: undefined symbol: D3DKMTRegisterTrimNotification (fatal)
320: /usr/lib/wsl/lib/libdxcore.so: error: symbol lookup error: undefined symbol: D3DKMTUnregisterTrimNotification (fatal)
320: /usr/lib/wsl/lib/libdxcore.so: error: symbol lookup error: undefined symbol: D3DKMTCreateNativeFence (fatal)
320: /usr/lib/wsl/lib/libdxcore.so: error: symbol lookup error: undefined symbol: D3DKMTOpenNativeFenceFromNtHandle (fatal)
Diagnostic Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the listed Python virtual-environment and TensorFlow installation commands, then inspect ld_debug.log and the attached WslLogs archive. Focus on the reported CUDA and libdxcore undefined-symbol errors and compare behavior across the listed WSL, kernel, driver, and Ubuntu versions. Done means TensorFlow detects the NVIDIA GPU without those loader errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100