DEV Community

Discussion on: How to install CUDA on WSL2

Collapse
 
smjburton profile image
Scott

Have you tested performance against running CUDA in native Linux? If so, do you notice any slowdown running CUDA in WSL in comparison?

Collapse
 
gabriellavoura profile image
Gabriel Lavoura

Hi Scott, thanks for your questions.

I haven't personally run any benchmarks or performance tests, but in my experience, it works well. I came across some research from a few years ago suggesting that WSL2 (being virtualized) achieves CUDA performance comparable to native Linux, with differences within 1% in certain benchmarks. However, other research indicate that native Linux can be up to 33% faster in specific scenarios. I’d say this depends on the library implementation, as PyTorch, for example, has some performance issues. That said, for daily work, I haven't noticed any significant issues.

References:
Developer Nvidia blog
Hacker News discussion
Video Games AI

Collapse
 
smjburton profile image
Scott

That's cool - I may have to check this out. Thanks!