Closed Zaaachary closed 1 year ago
改成用ninja了,还是报错 呜呜呜
看了mnn的文档,加了cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DMNN_WIN_RUNTIME_MT=ON -DMNN_BUILD_SHARED_LIBS=ON -DMNN_CUDA=ON
PS D:\Project\LLM\ChatGLM\MNN\build> ninja
[259/375] Building NVCC (Device) object source/backend/cud...DA.dir/execution/MNN_CUDA_generated_ArgMaxExecution.cu.obj
FAILED: source/backend/cuda/CMakeFiles/MNN_CUDA.dir/execution/MNN_CUDA_generated_ArgMaxExecution.cu.obj D:/Project/LLM/ChatGLM/MNN/build/source/backend/cuda/CMakeFiles/MNN_CUDA.dir/execution/MNN_CUDA_generated_ArgMaxExecution.cu.obj
cmd.exe /C "cd /D D:\Project\LLM\ChatGLM\MNN\build\source\backend\cuda\CMakeFiles\MNN_CUDA.dir\execution && D:\ProgramFiles\Develop\cmake\bin\cmake.exe -E make_directory D:/Project/LLM/ChatGLM/MNN/build/source/backend/cuda/CMakeFiles/MNN_CUDA.dir/execution/. && D:\ProgramFiles\Develop\cmake\bin\cmake.exe -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=D:/Project/LLM/ChatGLM/MNN/build/source/backend/cuda/CMakeFiles/MNN_CUDA.dir/execution/./MNN_CUDA_generated_ArgMaxExecution.cu.obj -D generated_cubin_file:STRING=D:/Project/LLM/ChatGLM/MNN/build/source/backend/cuda/CMakeFiles/MNN_CUDA.dir/execution/./MNN_CUDA_generated_ArgMaxExecution.cu.obj.cubin.txt -P D:/Project/LLM/ChatGLM/MNN/build/source/backend/cuda/CMakeFiles/MNN_CUDA.dir/execution/MNN_CUDA_generated_ArgMaxExecution.cu.obj.Release.cmake"
nvcc fatal : Host compiler targets unsupported OS.
CMake Error at MNN_CUDA_generated_ArgMaxExecution.cu.obj.Release.cmake:220 (message):
Error generating
D:/Project/LLM/ChatGLM/MNN/build/source/backend/cuda/CMakeFiles/MNN_CUDA.dir/execution/./MNN_CUDA_generated_ArgMaxExecution.cu.obj
看起来是这个问题nvcc fatal : Host compiler targets unsupported OS.
windows编译,不用cuda可以编译成功(还需要改全局utf-8编码),用了就会失败。
windows编译CUDA报错参考 {MNN_ROOT}\docs\compile\engine.md 里边有说明
问题解决,我降低了cuda的版本。12->11.7/11.8.
早点来看这个issue就好了,不用浪费一下午时间
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake -DCMAKE_BUILD_TYPE=Release -DMNN_CUDA=ON ..
上面 无论是否开启CUDA ,都报一样的错误。
make: *** No rule to make target '/m:8'. Stop.
window11,有谁知道为什么嘛???
请开发者dalao帮忙看看怎么回事咧。
已安装 cmake、cuda
已执行
cmake -DCMAKE_BUILD_TYPE=Release -DMNN_CUDA=ON ..
而执行
cmake --build . -- /m:8
的时候报错了编译过程中出现两个 warning
最后的报错信息如下