pyTorch not working with an old NVidia card

I am trying to set up the tutorials locally.
OS: Ubuntu 16.04
GPU: GeForce GTX 760

I made sure that the GPU supports CUDA; as it actually has over 1000 CUDA cores as listed here.
I have also ensured that both CUDA and CuDNN are installed properly as both of these commands return “True”:


Nevertheless, when I execute the first main block of code in lesson 1 that is:

data = ImageClassifierData.from_paths(PATH, tfms=tfms_from_model(arch, sz))
learn = ConvLearner.pretrained(arch, data, precompute=True), 2)

I get the following warning:

Found GPU0 GeForce GTX 760 which is of cuda capability 3.0.
PyTorch no longer supports this GPU because it is too old.

warnings.warn(old_gpu_warn % (d, name, major, capability[1]))

Then a runtime error appears:

RuntimeError: cuda runtime error (48) : no kernel image is available for execution on the device at /opt/conda/conda-bld/pytorch_1518244421288/work/torch/lib/THC/generic/

Is it possible to set up pyTorch with this GPU?
Any help is much appreciated.


Solved by compiling pyTorch from source. Here is how to do so in details:
1- Activate the virtual env:

source activate fastai

2- Uninstall pyTorch

conda uninstall pytorch

3- Clone pyTorch repo:

git clone --recursive

4- Checkout to the latest branch (so that we install pytorch 0.3.1)

cd pytorch
git checkout v0.3.1

5- Sort out dependencies (I only needed cmake):

git submodule update --init
sudo apt install cmake

6- Install, this is were compiling takes place (took nearly 30 minutes):

python install

Just curious, is your pytorch working with your old nvidia card… did you check by running code on GPU? I have a machine with an old 940MX card with 5.0 compute power and would like to use it for prototyping.

AFAIK, v0.3.1 dropped support for old cards… correct me if I am wrong…

It would help if you let us know which CUDA version and CUDNN version you had installed at the time of building pytorch. Thanks!

P.S. I have been able to get 0.3.0 working with CUDA 9.0 on my card, just wondering if there’s a way to get 0.3.1 working.


could you please help by explaining a bit more on how to compile pytorch from source.
i am new to deep learning and only familiar with anaconda prompt commands.
i shall be grateful.

Did you solve the error ?

Yes, pyTorch 0.3.1 is working with my old GPU (GTX 760), just follow my steps above.
For Cuda I used this package:
And for CuDNN I used:


Did you follow the steps in my first reply, I explained in details how to solve this? If yes, at what point did you face a problem?

Yes I did, follow the steps in my first reply if you are facing the same problem.

i am getting stuck in the last 6th step.It shows is not found ,however it is there.(i am using windows 10)
Will installing cpu version of pytorch atleast run the code without errors?

Are you using bash inside windows? Could you ls the directory you are standing on and paste the output, also could you paste the error message you are getting ?

$ python install
bash: python: command not found
(when using git bash)

running install
running build_deps
error: [WinError 2] The system cannot find the file specified
(when using anaconda prompt)

1 Like


I have the same problem with step 6. Maybe you could help solve this issue?

When I try to run the I receive an error:
python install
running install
running build_deps
error: [WinError 2] The system cannot find the file specified

I have navigated to the correct folder “~\Fast_AI\Github material\fastai\pytorch”, when I list the files I can see, but it does not allow to run.

Files in pytorch folder:
2018-04-25 11:53 AM .
2018-04-25 11:53 AM …
2018-04-25 11:42 AM 10 .dockerignore
2018-04-25 11:53 AM 972 .gitignore
2018-04-25 11:53 AM 312 .gitmodules
2018-04-25 11:53 AM 1,202 .travis.yml
2018-04-25 11:53 AM cmake
2018-04-25 11:53 AM 6,775
2018-04-25 11:53 AM 1,600 Dockerfile
2018-04-25 11:53 AM docs
2018-04-25 11:53 AM 2,249 LICENSE
2018-04-25 11:53 AM 12,158
2018-04-25 11:53 AM 8 requirements.txt
2018-04-25 11:53 AM 24,736
2018-04-25 11:53 AM test
2018-04-25 11:53 AM third_party
2018-04-25 12:08 PM tools
2018-04-25 11:53 AM torch
2018-04-25 11:53 AM 169 tox.ini
11 File(s) 50,191 bytes
8 Dir(s) 64,394,248,192 bytes free

I have downloaded pytorch not from local source, but .tar.bz2 and installed via conda with conda install path to file/file name

Pytorch installations for windows:

Got help from Joschka: Unable install Pytorch from source for older GPU card

For anyone still facing the old card issue, the latest pytorch added support for old cards as many people were facing the same issue.

I have installed pytorch 0.4 in fastai library using normal pip install, and it’s been running fine without any issues on my 940MX with GPU capability 5.0. I have nvidia 390 proprietary drivers installed on ubuntu 18.04 with CUDA 9.0 and CUDNN 7.0.


I’m trying to get my GTX 760 to run on Fedora 28. I tried to find the corresponding installs for the Ubuntu fixes listed above, but no luck so far.

Anyone have any suggestions?

ubuntu or windows? I have the Same GPU configuration with you.

If i understand correctly, CUDNN is not required and isn’t supported in, correct although it’ll make things even faster?


CUDNN is a library of primitives which are used in CUDA if they’re present. It’s at a lower level than pytorch - on which fastai is written over. And it’s not required to have, but having them makes many computations run faster. And as you might have guessed by now, fastai runs with or without them.

Ive done exactly these steps. I can successfully build it but i still get the message,

Found GPU0 GeForce GTX 680 which is of cuda capability 3.0.
PyTorch no longer supports this GPU because it is too old.

warnings.warn(old_gpu_warn % (d, name, major, capability[1]))
Traceback (most recent call last):
File “”, line 154, in
File “”, line 135, in main
File “/home/server/miniconda2/envs/env123/lib/python3.5/site-packages/torch/nn/modules/”, line 522, in load_state_dict
KeyError: ‘unexpected key “rnn_0.weight_ih_l0” in state_dict’

what can i do else ?

1 Like