in WSL not searched upon /usr/lib/wsl/lib

I know this is probably a confusing title for a post. Let me explain:

I acquired recently a new laptop with a 3060 RTX GPU. The machine is currently able to run CUDA applications from within Windows Subsystem for Linux with no problems so far.

I created an app that would, in addition to CUDA, use OptiX (7.5) to run a kernel in the RTX cores of the machine. I can confirm 100% that the app works fine in a remote server environment, using Ubuntu 18.04. But, the app won’t work in the laptop due to OPTIX_ERROR_LIBRARY_NOT_FOUND when invoking optixInit().

I checked, and found out that and are currently present in the /usr/lib/wsl/lib directory, along with

As a matter of fact, I ran the app through strace, and found that is searched in many, many directories, before finally settling for /usr/lib/wsl/lib/ . HOWEVER, the same cannot be said of, or the loader - the logs tell me the loader is never searched upon, and looking for is tried through the same directories as except for the /usr/lib/wsl/lib directory. It is as if the OptiX API was intentionally skipping that particular directory.

Am I missing something here? Should I be somehow telling OptiX to do a search at the full library path to find Or is there something I misconfigured in my app?

(And, no, I haven’t attempted yet to create a symlink to the library - I don’t get why is found, but isn’t…)

Any help you could provide will be highly appreciated!

Hi @heriberto.delgado,

OptiX is not currently expected to run via WSL, the WSL driver does not yet contain everything necessary. We are actively working on a mechanism for enabling OptiX in the WSL driver, but unfortunately it’s probably not going to happen very quickly. Sorry for the inconvenience (we want to use OptiX in WSL internally as well.) In the mean time, the way to use OptiX on Windows is to build a native Windows app and use the native (non-WSL) Windows driver.