Windows setup with CUDA for real

I saw your tweet @jeremy

But bcolz was failing to install and compile
At home I have Ubuntu but in my office I only have Windows PCs.
Do you have a script to follow?

1 Like

I just typed conda install bcolz

:face_with_raised_eyebrow::thinking:

@gerardo I could feel your pain. I had problems to install bcolz before (see discussion below/ Personal DL box).

Eventually, I did the following together with conda env update and conda update --all (but which was not recommended) every time I retried. Hope this help. :crossed_fingers: :crossed_fingers:

Did you guys have to install and configure anything else for pytorch to utilize the GPU on Windows?

I installed the CUDA SDK, although I’m not sure it’s necessary. I also installed cudnn, which I think is important for good performance.

1 Like

Are there instructions available for doing this on Windows?

I’m looking at blogs that have you install Visual Studio first, etc… Just wondering how painful this is :slight_smile:

I don’t think you need Visual Studio. Try installing it without installing anything else and see if it works!

have you tried using the windows 10 linux subsystem?is there any reason for using the cmd more than the fact that its a windows box?

WSL doesn’t work with CUDA

2 Likes

This is real pytorch working on Windows 10 Directly.

Wow. This is great news. To be honest I’ve had a really hard time following the course because I couldn’t get my system to dual boot Windows 10 + Ubuntu (I currently have a Windows 10 DL box, which I share with my daughter - so removing Windows is totally out of the questions :stuck_out_tongue: ). At some point I used the FastAI AMI on AWS, but it still bugged me that I couldn’t use it locally.

Any links/guides on how to have pytorch run natively on Windows 10 with CUDA support?

1 Like

Hi @jeremy

Trying lesson 1 now, after doing a git pull and also installing Pytorch for CUDA 8, with the following command:

conda install -c peterjc123 pytorch cuda80

When I run the learn.fit(0.01, 3) I get an error where it is expecting a float but getting an integer (below). Yet you have run sucessfully but on CUDA 9 - could this be anything to do with a CUDA version?

C:\Users\User\Anaconda3_64\lib\site-packages\torch\nn\functional.py in nll_loss(input, target, weight, size_average, ignore_index, reduce)
   1047         weight = Variable(weight)
   1048     if dim == 2:
-> 1049         return torch._C._nn.nll_loss(input, target, weight, size_average, ignore_index, reduce)
   1050     elif dim == 4:
   1051         return torch._C._nn.nll_loss2d(input, target, weight, size_average, ignore_index, reduce)

RuntimeError: Expected object of type Variable[torch.cuda.LongTensor] but found type Variable[torch.cuda.IntTensor] for argument #1 'target'

An image of the the entire trace:

Yeah it does have a difference in how it handles int32 vs int64 for some reason. I hacked in something to force it in int64 to make it run but I don’t have a general solution. Someone needs to change DataLoader to always make int32->LongTensor, I think, to fix this properly. Or maybe in dataset.py.

Unless you have quite a bit of time on your hands, you probably don’t want to be the person figuring all this out - best to stick with Linux until a few people have gone thru the course in Windows and cleaned it up!

Might be not relevant to this thread but just asking…

Is there any way in which we can get hold of the Keras version of fastai library or if someone can share a link where we can download the same?

Actually I wanted to try out previous lecture series NBS …

Thanks

OK, thanks @jeremy - I will take your advice :wink:

However, I can upgrade my CUDA, although I am unsure if that will break anything else such as Tensorflow - do you have any issues with other libraries under CUDA 9?

Using Windows 10 + GPU, I’m now able to run Lesson 1 of Part 1 v2 to almost completion. I say “almost” because there seems new issues with fastai library (new lesson 1 issues) effecting non-Windows systems too.

I’ve updated instructions at Windows 10 Installation Notes The thread seems to be locked because I can’t update with latest updates. Regardless, Windows + GPU seems to be working well. Windows Ubuntu shell isn’t GPU compatible and takes 20x longer to complete.

1 Like

I also had the bcolz error. This post fixed it for me:

1 Like