Skip to content

Commit

Permalink
ci : see if this is causing the crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Sep 11, 2023
1 parent 06d1d28 commit 4d9acc6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions whisper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2733,6 +2733,8 @@ struct whisper_state * whisper_init_state(whisper_context * ctx) {
log("%s: kv self size = %7.2f MB\n", __func__, memory_size / 1024.0 / 1024.0);
}

log("debug CI - checkpoint 0\n");

if (!kv_cache_init(ctx->model.hparams, state->kv_cross, ctx->itype, ctx->model.hparams.n_audio_ctx)) {
log("%s: kv_cache_init() failed for cross-attention cache\n", __func__);
delete state;
Expand All @@ -2744,6 +2746,8 @@ struct whisper_state * whisper_init_state(whisper_context * ctx) {
log("%s: kv cross size = %7.2f MB\n", __func__, memory_size / 1024.0 / 1024.0);
}

log("debug CI - checkpoint 1\n");

#ifdef WHISPER_USE_COREML
const auto path_coreml = whisper_get_coreml_path_encoder(ctx->path_model);

Expand All @@ -2761,24 +2765,41 @@ struct whisper_state * whisper_init_state(whisper_context * ctx) {
}
#endif

log("debug CI - checkpoint 2\n");

state->logits.reserve(ctx->vocab.n_vocab * ctx->model.hparams.n_text_ctx);

log("debug CI - checkpoint 3\n");

state->logits_id.reserve(ctx->model.hparams.n_vocab);

log("debug CI - checkpoint 4\n");

// TAGS: WHISPER_DECODER_INIT
state->decoders[0].sequence.tokens.reserve(ctx->model.hparams.n_text_ctx);

log("debug CI - checkpoint 5\n");

state->decoders[0].probs.reserve(ctx->vocab.n_vocab);
state->decoders[0].logits.reserve(ctx->vocab.n_vocab);
state->decoders[0].logprobs.reserve(ctx->vocab.n_vocab);

log("debug CI - checkpoint 6\n");

state->buf_compute.resize(ggml_tensor_overhead()*GGML_MAX_NODES + ggml_graph_overhead());

log("debug CI - checkpoint 7\n");

static const size_t tensor_alignment = 32;

log("debug CI - checkpoint 8\n");

state->alloc_encode = ggml_allocr_new_measure(tensor_alignment);
log("debug CI - checkpoint 9\n");
state->alloc_encode_post = ggml_allocr_new_measure(tensor_alignment);
log("debug CI - checkpoint 10\n");
state->alloc_decode = ggml_allocr_new_measure(tensor_alignment);
log("debug CI - checkpoint 11\n");

// encoder allocator
{
Expand Down

0 comments on commit 4d9acc6

Please sign in to comment.