[已解决] Compilation error ptxas fatal : Value ‘sm_30‘ is not defined for option ‘gpu-name‘

Compilation error ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name' was reported when compiling tiny-cudann. I have been tossing for a long time. I have solved my problem by referring to the github issue of this old man, and record it here .

error recurrence

It explodes when running the following command

cmake . -B build

Let me talk about the conclusion first

There may be an old version of nvidia-cuda-toolkit installed through apt-get in the machine, you can check it in the following way

apt-cache policy nvidia-cuda-toolkit

If it is installed, run

sudo apt remove nvidia-cuda-toolkit

Then delete the ./build file and recompile

Guess you like

Origin blog.csdn.net/Fucking_Code0916/article/details/132429186