I'm trying to set up a local development environment on Windows 11 with an RTX 3090. Every time I try to run a script, it fails because DeepSpeed tries to compile C++ extensions and fails with an 'Op Builder' error. Is Windows officially supported, or am I forced to use WSL2 for any serious deep learning development with these optimization libraries?
3 answers
To be blunt, DeepSpeed is primarily designed for Linux environments. While there is experimental support for Windows, the "Op Builder" relies on a Linux-like build environment (like ninja and gcc) and specific CUDA paths that often break on native Windows. The best solution is to use WSL2 (Windows Subsystem for Linux) with the Ubuntu distribution. In WSL2, you can install the Linux version of CUDA and DeepSpeed will compile its extensions without any issues. It also offers much better performance for file I/O, which is critical during large model training.
If I use WSL2, will I lose access to my GPU's full performance compared to a native Windows installation?
I spent three days trying to make it work on native Windows before giving up. Switched to Docker/WSL2 and had it running in 15 minutes.
Amy's experience is the "canon event" for every AI dev. Don't fight the tooling; just embrace the Linux environment for anything involving complex CUDA kernels.
Not at all, Justin. NVIDIA has done a fantastic job with the WSL2 drivers. The overhead is negligible—usually less than 1-2%. In fact, because the Linux memory management is better for deep learning, you might actually find that DeepSpeed runs more stably in WSL2 than it ever would have on native Windows. It's the standard way most AI researchers work nowadays.