ztxz16 / fastllm

纯c++的全平台llm加速库,支持python调用,chatglm-6B级模型单卡可达10000+token / s,支持glm, llama, moss基座,手机端流畅运行
Apache License 2.0
3.28k stars 333 forks source link

编译问题 #176

Open chestnut111 opened 1 year ago

chestnut111 commented 1 year ago

cmake .. -DUSE_CUDA=ON -- The CUDA compiler identification is unknown CMake Error at ..a/share/cmake-3.26/Modules/CMakeDetermineCUDACompiler.cmake:603 (message): Compiler output: Call Stack (most recent call first): CMakeLists.txt:39 (enable_language) -- Configuring incomplete, errors occurred!

ztxz16 commented 1 year ago

NVCC正常吗?这个报错看起来是没找到CUDA编译器

chestnut111 commented 1 year ago

cmake .. -DUSE_CUDA=ON -D CMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc ===> CMake Error at ... lib/python3.8/site-packages/cmake/data/share/cmake-3.26/Modules/CMakeDetermineCUDACompiler.cmake:277 CMAKE_CUDA_ARCHITECTURES must be non-empty if set. Call Stack (most recent call first): CMakeLists.txt:39 (enable_language)

chestnut111 commented 1 year ago

@ztxz16 可以指定NVCC,但是会报上面的问题,CMAKE_CUDA_ARCHITECTURES 指定的话,不知道要设置多少

chestnut111 commented 1 year ago

刚发现cmake可以成功 但是make -j 时报错 nvcc fatal : Unsupported gpu architecture 'compute_86'

chestnut111 commented 1 year ago

是CUDA版本问题吗、我这边是 10.1

kiranosora commented 1 year ago

https://forums.developer.nvidia.com/t/nvcc-fatal-unsupported-gpu-architecture-compute-86/161424 根据这里的说明,应该是你的cuda版本过低

luosiwu commented 1 year ago

sudo cmake .. -DUSE_CUDA=ON -D CMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_ARCHITECTURES=75

PeterXiaTian commented 9 months ago

cmake的时候报下面错误,怎么解决: -- The CXX compiler identification is GNU 7.5.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- USE_CUDA: ON -- PYTHON_API: OFF -- USE_SENTENCEPIECE: OFF -- CMAKE_CXX_FLAGS -pthread --std=c++17 -O2 -march=native -- The CUDA compiler identification is NVIDIA 11.3.109 -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done CMake Error at CMakeLists.txt:50 (add_compile_definitions): Unknown CMake command "add_compile_definitions".

PeterXiaTian commented 9 months ago

是CUDA版本问题吗、我这边是 10.1

这个问题解决了吗?我也碰到了

nvcc fatal : Unsupported gpu architecture 'compute_native'