I'm currently trying to compile Darknet on the latest CUDA toolkit which is version 11.1. I have a GPU capable of running CUDA version 5 which is a GeForce 940M. However, while rebuilding darknet using the latest CUDA toolkit, it said

nvcc fatal : Unsupported GPU architecture 'compute_30'

compute_30 is for version 3, how can it fail while my GPU can run version 5Is it possible that my code detected my intel graphics card instead of my Nvidia GPU? if that's the case, is it possible to change its detection?

2

Best Answer


Support for compute_30 has been removed for versions after CUDA 10.2. So if you are using nvcc make sure to use this flag to target the correct architecture in the build system for darknet

-gencode=arch=compute_50,code=sm_50

You may also need to use this one to avoid a warning of architectures are deprecated.

-Wno-deprecated-gpu-targets 

I added the following:

makefiletemp = open('Makefile','r+') list_of_lines = makefiletemp.readlines()list_of_lines[15] = list_of_lines[14]list_of_lines[16] = "ARCH= -gencode arch=compute_35,code=sm_35 \\\n"makefiletemp = open('Makefile','w')makefiletemp.writelines(list_of_lines)makefiletemp.close()

right before the#Compile Darknet

!make

command. That seemed to work!