Sync from device back to host at begin of new prompt.

This commit is contained in:
Adam Treat 2023-09-13 20:47:40 -04:00 committed by Cebtenzzre
parent bd5f6399bb
commit 4ed25b2f88

View File

@ -3820,6 +3820,10 @@ static bool llama_eval_internal(
ggml_vk_graph_compute(lctx.ctx_kompute, gf);
ggml_vk_d2h_tensor(lctx.ctx_kompute, res);
} else {
if (lctx.ctx_kompute) {
ggml_vk_d2h_tensor(lctx.ctx_kompute, kv_self.k);
ggml_vk_d2h_tensor(lctx.ctx_kompute, kv_self.v);
}
ggml_graph_compute_helper(lctx.work_buffer, gf, n_threads);
if (lctx.ctx_kompute) {
ggml_vk_h2d_tensor(lctx.ctx_kompute, kv_self.k);