mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-07 17:21:46 +00:00
revert synchronization change to ggml_init
Some checks failed
flake8 Lint / Lint (push) Has been cancelled
Some checks failed
flake8 Lint / Lint (push) Has been cancelled
This commit is contained in:
parent
673f95bd04
commit
0825ba2fca
@ -1402,9 +1402,10 @@ static inline bool ggml_can_repeat_rows(const struct ggml_tensor * t0, const str
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct ggml_context * ggml_init(struct ggml_init_params params) {
|
||||
static volatile bool is_first_call = false;
|
||||
if (!is_first_call) {
|
||||
static bool is_first_call = false;
|
||||
|
||||
ggml_critical_section_start();
|
||||
|
||||
if (!is_first_call) {
|
||||
// initialize time system (required on Windows)
|
||||
ggml_time_init();
|
||||
@ -1418,8 +1419,8 @@ struct ggml_context * ggml_init(struct ggml_init_params params) {
|
||||
}
|
||||
is_first_call = true;
|
||||
}
|
||||
|
||||
ggml_critical_section_end();
|
||||
}
|
||||
|
||||
struct ggml_context * ctx = GGML_MALLOC(sizeof(struct ggml_context));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user