How to build for Windows


I installed PyTorch in my windows 8.1 machine, but I got a CUDA error saying my graphics card is too old.

Looking around, people’s advice was to build from source, but the only instructions I see are for Linux or OSX. I don’t know how to do it.

Can anyone help me?

I am not sure I can help you all the way, but did you check your graphics card, if it has CUDA performances and whether you had the most recent drivers for it? I think pytorch requires
NVIDIA CUDA 7.5 or above
NVIDIA cuDNN v6.x or above
Otherwise, maybe this might help you :

(I should warn that I am not using Windows myself so this is the extent of the help I might offer ^^’)

Yes, I can use CUDA with tensorflow, but I hate it and I wanted to use pytorch instead. All the required dependencies have been installed, and in fact I can run pytorch quite well. The problem is that my graphics card is not supported in the published binaries and I need to build from source to get support for my old GPU, but the only instructions on how to build from source are for linux and OSX and they fail in windows because of syntax.

You can refer to my repo for more information.

Hi, did you ever manage to compile it in windows with old GPU support?

Hi, I gave up and am using tensorflow now.

My GPU has CUDA compute capabilities of 5, and I wasn’t able to get it to work correctly with the Pytorch 0.4.x binaries on Anaconda, but I did manage to compile it in Windows. Here’s the raw footage of how I did it:

I used CUDA 9.0, MSVC 2017 14.11 (very important), and the scripts that peterjc123 created.

Note that in the video, I had to restart several times due to errors and I purposely left them in there in case you’ve also encountered them. There are no guarantees that these are the only errors you’ll encounter.