Skip to content

Commit 1dc04b2

Browse files
authored
ggml : adjust is_first_call init value (#10193)
ggml-ci
1 parent a1eaf6a commit 1dc04b2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ggml/src/ggml.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,11 +1407,11 @@ static inline bool ggml_can_repeat_rows(const struct ggml_tensor * t0, const str
14071407
////////////////////////////////////////////////////////////////////////////////
14081408

14091409
struct ggml_context * ggml_init(struct ggml_init_params params) {
1410-
static bool is_first_call = false;
1410+
static bool is_first_call = true;
14111411

14121412
ggml_critical_section_start();
14131413

1414-
if (!is_first_call) {
1414+
if (is_first_call) {
14151415
// initialize time system (required on Windows)
14161416
ggml_time_init();
14171417

@@ -1422,7 +1422,8 @@ struct ggml_context * ggml_init(struct ggml_init_params params) {
14221422
} u = {i};
14231423
ggml_table_f32_f16[i] = GGML_COMPUTE_FP16_TO_FP32(u.fp16);
14241424
}
1425-
is_first_call = true;
1425+
1426+
is_first_call = false;
14261427
}
14271428

14281429
ggml_critical_section_end();

0 commit comments

Comments
 (0)