fastllm icon indicating copy to clipboard operation
fastllm copied to clipboard

cmake .. -DUSE_CUDA=ON出现报错

Open 741075810 opened this issue 1 year ago • 3 comments

-- USE_CUDA: ON -- PYTHON_API: OFF -- CMAKE_CXX_FLAGS -pthread --std=c++17 -O2 -march=native CMake Error: Could not find cmake module file: CMakeDetermineCUDACompiler.cmake CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_CUDA_COMPILER_ENV_VAR CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_CUDA_COMPILER CMake Error: Could not find cmake module file: /opt/module/fastllm-master/build/CMakeFiles/3.5.1/CMakeCUDACompiler.cmake CMake Error at CMakeLists.txt:34 (enable_language): No CMAKE_CUDA_COMPILER could be found.

Tell CMake where to find the compiler by setting the CMake cache entry CMAKE_CUDA_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

CMake Error: Could not find cmake module file: CMakeCUDAInformation.cmake CMake Error: CMAKE_CUDA_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "/opt/module/fastllm-master/build/CMakeFiles/CMakeOutput.log".

看不懂是什么原因报的错,似乎和cmake有关?cmake版本是3.5.1的

741075810 avatar Jul 06 '23 08:07 741075810

早期的cmake不支持enable cuda,建议升级一下(我本地是3.23)

ztxz16 avatar Jul 06 '23 08:07 ztxz16

请问是升级哪个?是升级cuda吗?还是升级cmake

741075810 avatar Jul 06 '23 08:07 741075810

请问是升级哪个?是升级cuda吗?还是升级cmake

cmake,老版本的cmake要写find_package来使用cuda,新版本就方便多了

ztxz16 avatar Jul 06 '23 08:07 ztxz16