Skip to content

CUDA: fix build after chunked CUDA graphs (#30804) - #31053

Merged
ServeurpersoCom merged 3 commits into
ggml-org:masterfrom
sreeram-11:sreeram/fix-cuda-graph-instance-build
Oct 23, 2026
Merged

ServeurpersoCom merged 3 commits into
ggml-org:masterfrom
sreeram-11:sreeram/fix-cuda-graph-instance-build

Conversation

@sreeram-11

@sreeram-11 sreeram-11 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Fixes the CUDA/HIP/MUSA build on master.

#30804 replaced ggml_cuda_graph::instance with instances, but invalidate_cuda_graphs() from #26771 still uses graph->instance, which breaks the CUDA/HIP build.

ggml-cuda.cu(499): error: class "ggml_cuda_graph" has no member "instance"

Fixed with graph->instances.size().

Additional information

Failing CI on 280141e (before):

The CI on this PR is the regression test. Expecting it to pass.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES - AI was used to help locate the leftover instance reference and check that no other uses of the removed fields remain. I reviewed and understand the change.

@sreeram-11
sreeram-11 requested a review from a team as a code owner October 23, 2026 17:34
@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning CUDA Related to the CUDA backend labels Oct 23, 2026
Comment thread ggml/src/ggml-cuda/ggml-cuda.cu Resolved
Co-authored-by: Johannes Gäßler <johannesg@5d6.de>
@CISC

CISC commented Oct 23, 2026

Copy link
Copy Markdown
Member

Please fix newlines in common.cuh as well.

@jakelandau

Copy link
Copy Markdown

Same error on Windows (MSVC 19.51, CUDA 13.4, -DCMAKE_CUDA_ARCHITECTURES=120, Ninja) at 06230cb — matches #31056. Applied this PR's change locally: full build passes (all targets incl. llama-server/llama-cli) and the binaries run (llama-cli --version OK).

@ServeurpersoCom

Copy link
Copy Markdown
Contributor

Quick merge to unbreak the build. The rocm failure is a runner issue, not this change: the HIP build step stops at 47% with no compile error, then test-llama-archs is missing. The hip job, which compiles ggml-cuda.cu, is green.

@ServeurpersoCom
ServeurpersoCom merged commit 9ff0d7e into ggml-org:master Oct 23, 2026
15 of 17 checks passed
@sreeram-11
sreeram-11 deleted the sreeram/fix-cuda-graph-instance-build branch October 23, 2026 18:48
@ServeurpersoCom

Copy link
Copy Markdown
Contributor

Built it here on Linux (CUDA) and on Windows (MSVC): both compile and run again with this change, so the build is fixed.

@CISC CISC linked an issue Oct 23, 2026 that may be closed by this pull request
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 24, 2026
…31053)

* CUDA: fix build after chunked CUDA graphs (ggml-org#30804)

* Apply suggestion from @JohannesGaessler

Co-authored-by: Johannes Gäßler <johannesg@5d6.de>

* Fix newlines in common.cuh

---------

Co-authored-by: Johannes Gäßler <johannesg@5d6.de>
auRose94 pushed a commit to auRose94/llama.cpp that referenced this pull request Oct 28, 2026
…31053)

* CUDA: fix build after chunked CUDA graphs (ggml-org#30804)

* Apply suggestion from @JohannesGaessler

Co-authored-by: Johannes Gäßler <johannesg@5d6.de>

* Fix newlines in common.cuh

---------

Co-authored-by: Johannes Gäßler <johannesg@5d6.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CUDA Related to the CUDA backend ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile bug: error: class "ggml_cuda_graph" has no member "instance"

6 participants