Skip to content

Commit dd95edf

Browse files
committed
Refactor: Removes code permanently excluded from compilation to increase readability.
1 parent 0cdc133 commit dd95edf

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,19 +2543,8 @@ static void evaluate_and_capture_cuda_graph(ggml_backend_cuda_context * cuda_ctx
25432543
CUDA_CHECK(cudaGraphDestroy(cuda_ctx->cuda_graph->graph));
25442544
cuda_ctx->cuda_graph->graph = nullptr;
25452545
}
2546-
CUDA_CHECK(cudaStreamEndCapture(cuda_ctx->stream(), &cuda_ctx->cuda_graph->graph));
25472546

2548-
#if 0
2549-
if (disable_cuda_graphs_due_to_failed_capture) {
2550-
use_cuda_graph = false;
2551-
cuda_ctx->cuda_graph->disable_due_to_failed_graph_capture = true;
2552-
#ifndef NDEBUG
2553-
GGML_LOG_DEBUG("%s: disabling CUDA graphs due to failed graph capture\n", __func__);
2554-
#endif
2555-
} else {
2556-
graph_evaluated_or_captured = true; // CUDA graph has been captured
2557-
}
2558-
#endif
2547+
CUDA_CHECK(cudaStreamEndCapture(cuda_ctx->stream(), &cuda_ctx->cuda_graph->graph));
25592548
graph_evaluated_or_captured = true; // CUDA graph has been captured
25602549
} else {
25612550
graph_evaluated_or_captured = true; // ggml graph has been directly evaluated

0 commit comments

Comments
 (0)