Skip to content

Commit

Permalink
Fix compilation for whisper.cpp due to 8th arg for FA
Browse files Browse the repository at this point in the history
I don't know if whispers still works with FA, nor will I check tonight.
But it compiles.
  • Loading branch information
Nexesenex committed Aug 26, 2024
1 parent fa07c22 commit f62ffb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions otherarch/whispercpp/whisper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,7 @@ static struct ggml_cgraph * whisper_build_graph_encoder(
ggml_element_size(kv_pad.v)*n_state_head,
0);

cur = ggml_flash_attn_ext(ctx0, Q, K, V, nullptr, KQscale, 0.0f);
cur = ggml_flash_attn_ext(ctx0, Q, K, V, nullptr, KQscale, 0.0f, 0.0f);

cur = ggml_reshape_2d(ctx0, cur, n_state, n_ctx);
} else {
Expand Down Expand Up @@ -2471,7 +2471,7 @@ static struct ggml_cgraph * whisper_build_graph_decoder(
ggml_element_size(kv_self.v)*n_state_head,
ggml_element_size(kv_self.v)*n_state*n_ctx*il);

cur = ggml_flash_attn_ext(ctx0, Q, K, V, KQ_mask_f16, 1.0f, 0.0f);
cur = ggml_flash_attn_ext(ctx0, Q, K, V, KQ_mask_f16, 1.0f, 0.0f, 0.0f);

cur = ggml_reshape_2d(ctx0, cur, n_state, n_tokens);
} else {
Expand Down Expand Up @@ -2553,7 +2553,7 @@ static struct ggml_cgraph * whisper_build_graph_decoder(
ggml_element_size(wstate.kv_cross.v)*n_state_head,
ggml_element_size(wstate.kv_cross.v)*n_state*n_audio_ctx_pad*il);

cur = ggml_flash_attn_ext(ctx0, Q, Kcross, Vcross, nullptr, KQscale, 0.0f);
cur = ggml_flash_attn_ext(ctx0, Q, Kcross, Vcross, nullptr, KQscale, 0.0f, 0.0f);

cur = ggml_reshape_2d(ctx0, cur, n_state, n_tokens);
} else {
Expand Down

0 comments on commit f62ffb1

Please sign in to comment.