Cuda runtime error (11)

CUDA: 9.0
CUDNN: 7.4
GPU: 2080ti
Python: 3.6
Installed pytorch via “pip3 install torch torchvision”

I have THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=663 error=11 : invalid argument error while run

import torch
from torchvision.models import vgg16

model = vgg16().cuda()
x = torch.zeros((32, 3, 227, 227)).cuda()


Crash while run first conv layer.
How to solve this?


Have u exported the cuda environment paths? I guess you didn’t

I’v done changes in .bashrc

export CUDA_HOME=/usr/local/cuda-9.2
export PATH=${CUDA_HOME}/bin:${PATH}

Solved this by installing cuda via .sh, not via .deb

Hello, I have the same question. can I know the detail of how you solve this problem

I install CUDA 9.2 using .sh script instead of CUDA 9.0 using .dep package.

1 Like

Hello, I install CUDA 9.0 using .sh script, and have the same question, it must require cuda9.2?

It seems like a bug in pytorch. cuda9.2 is solution for me.

I have the same question by using CUDA 9.2, CUDNN 7.4, 2080, and I install CUDA 9.2 with .sh not .deb.
Is the error caused by the graphics card driver version?

It seems, last pytorch version(1.0.0) doesn’t work with CUDA 9.2. I intalled CUDA 10 and all works fine.

1 Like

yes, CUDA 10 and pytorch1.0.0 works fine

1 Like

I have the same issue and the version for CUDA is 10.0, with RTX 2080. Anyone has the same problem here?

1 Like

Okay I have solve the problem. You cannot directly install pytorch, instead “pip3 install -U” work for me.

1 Like

I had a similar issue with my RTX GPU. I installed PyTorch from source, which fixed my issue.

I had a similar issue with RTX 2080 ti, I installed Pytorch via following command, which fixed my issue.
conda install pytorch=0.4.0 torchvision=0.2.1 cudatoolkit=9 -c pytorch

1 Like

Since you are using a Turing GPU, you should use CUDA10 instead of CUDA9.
Also, I would recommend to install the latest PyTorch version (1.1.0) which ships with some bug fixes and a lot of new features.

But, I needed to this version and I reviewed other solutions.
However you’re right, with latest PyTorch version, everything works fine.