cuda runtime error (48): no kernel image is available for execution on the device
I'm new to pytorch. I took the code from this repository https://github.com/ruotianluo/ImageCaptioning.pytorch and wanted to make captions to the images. Installed "CUDA" and when I run the script to create the annotations produces this:


  $ CUDA_LAUNCH_BLOCKING = 1 python eval.py --model model.pth -
  -infos_path infos.pkl --image_folder blah --num_images 1 /home/azat/anaconda2/lib/python2.7/site-packages/h5py/init.py:36:
  FutureWarning: Conversion of the second argument of issubdtype from
  float tonp.floating is deprecated. In the future, it will be
  treated as np.float64 == np.dtype (float) .type.   from ._conv
  import register_converters as _register_converters
  /home/azat/anaconda2/lib/python2.7/site-packages/torch/cuda/init.py:97:
  UserWarning:
      Found GPU0 GeForce 820M which is of cuda capability 2.1.
      PyTorch no longer supports this GPU because it is too old.
         warnings.warn (old_gpu_warn% (d, name, major, capability 1)) DataLoaderRaw loading images from folder: blah 0 listing all images in
  directory blah DataLoaderRaw found 8 images THCudaCheck FAIL file = /
  pytorch / torch / lib / THC / generic / THCTensorMathPairwise.cu line
  = 40 error = 48: no kernel image is available for execution on the device Traceback (most recent last call last):   File "eval.py", line
  122, in 
      vars (opt))   File "/ home / azat / Programing / Python / techno_atom_neuro / Others Implementation /
  ImageCaptioning.pytorch-master / eval_utils.py", line 82, in
  eval_split
      data = loader.get_batch (split)   File "/ home / azat / Programing / Python / techno_atom_neuro / Others Implementation /
  ImageCaptioning.pytorch-master / dataloaderraw.py", line 112, in
  get_batch
      img = Variable (preprocess (img), volatile = True)   File "/home/azat/anaconda2/lib/python2.7/site-packages/torchvision/transforms/transforms.py",
  line 42, in call
      img = t (img)   File "/home/azat/anaconda2/lib/python2.7/site-packages/torchvision/transforms/transforms.py",
  line 118, in call
      return F.normalize (tensor, self.mean, self.std)   File "/home/azat/anaconda2/lib/python2.7/site-packages/torchvision/transforms/functional.py",
  line 161, in normalize
      t.sub_ (m) .div_ (s) RuntimeError: cuda runtime error (48): no kernel image is available for execution on the device at
  /pytorch/torch/lib/THC/generic/THCTensorMathPairwise.cu:40


So, I want to find out what this error is, hardware or software. And how can I solve this problem. Thanks.

PyTorch
OS: Ubuntu 16.04
PyTorch version: 0.3.1 pip
Python version: Python 2.7.14 :: Anaconda custom (64-bit)
CUDA/cuDNN version: 9.1
GPU models and configuration:

$ nvidia-smi
Wed Apr 11 21:34:08 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.48                 Driver Version: 390.48                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce 820M        Off  | 00000000:08:00.0 N/A |                  N/A |
| N/A   54C    P0    N/A /  N/A |    114MiB /  1985MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+


The answer is buried in that huge error message you got:


  UserWarning: Found GPU0 GeForce 820M which is of cuda capability 2.1. PyTorch no longer supports this GPU because it is too old.

