Skip to content

Commit

Permalink
swiftui : sync after decode
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Mar 13, 2024
1 parent b25a0f1 commit 529e749
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ actor LlamaContext {
if llama_decode(context, batch) != 0 {
print("llama_decode() failed during prompt")
}
llama_synchronize(context)

let t_pp_end = ggml_time_us()

Expand All @@ -240,6 +241,7 @@ actor LlamaContext {
if llama_decode(context, batch) != 0 {
print("llama_decode() failed during text generation")
}
llama_synchronize(context)
}

let t_tg_end = ggml_time_us()
Expand Down

0 comments on commit 529e749

Please sign in to comment.