gpt4 book ai didi

c++ - nvcc 致命 : Value 'sm_13' is not defined for option 'gpu-architecture'

转载 作者:行者123 更新时间:2023-11-28 02:13:16 26 4
gpt4 key购买 nike

我正在写,因为我在安装 lama 和其中的 CUDA 编译时遇到问题。我遵循了此页面上的教程 http://libama.sourceforge.net/doc/d5/de9/page_linuxinstallation.html命令“make”给我以下错误:

[Kraut@Wzmbx001 build44]$ make
Scanning dependencies of target log4lama
[ 0%] Building CXX object logging/CMakeFiles/log4lama.dir/GenLogger.cpp.o
[ 1%] Building CXX object logging/CMakeFiles/log4lama.dir/GenLoggerCreator.cpp.o
[ 1%] Building CXX object logging/CMakeFiles/log4lama.dir/Level.cpp.o
[ 2%] Building CXX object logging/CMakeFiles/log4lama.dir/Logger.cpp.o
[ 2%] Building CXX object logging/CMakeFiles/log4lama.dir/LoggerProvider.cpp.o
[ 3%] Building CXX object logging/CMakeFiles/log4lama.dir/SourceLocation.cpp.o
Linking CXX shared library liblog4lama.so
[ 3%] Built target log4lama
[ 3%] Building NVCC (Device) object lama/cuda/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_CUDACOOUtils.cu.o
nvcc fatal : Value 'sm_13' is not defined for option 'gpu-architecture'
CMake Error at cuda_compile_generated_CUDACOOUtils.cu.o.cmake:202 (message):
Error generating
/opt/OpenFOAM/lama/build44/lama/cuda/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_CUDACOOUtils.cu.o


make[2]: *** [lama/cuda/CMakeFiles/cuda_compile.dir/./cuda_compile_generated_CUDACOOUtils.cu.o] Error 1
make[1]: *** [lama/cuda/CMakeFiles/amacuda.dir/all] Error 2
make: *** [all] Error 2

我寻找了这个问题的解决方案并找到了这三个答案,它们似乎最接近我的问题:

https://devtalk.nvidia.com/default/topic/762051/jetson-tk1/compile-issues/?offset=4#4786865 How can i tell PyCUDA which GPU to use? http://sourceforge.net/p/viennacl/mailman/message/34316211/

在这些线程中提到,应该更改或注释掉“Makefile”或文件“~.cmake”中的“-arch=sm_13”选项。但是我不知道在哪里可以找到这个文件,我可以在哪里修改这个选项。任何人都可以帮助并指导我找到这个文件所在的位置吗?

这个问题似乎很常见,因为这个选项指的是 CUDA 支持的 gpu 架构。我的系统上有 CUDA-7.5,所以通过搜索这个问题的解决方案,我了解到不再支持 sm_13。所以我希望改变这个可以解决这个问题 - 只需要知道在哪里!

最佳答案

似乎支持的架构在 CompilerFlags.cmake 中定义:

### choosing the right compute capability
### we just start from version 1.3 ( 1.0 - 1.2 is not supported )
LIST ( APPEND CC_CHOICES "13" "20" "21" "30" "35" )
set ( CUDA_COMPUTE_CAPABILITY "13" CACHE STRING "CUDA compute capability (supported up from 13)" )
set ( CACHE CUDA_COMPUTE_CAPABILITY PROPERTY STRINGS ${CC_CHOICES} )
checkValue( ${CUDA_COMPUTE_CAPABILITY} "${CC_CHOICES}" )
mark_as_advanced ( CUDA_COMPUTE_CAPABILITY )

根据需要修改那些

关于c++ - nvcc 致命 : Value 'sm_13' is not defined for option 'gpu-architecture' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34941220/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com