Skip to content

Commit fcd62d9

Browse files
committed
Style: Consolidates several neighboring '#ifdef USE_CUDA_GRAPH' into a single one
1 parent 98d4e55 commit fcd62d9

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

ggml/src/ggml-cuda/ggml-cuda.cu

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,10 +2345,8 @@ static bool check_node_graph_compatibility_and_refresh_copy_ops(ggml_backend_cud
23452345

23462346
return use_cuda_graph;
23472347
}
2348-
#endif
23492348

23502349

2351-
#ifdef USE_CUDA_GRAPH
23522350
static void set_ggml_graph_node_properties(ggml_tensor * node, ggml_graph_node_properties * graph_node_properties) {
23532351
graph_node_properties->node_address = node->data;
23542352
graph_node_properties->node_op = node->op;
@@ -2399,10 +2397,8 @@ static bool ggml_graph_node_has_matching_properties(ggml_tensor * node, ggml_gra
23992397

24002398
return true;
24012399
}
2402-
#endif
24032400

24042401

2405-
#ifdef USE_CUDA_GRAPH
24062402
static void maintain_cuda_graph(ggml_backend_cuda_context * cuda_ctx, std::vector<void *> & ggml_cuda_cpy_fn_ptrs, bool cuda_graph_update_required) {
24072403

24082404
if (cuda_graph_update_required) {
@@ -2447,10 +2443,8 @@ static void maintain_cuda_graph(ggml_backend_cuda_context * cuda_ctx, std::vecto
24472443
}
24482444
}
24492445
}
2450-
#endif
24512446

24522447

2453-
#ifdef USE_CUDA_GRAPH
24542448
static bool is_cuda_graph_update_required(ggml_backend_cuda_context * cuda_ctx, ggml_cgraph * cgraph, bool cuda_graph_update_required) {
24552449

24562450
if (cuda_ctx->cuda_graph->instance == nullptr) {
@@ -2478,10 +2472,8 @@ static bool is_cuda_graph_update_required(ggml_backend_cuda_context * cuda_ctx,
24782472

24792473
return cuda_graph_update_required;
24802474
}
2481-
#endif
24822475

24832476

2484-
#ifdef USE_CUDA_GRAPH
24852477
static void update_cuda_graph_executable(ggml_backend_cuda_context * cuda_ctx) {
24862478

24872479
cudaGraphExecUpdateResultInfo result_info;

0 commit comments

Comments
 (0)