Skip to content

Commit

Permalink
ggml : adjust is_first_call init value (#10193)
Browse files Browse the repository at this point in the history
ggml-ci
  • Loading branch information
ggerganov authored Nov 6, 2024
1 parent a1eaf6a commit 1dc04b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ggml/src/ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -1407,11 +1407,11 @@ 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 bool is_first_call = false;
static bool is_first_call = true;

ggml_critical_section_start();

if (!is_first_call) {
if (is_first_call) {
// initialize time system (required on Windows)
ggml_time_init();

Expand All @@ -1422,7 +1422,8 @@ struct ggml_context * ggml_init(struct ggml_init_params params) {
} u = {i};
ggml_table_f32_f16[i] = GGML_COMPUTE_FP16_TO_FP32(u.fp16);
}
is_first_call = true;

is_first_call = false;
}

ggml_critical_section_end();
Expand Down

0 comments on commit 1dc04b2

Please sign in to comment.