Просмотр исходного кода

cuda : print less debug logs when disabling cuda graphs (#18868)

Georgi Gerganov 2 недель назад
Родитель
Сommit
6e7fc8a146
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      ggml/src/ggml-cuda/ggml-cuda.cu

+ 3 - 1
ggml/src/ggml-cuda/ggml-cuda.cu

@@ -3730,8 +3730,10 @@ static bool ggml_cuda_graph_set_enabled(ggml_backend_cuda_context * cuda_ctx) {
 
 
     if (cuda_ctx->cuda_graph->graph == nullptr) {
     if (cuda_ctx->cuda_graph->graph == nullptr) {
         if (ggml_cuda_info().devices[cuda_ctx->device].cc < GGML_CUDA_CC_AMPERE) {
         if (ggml_cuda_info().devices[cuda_ctx->device].cc < GGML_CUDA_CC_AMPERE) {
+            if (!cuda_ctx->cuda_graph->disable_due_to_gpu_arch) {
+                GGML_LOG_DEBUG("%s: disabling CUDA graphs due to GPU architecture\n", __func__);
+            }
             cuda_ctx->cuda_graph->disable_due_to_gpu_arch = true;
             cuda_ctx->cuda_graph->disable_due_to_gpu_arch = true;
-            GGML_LOG_DEBUG("%s: disabling CUDA graphs due to GPU architecture\n", __func__);
         }
         }
     }
     }