From 62c99fd8d77ce6898973015821dfc507dfded7f3 Mon Sep 17 00:00:00 2001 From: xfwu Date: Sat, 23 Mar 2024 20:08:12 +0800 Subject: [PATCH] Description: [bugfix] building error with Windows+ROCm5.7+Cmake Bug Description: function LOG defined in common/log.h used in ngram-cache.cpp possibly cause the building error on Windows Platform Building CXX object common/CMakeFiles/common.dir/ngram-cache.cpp.obj FAILED: common/CMakeFiles/common.dir/ngram-cache.cpp.obj llama/llama.cpp/common/./log.h:469:5: error: expected ')' function fprintf used in common/ngram-cache.cpp may cause the same error Solve Method: remove the including of log.h in ngram-cache.cpp remove the function call LOG in ngram-cache.cpp remove the function call fprintf in ngram-cache.cpp Changes to be committed: modified: common/ngram-cache.cpp --- common/ngram-cache.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/ngram-cache.cpp b/common/ngram-cache.cpp index 20703d306..cd7e9ba93 100644 --- a/common/ngram-cache.cpp +++ b/common/ngram-cache.cpp @@ -1,5 +1,4 @@ #include "ngram-cache.h" -#include "log.h" #include @@ -39,7 +38,6 @@ void llama_ngram_cache_update(llama_ngram_cache & ngram_cache, int ngram_min, in const int64_t eta_min = eta_ms / (60*1000); const int64_t eta_s = (eta_ms - 60*1000*eta_min) / 1000; - fprintf(stderr, "%s: %" PRId64 "/%" PRId64 " done, ETA: %02" PRId64 ":%02" PRId64 "\n", __func__, n_done, n_todo, eta_min, eta_s); } } } @@ -186,7 +184,7 @@ void llama_ngram_cache_draft( break; } - LOG(" - draft candidate: token=%d\n", drafted_token); + // LOG(" - draft candidate: token=%d\n", drafted_token); draft.push_back(drafted_token); } }