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

* CUDA: fix build after chunked CUDA graphs (#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>
This commit is contained in:
SreeramandJohannes Gäßler authored and GitHub committed 2026-10-23 20:47:20 +02:00
1 parent 06230cb877
commit 9ff0d7e90f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1268,7 +1268,7 @@ struct ggml_cuda_graph {
CUDA_CHECK(cudaGraphExecDestroy(instance));
}
}
// the ggml graph is captured as a series of CUDA graphs, so the GPU can run one chunk while the next is enqueued
// the ggml graph is captured as a series of CUDA graphs, so the GPU can run one chunk while the next is enqueued
std::vector<cudaGraphExec_t> instances;
size_t num_nodes = 0;
std::vector<cudaGraphNode_t> nodes;
+1 -1
View File
@@ -496,7 +496,7 @@ struct ggml_cuda_pool_leg : public ggml_cuda_pool {
#ifdef USE_CUDA_GRAPH
int n_captured = 0;
for (const auto & [key, graph] : ctx.cuda_graphs) {
n_captured += graph->instance != nullptr;
n_captured += graph->instances.size();
}
if (n_captured > 0) {
GGML_LOG_DEBUG(GGML_CUDA_NAME " pool[%d]: memory freed, %d captured CUDA graphs must be captured again\n", device, n_captured);