Skip to content

Commit

Permalink
llama : add ggml_cont to trigger bug with Metal
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Sep 4, 2023
1 parent bd33e5a commit 4a6ad90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2387,11 +2387,11 @@ static struct ggml_cgraph * llm_build_llama(
ggml_set_name(Q, "Q");

struct ggml_tensor * K =
ggml_view_3d(ctx0, kv_self.k,
ggml_cont(ctx0, ggml_view_3d(ctx0, kv_self.k,
n_embd_head, n_past + N, n_head_kv,
ggml_element_size(kv_self.k)*n_embd_gqa,
ggml_element_size(kv_self.k)*n_embd_head,
ggml_element_size(kv_self.k)*n_embd_gqa*n_ctx*il);
ggml_element_size(kv_self.k)*n_embd_gqa*n_ctx*il));
offload_func_kq(K);
ggml_set_name(K, "K");

Expand Down

0 comments on commit 4a6ad90

Please sign in to comment.