File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1172,7 +1172,7 @@ struct ggml_cuda_graph {
11721172 } else {
11731173 number_consecutive_updates = 0 ;
11741174 }
1175- if (number_consecutive_updates >= 4 ) {
1175+ if (number_consecutive_updates >= 4 && !disable_due_to_too_many_updates ) {
11761176 GGML_LOG_DEBUG (" %s: disabling CUDA graphs due to too many consecutive updates\n " , __func__);
11771177 disable_due_to_too_many_updates = true ;
11781178 }
Original file line number Diff line number Diff line change @@ -3929,13 +3929,18 @@ static void ggml_cuda_graph_evaluate_and_capture(ggml_backend_cuda_context * cud
39293929}
39303930
39313931#ifdef USE_CUDA_GRAPH
3932+ static bool cugraph_warned = false ;
39323933static bool ggml_cuda_graph_set_enabled (ggml_backend_cuda_context * cuda_ctx, const void * graph_key) {
39333934 ggml_cuda_graph * graph = cuda_ctx->cuda_graph (graph_key);
39343935
39353936 if (graph->graph == nullptr ) {
39363937 if (ggml_cuda_info ().devices [cuda_ctx->device ].cc < GGML_CUDA_CC_AMPERE) {
39373938 if (!graph->disable_due_to_gpu_arch ) {
3938- GGML_LOG_DEBUG (" %s: disabling CUDA graphs due to GPU architecture\n " , __func__);
3939+ if (!cugraph_warned)
3940+ {
3941+ cugraph_warned = true ;
3942+ GGML_LOG_DEBUG (" %s: disabling CUDA graphs due to GPU architecture\n " , __func__);
3943+ }
39393944 }
39403945 graph->disable_due_to_gpu_arch = true ;
39413946 }
You can’t perform that action at this time.
0 commit comments