RuntimeError: CUDA Error encountered in <function CompiledLib.bn_forward_cuda at 0x7f2dfa433730>
nsutezo opened this issue · 3 comments
nsutezo commented
Hi,
I'm trying to run Demo.ipynb but it breaks on the following line:
prediction = F.sigmoid(model(input_img)).data[0].cpu().numpy()
The error I get is below which I traced to line 16 of modules/functions.py
RuntimeError: CUDA Error encountered in <function CompiledLib.bn_forward_cuda at 0x7f2dfa433730>
Tracing the error, I see that it stems from conv2 = self.conv2(self.pool(conv1))
here.
I am not exactly sure how to fix it.
Kindly advise.
dlindenbaum commented
Hello,
I found that modifying the build.sh file as below solved the problem. This is because certain codes are needed for certain gpus.
CUDA_GENCODE="-arch=sm_30 \
-gencode=arch=compute_30,code=sm_30 \
-gencode=arch=compute_50,code=sm_50 \
-gencode=arch=compute_52,code=sm_52 \
-gencode=arch=compute_60,code=sm_60 \
-gencode=arch=compute_61,code=sm_61 \
-gencode=arch=compute_62,code=sm_62 \
-gencode=arch=compute_70,code=sm_70 \
-gencode=arch=compute_70,code=compute_70"
SerinaWei commented
Is CUDA 9.0 required to run the code? Thanks!
ternaus commented
Hard to tell. I believe I was using CUDA 9.0, but I am not sure that is is a requirement.
What CUDA version do you have installed?