Skip to content

Commit b23ee01

Browse files
authored
Register LLM prefill native method in JNI
We added API in Java. Need to register in JNI as well Pull Request resolved: #5201
1 parent d2014e3 commit b23ee01

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

extension/android/jni/jni_layer_llama.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,12 @@ class ExecuTorchLlamaJni
285285
makeNativeMethod("generate", ExecuTorchLlamaJni::generate),
286286
makeNativeMethod("stop", ExecuTorchLlamaJni::stop),
287287
makeNativeMethod("load", ExecuTorchLlamaJni::load),
288+
makeNativeMethod(
289+
"prefillImagesNative", ExecuTorchLlamaJni::prefill_images),
290+
makeNativeMethod(
291+
"prefillPromptNative", ExecuTorchLlamaJni::prefill_prompt),
292+
makeNativeMethod(
293+
"generateFromPos", ExecuTorchLlamaJni::generate_from_pos),
288294
});
289295
}
290296
};

0 commit comments

Comments
 (0)