diff --git a/ggml/src/ggml-cuda/common.cuh b/ggml/src/ggml-cuda/common.cuh index e82777c35..1e8b50321 100644 --- a/ggml/src/ggml-cuda/common.cuh +++ b/ggml/src/ggml-cuda/common.cuh @@ -1140,7 +1140,7 @@ struct ggml_cuda_graph_node_properties { }; static_assert(std::is_trivial::value, "ggml_cuda_graph_node_properties must be trivial"); - +static bool cugraph_warned_rec = false; struct ggml_cuda_graph { #ifdef USE_CUDA_GRAPH ~ggml_cuda_graph() { @@ -1172,8 +1172,12 @@ struct ggml_cuda_graph { } else { number_consecutive_updates = 0; } - if (number_consecutive_updates >= 4 && !disable_due_to_too_many_updates) { - GGML_LOG_DEBUG("%s: disabling CUDA graphs due to too many consecutive updates\n", __func__); + if (number_consecutive_updates >= 4) { + if(!cugraph_warned_rec) + { + cugraph_warned_rec = true; + GGML_LOG_DEBUG("%s: disabling CUDA graphs due to too many consecutive updates\n", __func__); + } disable_due_to_too_many_updates = true; } }