summaryrefslogtreecommitdiff
path: root/examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
diff options
context:
space:
mode:
Diffstat (limited to 'examples/llama.swiftui/llama.cpp.swift/LibLlama.swift')
-rw-r--r--examples/llama.swiftui/llama.cpp.swift/LibLlama.swift2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/llama.swiftui/llama.cpp.swift/LibLlama.swift b/examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
index 58fcf40c..c249291a 100644
--- a/examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
+++ b/examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
@@ -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()
@@ -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()