Compile bug: Error building with with CUDA 11.8: cudaGridDependencySynchronize undefined in common.cuh
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- cmake, cpp
- Domain
- backend, build-system
Research direction
Start with ggml/src/ggml-cuda/common.cuh around the reported cudaGridDependencySynchronize and cudaTriggerProgrammaticLaunchCompletion references, then inspect the CUDA version checks introduced by commit e94722822. Reproduce with CUDA 11.8 using the issue's CMake command and verify that the build completes without undefined-identifier errors.
Written by the indexing model from the issue text.
Description
Git commit
1c3c9674d, current as of August 4
Operating systems
Linux
GGML backends
CUDA
Problem description & steps to reproduce
I'm building with CUDA 11.8 and g++ 11.4.0 on Ubuntu 22.04.
My CMake flags are -DGGML_CUDA=ON and -DGGML_CUDA_NCCL=ON -DGGML_CCACHE=OFF
The build fails around 29% with:
/home/michael/ai/llama.cpp/ggml/src/ggml-cuda/common.cuh(126): error: identifier "cudaGridDependencySynchronize" is undefined
/home/michael/ai/llama.cpp/ggml/src/ggml-cuda/common.cuh(132): error: identifier "cudaTriggerProgrammaticLaunchCompletion" is undefined
It looks like they are only declared in cuda_device_runtime_api.h starting with CUDA 12.6, but GGML_CUDA_USE_PDL is enabled for 11.8.
Thank you to the whole llama.cpp team for all the great work you do!
First Bad Commit
GIT bisect found the breaking commit, e94722822 (PR 22522)
Compile command
rm -rf build
cmake -B build -DBUILD_SHARED_LIBS=OFF -DGGML_CUDA=ON -DGGML_CUDA_NCCL=ON -DGGML_CCACHE=OFF
cmake --build build --parallel
Relevant log output
[ 28%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-vec-instance-q8_0-q8_0.cu.o
[ 28%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-vec-instance-bf16-bf16.cu.o
/home/michael/ai/llama.cpp/ggml/src/ggml-cuda/common.cuh(121): error: identifier "cudaGridDependencySynchronize" is undefined
/home/michael/ai/llama.cpp/ggml/src/ggml-cuda/common.cuh(127): error: identifier "cudaTriggerProgrammaticLaunchCompletion" is undefined
/home/michael/ai/llama.cpp/ggml/src/ggml-cuda/common.cuh(121): error: identifier "cudaGridDependencySynchronize" is undefined
/home/michael/ai/llama.cpp/ggml/src/ggml-cuda/common.cuh(127): error: identifier "cudaTriggerProgrammaticLaunchCompletion" is undefined
... and so on
- Dominant language
- C++
- Stars
- 129k
- Forks
- 23.5k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 411
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ggml-org/llama.cpp
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
bug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
/v1/responses: reasoning item with "summary": null rejected as "Cannot determine type of 'item'" Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
All issues in ggml-org/llama.cpp
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100