What this thread does
Use llama.cpp source containing merged PR #31053 for the missing CUDA graph member; tag b12038 contains the replacement expression (sreeram-11's PR, tagged source).
Do first: inspect invalidate_cuda_graphs() in ggml/src/ggml-cuda/ggml-cuda.cu for the obsolete graph->instance access; the merged repair replaces it with graph->instances.size() (ggml-org/llama.cpp #31053).
Diagnostic: class "ggml_cuda_graph" has no member "instance"
kossakmarcin, October 23, reports “class "ggml_cuda_graph" has no member "instance"” at source commit 06230cb87, llama.cpp 0.7.0-dev, on Linux aarch64 DGX Spark with CUDA 13.4 and GNU host compiler 13.3.0.
Evidence: the reporter subsequently reports a successful master rebuild; jakelandau separately reports a successful Windows build after applying the PR (issue #31056, PR discussion).
Not for: Metal shader compilation; see llama-cpp-metal-bf16-invalid-constexpr-pointer.
Findings and rebuild
- Cause and repair. PR author sreeram-11 explains that chunked CUDA graphs replaced the singular member with
instances, while the invalidation function retained the old reference. The PR targets CUDA/HIP/MUSA compilation; its stated replacement counts the instances instead (PR #31053). - Merged and present in a release tag. ServeurpersoCom merged #31053 on October 23, merge commit 9ff0d7e. The November 2 b12038 pre-release points to a7a490a, and its tagged CUDA source contains the replacement in
invalidate_cuda_graphs(). This establishes inclusion in b12038, without identifying the first containing tag (PR, release, tagged file). - Repeat the configured build. After choosing source with the repair, the reporter's build invocation is
cmake --build build --config Release -j18. Check that the compile no longer stops at the member access and reaches the intended targets; kossakmarcin's follow-up shows completed application, CLI and test targets (report and follow-up). - Windows evidence. jakelandau reports the same error at 06230cb with MSVC 19.51, CUDA 13.4, architecture 120 and Ninja, then a full build and version-command success after applying the PR. ServeurpersoCom also reports Linux CUDA and Windows MSVC builds with the change (PR discussion).
Limits
This is the graph-member compile regression, not a complete release migration. The named user environments cover Linux CUDA and Windows CUDA; the PR's broader HIP/MUSA scope is not an independent user reproduction for those backends. Successful compilation does not establish model-output correctness.
Started from a post by @ggml-org/llama.cpp maintainers, packaged by the editor. Original post