@@ -2338,7 +2338,7 @@ static bool ggml_graph_node_has_matching_properties(ggml_tensor * node, ggml_gra
2338
2338
#endif
2339
2339
2340
2340
2341
- void evaluate_and_capture_cuda_graph (ggml_backend_cuda_context * cuda_ctx, ggml_cgraph * cgraph, bool & graph_evaluated_or_captured, bool & use_cuda_graph, bool & cuda_graph_update_required) {
2341
+ static void evaluate_and_capture_cuda_graph (ggml_backend_cuda_context * cuda_ctx, ggml_cgraph * cgraph, bool & graph_evaluated_or_captured, bool & use_cuda_graph, bool & cuda_graph_update_required) {
2342
2342
while (!graph_evaluated_or_captured) {
2343
2343
// Only perform the graph execution if CUDA graphs are not enabled, or we are capturing the graph.
2344
2344
// With the use of CUDA graphs, the execution will be performed by the graph launch.
@@ -2396,7 +2396,7 @@ void evaluate_and_capture_cuda_graph(ggml_backend_cuda_context * cuda_ctx, ggml_
2396
2396
}
2397
2397
2398
2398
2399
- void maintain_cuda_graph (ggml_backend_cuda_context * cuda_ctx, std::vector<void *> & ggml_cuda_cpy_fn_ptrs, bool cuda_graph_update_required){
2399
+ static void maintain_cuda_graph (ggml_backend_cuda_context * cuda_ctx, std::vector<void *> & ggml_cuda_cpy_fn_ptrs, bool cuda_graph_update_required) {
2400
2400
2401
2401
if (cuda_graph_update_required) {
2402
2402
@@ -2443,7 +2443,7 @@ void maintain_cuda_graph(ggml_backend_cuda_context * cuda_ctx, std::vector<void
2443
2443
}
2444
2444
2445
2445
2446
- bool is_cuda_graph_update_required (ggml_backend_cuda_context * cuda_ctx, ggml_cgraph * cgraph, bool cuda_graph_update_required){
2446
+ static bool is_cuda_graph_update_required (ggml_backend_cuda_context * cuda_ctx, ggml_cgraph * cgraph, bool cuda_graph_update_required) {
2447
2447
2448
2448
if (cuda_ctx->cuda_graph ->instance == nullptr ) {
2449
2449
cuda_graph_update_required = true ;
@@ -2472,7 +2472,7 @@ bool is_cuda_graph_update_required(ggml_backend_cuda_context * cuda_ctx, ggml_cg
2472
2472
}
2473
2473
2474
2474
2475
- bool check_node_graph_compatibility_and_refresh_copy_ops (ggml_backend_cuda_context * cuda_ctx, ggml_cgraph * cgraph, std::vector<void *> & ggml_cuda_cpy_fn_ptrs, bool use_cuda_graph){
2475
+ static bool check_node_graph_compatibility_and_refresh_copy_ops (ggml_backend_cuda_context * cuda_ctx, ggml_cgraph * cgraph, std::vector<void *> & ggml_cuda_cpy_fn_ptrs, bool use_cuda_graph) {
2476
2476
2477
2477
// Loop over nodes in GGML graph to obtain info needed for CUDA graph
2478
2478
cuda_ctx->cuda_graph ->updated_kernel_arg .clear ();
@@ -2532,7 +2532,7 @@ bool check_node_graph_compatibility_and_refresh_copy_ops(ggml_backend_cuda_conte
2532
2532
}
2533
2533
2534
2534
2535
- void update_cuda_graph_executable (ggml_backend_cuda_context * cuda_ctx) {
2535
+ static void update_cuda_graph_executable (ggml_backend_cuda_context * cuda_ctx) {
2536
2536
2537
2537
cudaGraphExecUpdateResultInfo result_info;
2538
2538
cudaError_t stat = cudaGraphExecUpdate (cuda_ctx->cuda_graph ->instance , cuda_ctx->cuda_graph ->graph , &result_info);
0 commit comments