web-dev-qa-db-fra.com

Erreur Pytorch Cuda: aucune image de noyau n'est disponible pour l'exécution sur l'appareil sur RTX 3090 avec CUDA 11.1

Si je cours ce qui suit:

import torch
import sys
print('A', sys.version)
print('B', torch.__version__)
print('C', torch.cuda.is_available())
print('D', torch.backends.cudnn.enabled)
device = torch.device('cuda')
print('E', torch.cuda.get_device_properties(device))
print('F', torch.tensor([1.0, 2.0]).cuda())

J'ai compris:

A 3.7.5 (default, Nov  7 2019, 10:50:52) 
[GCC 8.3.0]
B 1.8.0.dev20210115+cu110
C True
D True
E _CudaDeviceProperties(name='GeForce RTX 3090', major=8, minor=6, total_memory=24267MB, multi_processor_count=82)
F 
<stacktrace>
CUDA error: no kernel image is available for execution on the device

Plus d'infos sur mon système:

  • NVIDIA Version: NVIDIA-SMI 455.38 Version du pilote: 455.38 CUDA Version: 11.1
  • python 3.7, Ubuntu 18.04
7
Benjamin Crouzier

Après avoir couru

pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html -U

Je reçois:

python torchtest.py 
B 1.8.0
C True
D True
/home/chava/anaconda3/envs/voxelpose/lib/python3.6/site-packages/torch/cuda/__init__.py:104: UserWarning: 
GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.
If you want to use the GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(Arch_list), device_name))
E _CudaDeviceProperties(name='GeForce RTX 3090', major=8, minor=6, total_memory=24268MB, multi_processor_count=82)
F Traceback (most recent call last):
  File "torchtest.py", line 11, in <module>
    print('F', torch.tensor([1.0, 2.0]).cuda())
  File "/home/chava/anaconda3/envs/voxelpose/lib/python3.6/site-packages/torch/tensor.py", line 193, in __repr__
    return torch._tensor_str._str(self)
  File "/home/chava/anaconda3/envs/voxelpose/lib/python3.6/site-packages/torch/_tensor_str.py", line 383, in _str
    return _str_intern(self)
  File "/home/chava/anaconda3/envs/voxelpose/lib/python3.6/site-packages/torch/_tensor_str.py", line 358, in _str_intern
    tensor_str = _tensor_str(self, indent)
  File "/home/chava/anaconda3/envs/voxelpose/lib/python3.6/site-packages/torch/_tensor_str.py", line 242, in _tensor_str
    formatter = _Formatter(get_summarized_data(self) if summarize else self)
  File "/home/chava/anaconda3/envs/voxelpose/lib/python3.6/site-packages/torch/_tensor_str.py", line 90, in __init__
    nonzero_finite_vals = torch.masked_select(tensor_view, torch.isfinite(tensor_view) & tensor_view.ne(0))
RuntimeError: CUDA error: no kernel image is available for execution on the device
2
サルバドル