fastllm icon indicating copy to clipboard operation
fastllm copied to clipboard

nvcc fatal : Unsupported gpu architecture 'compute_native'

Open YerongLi opened this issue 1 year ago • 11 comments

make -j 时候报错

$ make -j                                                                                                        
[  3%] Building CUDA object CMakeFiles/fastllm_tools.dir/src/devices/cuda/fastllm-cuda.cu.o                                                   
[  6%] Building CUDA object CMakeFiles/fastllm.dir/src/devices/cuda/fastllm-cuda.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_native'
make[2]: *** [CMakeFiles/fastllm_tools.dir/src/devices/cuda/fastllm-cuda.cu.o] Error 1
make[1]: *** [CMakeFiles/fastllm_tools.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
nvcc fatal   : Unsupported gpu architecture 'compute_native'
make[2]: *** [CMakeFiles/fastllm.dir/src/devices/cuda/fastllm-cuda.cu.o] Error 1
make[1]: *** [CMakeFiles/fastllm.dir/all] Error 2
make: *** [all] Error 2

YerongLi avatar Jul 11 '23 10:07 YerongLi

+1 cuda 11.7

zkwhandan avatar Jul 11 '23 12:07 zkwhandan

https://github.com/ztxz16/fastllm/blob/eaa277df3b72a7bd76c6debc1d8aec33dc45f414/CMakeLists.txt#L40 Comment this out helps me pass the installation. But new error pops out

07/11/2023 07:31:17 - INFO - utils.common - Merged 1 model checkpoint(s).
07/11/2023 07:31:17 - INFO - utils.common - Loaded fine-tuned model from checkpoint(s): harry_potter/checkpoint-700
trainable params: 0 || all params: 6173286400 || trainable%: 0.0000
convert ( 368 / 368 )
Warmup...
status = 15
1 1 128
Error: cublas error.
demo.sh: line 3: 40397 Aborted                 python src/cli_demo.py --model_name_or_path THUDM/chatglm-6b --checkpoint_dir harry_potter/checkpoint-700

YerongLi avatar Jul 11 '23 12:07 YerongLi

在fastllm/CMakeLIsts.txt文件中将set(CMAKE_CUDA_ARCHITECTURES "native") 中的native改成显卡对应的算力,11.7应该对应80.

LanShanPi avatar Jul 11 '23 13:07 LanShanPi

正解,对于不同的CUDA有没有办法自动替换native?

在fastllm/CMakeLIsts.txt文件中将set(CMAKE_CUDA_ARCHITECTURES "native") 中的native改成显卡对应的算力,11.7应该对应80.

YerongLi avatar Jul 11 '23 19:07 YerongLi

前两天我也遇到了,确保这几个库都装上了,就不会报错了:

conda install -c nvidia libcublas=11.7
conda install -c nvidia libcublas-dev=11.7
conda install -c nvidia cuda-cudart-dev=11.7
conda install -c nvidia cuda-profiler-api=11.8.86
conda install -c nvidia cuda-nvcc=11.7

boydfd avatar Jul 12 '23 13:07 boydfd

正解,对于不同的CUDA有没有办法自动替换native?

在fastllm/CMakeLIsts.txt文件中将set(CMAKE_CUDA_ARCHITECTURES "native") 中的native改成显卡对应的算力,11.7应该对应80.

native理论上是自动识别的.. 但有些环境会失效

ztxz16 avatar Jul 13 '23 07:07 ztxz16

在fastllm/CMakeLIsts.txt文件中将set(CMAKE_CUDA_ARCHITECTURES "native") 中的native改成显卡对应的算力,11.7应该对应80.

那12.1的p40对应的算力是多少?这个算力对应是在哪查啊 @ztxz16 @LanShanPi

heavenkiller2018 avatar Jul 18 '23 22:07 heavenkiller2018

盲猜80,跑起来了

linhandev avatar Jul 20 '23 15:07 linhandev

在fastllm/CMakeLIsts.txt文件中将set(CMAKE_CUDA_ARCHITECTURES "native") 中的native改成显卡对应的算力,11.7应该对应80.

4090 12.2 对应 89 成功。

JulyFinal avatar Jul 27 '23 07:07 JulyFinal

在fastllm/CMakeLIsts.txt文件中将set(CMAKE_CUDA_ARCHITECTURES "native") 中的native改成显卡对应的算力,11.7应该对应80.

那12.1的p40对应的算力是多少?这个算力对应是在哪查啊 @ztxz16 @LanShanPi

61

silenceyese avatar Aug 15 '23 01:08 silenceyese

在fastllm/CMakeLIsts.txt文件中将set(CMAKE_CUDA_ARCHITECTURES "native") 中的native改成显卡对应的算力,11.7应该对应80.

那12.1的p40对应的算力是多少?这个算力对应是在哪查啊 @ztxz16 @LanShanPi

看这里,找你对应的显卡类型。

https://developer.nvidia.com/cuda-gpus

pollyduan avatar Feb 05 '24 11:02 pollyduan