revert synchronization change to ggml_init
This commit is contained in:
parent
673f95bd04
commit
0825ba2fca
1 changed files with 16 additions and 15 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue