Set thread counts after loading model (#836)

This commit is contained in:
Ettore Di Giacinto 2023-06-05 21:35:40 +02:00 committed by GitHub
parent fdffad9efe
commit 44dc1ade62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,11 +24,11 @@ void* load_model(const char *fname, int n_threads) {
__func__, new_error.message); __func__, new_error.message);
return nullptr; return nullptr;
} }
llmodel_setThreadCount(model, n_threads);
if (!llmodel_loadModel(model, fname)) { if (!llmodel_loadModel(model, fname)) {
return nullptr; return nullptr;
} }
llmodel_setThreadCount(model, n_threads);
return model; return model;
} }