mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-10 08:04:34 +00:00
test
This commit is contained in:
parent
976a4c3534
commit
766ec7862b
4 changed files with 27 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "json.hpp"
|
||||
#include "json-schema-to-grammar.h"
|
||||
#include "llama.h"
|
||||
#include "profile.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
|
@ -833,6 +834,10 @@ struct llama_init_result llama_init_from_gpt_params(gpt_params & params) {
|
|||
model = llama_load_model_from_file(params.model.c_str(), mparams);
|
||||
}
|
||||
|
||||
// profile devices and determine the best setup
|
||||
uint32_t n_cpu_cores = profiler::get_cpu_core_count();
|
||||
LOG_INF("Number of CPU cores on this device: %i\n", n_cpu_cores);
|
||||
|
||||
if (model == NULL) {
|
||||
LOG_ERR("%s: failed to load model '%s'\n", __func__, params.model.c_str());
|
||||
return iparams;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue