| 348 | } |
| 349 | |
| 350 | void common_init() { |
| 351 | llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { |
| 352 | if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { |
| 353 | common_log_add(common_log_main(), level, "%s", text); |
| 354 | } |
| 355 | }, NULL); |
| 356 | |
| 357 | #ifdef NDEBUG |
| 358 | const char * build_type = ""; |
| 359 | #else |
| 360 | const char * build_type = " (debug)"; |
| 361 | #endif |
| 362 | |
| 363 | LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); |
| 364 | } |
| 365 | |
| 366 | std::string common_params_get_system_info(const common_params & params) { |
| 367 | std::ostringstream os; |