Revert Apple Clang Version For NVCC

后端 未结 9 1628
说谎
说谎 2020-12-23 12:04

I am trying to run NVCC to compile a CUDA program on my Mac.

When I try to run NVCC, I am receiving the following error: \"nvcc fatal : The version (\'70300\') of

9条回答
  •  一向
    一向 (楼主)
    2020-12-23 12:16

    I just had the same issue after upgrading to XCode 7.3 on 10.11. Reinstalling the previous (7.2) command line tools didn't downgrade the default clang compiler. To fix this I used a previous XCode.app package to rename and copy the XcodeDefault.xctoolchain directory into the Toolchains director in the current /Applications/Xcode.app. You have to right click on Xcode.app to "Show package contents" then browse to the Toolchains dir.

    Then (re)start Xcode, hit command-, for preferences, then go to locations. You will see the dropdown for Command Line Tools. Change this to the version of the toolchain you copied over.

    You can check the default version of clang in Terminal:

    clang -v OR llvm-gcc -v
    

    Now nvcc should work

提交回复
热议问题