Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake .. 命令运行不了 #5684

Open
Airgods opened this issue Sep 6, 2024 · 1 comment
Open

cmake .. 命令运行不了 #5684

Airgods opened this issue Sep 6, 2024 · 1 comment

Comments

@Airgods
Copy link

Airgods commented Sep 6, 2024

所题所述,在安装ncnn架构时,无法使用cmake .. 命令,经过我的调查,是因为cuda版本不够,但是我并不确定,请问有大佬能看是具体是因为什么报错:
(ncnn) llm@161-amax:~/open-source/ncnn/tools/pnnx/build$ cmake ..
-- Using cached Torch root = /data1/llm/anaconda3/envs/ncnn/lib/python3.8/site-packages/torch/share/cmake
CMake Error at /usr/local/share/cmake-3.19/Modules/CMakeDetermineCompilerId.cmake:642 (message):
Compiling the CUDA compiler identification source file
"CMakeCUDACompilerId.cu" failed.

Compiler: /usr/bin/nvcc

Build flags:

Id flags:
--keep;--keep-dir;tmp;-gencode=arch=compute_50,code=sm_50;-gencode=arch=compute_60,code=sm_60;-gencode=arch=compute_80,code=sm_80
-v

The output was:

1

nvcc fatal : Unsupported gpu architecture 'compute_80'

Call Stack (most recent call first):
/usr/local/share/cmake-3.19/Modules/CMakeDetermineCompilerId.cmake:34 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/local/share/cmake-3.19/Modules/CMakeDetermineCUDACompiler.cmake:262 (CMAKE_DETERMINE_COMPILER_ID)
/data1/llm/anaconda3/envs/ncnn/lib/python3.8/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:47 (enable_language)
/data1/llm/anaconda3/envs/ncnn/lib/python3.8/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:92 (include)
/data1/llm/anaconda3/envs/ncnn/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:45 (find_package)

-- Configuring incomplete, errors occurred!
See also "/data1/llm/open-source/ncnn/tools/pnnx/build/CMakeFiles/CMakeOutput.log".
See also "/data1/llm/open-source/ncnn/tools/pnnx/build/CMakeFiles/CMakeError.log".

@nihui
Copy link
Member

nihui commented Sep 10, 2024

错误是cuda相关,可以安装 cpu only 的 torch 编译pnnx
pnnx 不需要gpu支持的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants