-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request]: Add CUDA support #3301
Comments
I recommend you to get some definitely working steps to reproduce a working CUDA environment in Wine first, and then create something akin to how dxvk and latencyflex and vkd3d ship their DLLs that Bottles can pull from in order to set things up appropriately. Alternatively, or also, get OpenCL working by way of rusticl, that way Davinci would work on AMD and Intel, plus NVK, as well. |
Ok I got CUDA running on Bottles. Method: Workaround for Resolve: Installing CUDA: I had to install the CUDA-toolkit from nvidia and verify that cuda is installed on my PopOs machine. I needed to install ffshow dependency for windows codecs. Then it was detected by Davinci Resolve. Result:
Thoughts:
Note: When I choose openCL the playback in PopOs, it does not work. I am not sure if this is related to my GPU as I have never tried running davinci over OpenCL in my Windows machine. So it could be running out of the box and maybe missing. |
Hi, I also need this.. I can confirm that the cuda library from github it works fine for most of what I need (on a standard wine installation), but I haven't try to run davinci on wine .. |
Hi obreo , can You please tell witch file You copied and exactly where? I'm trying to use the "release" version of https://github.com/SveSop/nvidia-libs , since on Debian and Clearlinux it won't compile . Installing it using the regular setup_nvlibs.sh on the real wineprefix works fine, but I would be happy to stay away from multiarch etc and simply having it work on bottles ... The script itself requires a real wine installation to work, but all is doing from my modest understanding is symlinking the dll to the wine/c/windows/system32 directory .. |
Hi, I downloaded the file in https://github.com/SveSop/nvidia-lib from release, but choose the Inside that directory you will add the dll files inside the lib and lib64 to the relative folders in the cafe runner path, similarly for the .so . Make sure that you put the right files in the right architecture folder for x86_64 and i386 architectures. After that, open winecfg from the bottle you created in bottles, from library tab, you should find the nvcuda.dll file, add it along with the rest of dll files you are copied above. Finally, add the nvcuda.dll file inside the System32 directory in the c/windows/system32/ path |
Thank You! unfortunately it still don't wanna work..I followed what you said step by step. Could it be cause I'm using an amd apu as display card, and a discrete 3060 not connected to any monitor? or because i'm using a flatpak version of bottles? |
Just a quick chime in to this, as i tested it using bottles and creating a bottle and running some cuda samples. The "tricky" part is that for wine-9 and late wine-8 versions of wine, it is no longer possible to use the "fake" .dll's that is produced from the nvidia-libs archive. This is mainly due to how newer versions of wine load libraries that "talk to" native linux libs, and tbh i have not started that work yet. However, using the dll.so file AS a .dll (basically renaming nvcuda.dll.so -> nvcuda.dll still works and loads.. for now). Not really familiar with using bottles and creating scripts that could be used for the GUI in a similar manner as DXVK and so on, but it might be just as good an idea as any if that would be interesting. I actually have nvcuda as a separate repo where i do the development and then just import this to nvidia-libs. So if some sort of "NVCUDA" toggle thing would be of use for the bottles GUI, i could provide "release" type of binaries on the nvcuda repo for you to download? https://github.com/SveSop/nvcuda/tree/devel EDIT: |
Hi there. I've actually been using nvidia-libs in Bottles for a long time, because Bottles is how I run Daz Studio. The Iray renderer is pretty much a requirement for Daz Studio, and Iray requires CUDA. It currently takes a little bit of manual finagling due to the fact that the installer script wants to create a symlink to the library's actual location, so I'll outline the steps I take. First, I create a folder: Now, if you want to use the installer script, it's tricky because you have to make the right set of components intersect:
So here's the commands I run and the terminal output:
I don't go through the process of enabling NVML because Iray doesn't need it. But after that's done, I can start Daz Studio and use GPU-accelerated Iray. It's just as fast as native Linux Iray Server. CUDA-Z works too, for a much more accessible way to test the setup. Contrary to what @SveSop says--and I'm not sure why, because they would certainly know better than me--the distribution as-is works just fine with all Caffe versions from 7.2 through 9.2. But Caffe might be special in some crucial ways I'm not aware of. I actually can't run Daz Studio with any other branch, come to think of it, because it complains that it's being run as administrator. It would definitely be better to have nvidia-libs integrated into Bottles itself if possible, because running the installer script is very clunky. But it's probably not actually necessary exactly as I'm doing it. It doesn't seem like the installer script does anything particularly magical; it makes the DLL files available in the prefix, and then sets up DLL overrides in the registry for each one. I don't really care about the DLL files being symlinks, because I don't want them to update without me explicitly doing so anyways. So I could probably just copy them and set up the DLL overrides manually. |
I am not horribly well at explaining myself.. Atm nvlibs is built with "fake" dll's in the It just MAY seem "not correct" for some to think they need to symlink a linux .so library like that, and that was kind of what i was hinting at. It works just fine like it is, it just could possibly be a bit misleading, especially when comparing it to DXVK/VKD3D that is built as native PE libs. I understand it sounded somewhat more serious than i intended 😄 |
Tell us the problem or your need
I'm trying to install Davinci resolve using bottles' Caffe 9.2 runner, The software is running and recognizing the Nvidia driver, however, it is recognizing OpenCL but showing 'failed to initialize OpenCL' error in the logs. I'm trying to add Cuda to the option so davinci would pick it up instead of openCL (the davinci settings show only the OpenCL available).
Based on my search, it seems Winehq supports CUDA for wine-staging only. But it looks like they removed the nvcuda.dll and cuda library in the recent winehq builds, as I cant find it in the library
https://wiki.winehq.org/Wine-Staging_CUDA
So I'm trying to add that to wine installed on Bottles runner, but with no luck as I'm unable to locate the configuration path exactly.
Here is the cuda library supported for wine:
https://github.com/SveSop/nvidia-libs
I hope you add this library as a feature so it can be either chosen from the dependencies or the winecfg.
Based on my debugging experience with davinci resolve, the only runner was able to make it work with nvidia is Cafe 9.2 version. I believe if Davinci was able to pick the CUDA support from wine then it will work - as the software is functioning but playback is not. Running Davinci resolve on wine can help users use h.264 and h.265 support on linux, this is why i am working on this fix. It looks promising.
I'd love to collaborate.
Thanks
Describe the solution you'd like
CUDA support is missing, it is a library that can be added to wine-staging.
Other solutions?
No response
Additional context and references
https://wiki.winehq.org/Wine-Staging_CUDA
Here is the cuda library supported for wine:
https://github.com/SveSop/nvidia-libs
The text was updated successfully, but these errors were encountered: