ggerganov / llama.cpp

LLM inference in C/C++
MIT License
68.75k stars 9.87k forks source link

Compile bug: error: A __device__ variable cannot be marked constexpr #10652

Open qtyandhasee opened 14 hours ago

qtyandhasee commented 14 hours ago

Git commit

0bbd2262a3263f37385297b30de37941836e57f7

Operating systems

Linux

GGML backends

CUDA

Problem description & steps to reproduce

some information may important nvidia-smi NVIDIA-SMI 550.107.02 Driver Version: 550.107.02 CUDA Version: 12.4 nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Sun_Jul_28_19:07:16_PDT_2019 Cuda compilation tools, release 10.1, V10.1.243 my operations cd path/to/llama.cpp mkdir build cd build cmake -DGGML_CUDA=ON .. cmake --build build --config Release

First Bad Commit

No response

Relevant log output

(base) eco@ecoserver4090:~/CodeSpace/qianty/llama.cpp$ cmake --build build_gpu_86 --config Release
[  3%] Built target ggml-base
[  4%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/acc.cu.o
/home/eco/CodeSpace/qianty/llama.cpp/ggml/src/ggml-cuda/common.cuh(337): error: A __device__ variable cannot be marked constexpr

1 error detected in the compilation of "/tmp/tmpxft_000a50bd_00000000-9_acc.compute_75.cpp1.ii".
make[2]: *** [ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/build.make:79: ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/acc.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2166: ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
JohannesGaessler commented 9 hours ago

Which CUDA version are you using? You wrote 12.4 but the output from nvcc -V suggests 10.1.