Running CUDA programs with wine

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
MicroHat
Newbie
Newbie
Posts: 1
Joined: Sat Aug 03, 2024 6:48 am

Running CUDA programs with wine

Post by MicroHat »

I've been trying to run an .exe which uses CUDA operations inside a docker container. The error I'm getting when trying to launch the program is CUDA driver version is insufficient for CUDA runtime version which seems the drivers aren't loaded. The arguments i'm using for running the docker container are --gpus all --runtime=nvidia

Has anyone experienced this and know how to fix this?

wine version (stable): wine-8.0.1

Operation system:

Code: Select all

root:~$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic
CUDA Version:

Code: Select all

root:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
root:~$ nvidia-smi
Sat Aug  3 12:58:35 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.52.04              Driver Version: 555.52.04      CUDA Version: 12.5     |
|-----------------------------------------+------------------------+----------------------+
| 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 3080 Ti     On  |   00000000:04:00.0 Off |                  N/A |
|  0%   48C    P8             31W /  200W |       2MiB /  12288MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

When trying to get the info through wine the commands aren't recognized. Is this normal behaviour or aren't the modules loaded?

Code: Select all

wine cmd.exe /C nvcc --version
0044:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0044:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0044:err:systray:initialize_systray Could not create tray window
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
Can't recognize 'nvcc --version' as an internal or external command, or batch script.
wine cmd.exe /C nvidia-smi
0048:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0048:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0048:err:systray:initialize_systray Could not create tray window
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
Can't recognize 'nvidia-smi' as an internal or external command, or batch script.
Running the .exe:

Code: Select all

0048:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0048:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
0048:err:systray:initialize_systray Could not create tray window
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0094:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
cudaSafeCall() failed at /GPU/GPUEngine.cu:283 : CUDA driver version is insufficient for CUDA runtime version
aschloegl
Level 2
Level 2
Posts: 13
Joined: Tue Mar 15, 2022 7:45 am

Re: Running CUDA programs with wine

Post by aschloegl »

cuda has been supported up to wine-staging 7.21, support for cuda was removed in wine-staging 7.22 [1].
In later versions of wine (since about 8.6), you can use cuda after installing Sveinar's nvidia-libs [2].
I'm not sure whether wine 8.0 will do, at the time of its release it was not working, but it might be fixed in nvidia-libs.


[1] https://appdb.winehq.org/objectManager. ... &iId=41199
[2] https://github.com/SveSop/nvidia-libs
Locked