MacOS Sierra 10.12.4를 사용 중이며 CUDA와 호환되는 NVIDIA GeForce GT 750M을 사용하여 MacBook Pro (2013 년 후반)에서 CUDA 8.0을 사용할 수 있습니다. "make"명령이 (CUDA 샘플을 컴파일하기 위해) 잘못된 clang 컴파일러를 사용하고 있습니다 - 어떻게 해결할 수 있습니까?
은 내가 NVIDIA installation guide을 따라 엑스 코드 8.2 및 해당 명령 행 도구를 설치하지만, 나는 다음과 같은 오류가 샘플을 컴파일 할 때 : 여기$ make -C 1_Utilities/deviceQuery
/Developer/NVIDIA/CUDA-8.0/bin/nvcc -ccbin clang++ -I../../common/inc -m64 -Xcompiler -arch -Xcompiler x86_64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_60,code=compute_60 -o deviceQuery.o -c deviceQuery.cpp
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc fatal : The version ('30900') of the host compiler ('clang') is not supported
make: *** [deviceQuery.o] Error 1
나는 문제가 무엇인지 생각된다
를 "make"명령이 잘못된 clang을 사용하고 있지만이를 변경/수정하는 방법을 모르겠습니다. 나는이 명령은 폴더는/usr/빈/그 소리에 정확한 연타 버전을 사용 "할"수있는 방법을
$ clang --version
clang version 3.9.0 (tags/RELEASE_390/final)
Target: x86_64-apple-darwin16.5.0 Thread model: posix
InstalledDir: /opt/local/libexec/llvm-3.9/bin$ /usr/bin/clang --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.5.0
Thread model: posix InstalledDir: /Applications/Xcode_8.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
을 : 여기
당신은 내 컴퓨터에있는 그 소리의 두 가지 버전을 볼 수 있습니다 기본적으로?
"make"명령을 사용하여/usr/bin/clang 폴더에서 clang 버전을 명시 적으로 사용하려면 일부 매개 변수/태그를 추가하는 방법이 있습니까? 여기
는 도움이된다면처럼 내 ~/.bash_profile에 보이는 방법도 있습니다 : make -n
으로
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# MacPorts Installer addition on 2016-09-26_at_12:06:30: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# colorful terminal
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
# CUDA
export PATH=/Developer/NVIDIA/CUDA-8.0.61/bin${PATH:+:${PATH}}
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-8.0.61/lib\
${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
고마워, "clang ++"을 "/ usr/bin/clang"으로 대체하여 make 파일에서 문제가 해결되었습니다 :) –