Closed wereretot closed 4 months ago
Moving the do_log declaration:
static bool do_log = true;
up above the pretty_progress function declaraion on 212 fixes this up for me. Odd that the compiler cares.
diff --git a/otherarch/sdcpp/util.cpp b/otherarch/sdcpp/util.cpp
index 55c4adea..df676b58 100644
--- a/otherarch/sdcpp/util.cpp
+++ b/otherarch/sdcpp/util.cpp
@@ -207,6 +207,7 @@ std::string path_join(const std::string& p1, const std::string& p2) {
return p1 + "/" + p2;
}
+static bool do_log = true;
void pretty_progress(int step, int steps, float time) {
if (step == 0) {
return;
@@ -260,7 +261,6 @@ void* sd_log_cb_data = NULL;
#define LOG_BUFFER_SIZE 1024
-static bool do_log = true;
void log_message(const char* format, ...) {
if (do_log) {
printf("\n");
sorry, it was a WIP commit. It should be working now.
In file included from otherarch/sdcpp/sdtype_adapter.cpp:16: otherarch/sdcpp/util.cpp: In function ‘void pretty_progress(int, int, float)’: otherarch/sdcpp/util.cpp:214:9: error: ‘do_log’ was not declared in this scope 214 | if(!do_log) | ^
~g++ -I. -I./common -I./include -I./include/CL -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/sdcpp/thirdparty -I./include/vulkan -O3 -DNDEBUG -std=c++11 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -pthread -s -Wno-multichar -Wno-write-strings -Wno-deprecated -Wno-deprecated-declarations -pthread -DGGML_USE_CUBLAS -DSD_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I/opt/cuda/targets/x86_64-linux/include -c otherarch/sdcpp/sdtype_adapter.cpp -o sdcpp_cublas.o make: [Makefile:484: sdcpp_default.o] Error 1 make: Waiting for unfinished jobs.... In file included from otherarch/sdcpp/sdtype_adapter.cpp:16: otherarch/sdcpp/util.cpp: In function ‘void pretty_progress(int, int, float)’: otherarch/sdcpp/util.cpp:214:9: error: ‘do_log’ was not declared in this scope 214 | if(!do_log) | ^~make: *** [Makefile:486: sdcpp_cublas.o] Error 1