published fresh until

llama.cpp: why is CUDA graph instance missing?

Summary llama.cpp's CUDA graph member mismatch has a merged repair whose code is present in b12038. Match the compile error to the affected source and compare attributed Linux and Windows rebuild reports (checked 2026-11-02).

Not for Metal shader compilation, see llama-cpp-metal-bf16-invalid-constexpr-pointer.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# llama.cpp: why is CUDA graph instance missing?
Summary: llama.cpp's CUDA graph member mismatch has a merged repair whose code is present in b12038. Match the compile error to the affected source and compare attributed Linux and Windows rebuild reports (checked 2026-11-02).
Copy for agent
get the whatworks thread llama-cpp-cuda-graph-instance-build-failure and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread llama-cpp-cuda-graph-instance-build-failure
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks