Skip to content

Commit 793180f

Browse files
authored
Fix QNN AAR (#16303)
1 parent c61b2ed commit 793180f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

extension/android/jni/jni_layer_llama.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ class ExecuTorchLlmJni : public facebook::jni::HybridClass<ExecuTorchLlmJni> {
171171
#endif
172172

173173
model_type_category_ = model_type_category;
174+
std::vector<std::string> data_files_vector;
174175
if (model_type_category == MODEL_TYPE_CATEGORY_MULTIMODAL) {
175176
multi_modal_runner_ = llm::create_multimodal_runner(
176177
model_path->toStdString().c_str(),
177178
llm::load_tokenizer(tokenizer_path->toStdString()));
178179
} else if (model_type_category == MODEL_TYPE_CATEGORY_LLM) {
179-
std::vector<std::string> data_files_vector;
180180
if (data_files != nullptr) {
181181
// Convert Java List<String> to C++ std::vector<string>
182182
auto list_class = facebook::jni::findClassStatic("java/util/List");
@@ -209,6 +209,7 @@ class ExecuTorchLlmJni : public facebook::jni::HybridClass<ExecuTorchLlmJni> {
209209
decoder_model.c_str(),
210210
model_path->toStdString().c_str(),
211211
tokenizer_path->toStdString().c_str(),
212+
"",
212213
"");
213214
model_type_category_ = MODEL_TYPE_CATEGORY_LLM;
214215
#endif

scripts/build_android_library.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ build_android_native_library() {
6666

6767
# Copy QNN related so library
6868
if [ -n "$QNN_SDK_ROOT" ] && [ "$ANDROID_ABI" == "arm64-v8a" ]; then
69-
cp "${CMAKE_OUT}"/lib/libqnn_executorch_backend.so ${SO_STAGE_DIR}
69+
cp "${CMAKE_OUT}"/lib/executorch/backends/qualcomm/libqnn_executorch_backend.so ${SO_STAGE_DIR}
7070
fi
7171

7272
# Copy MTK related so library

0 commit comments

Comments
 (0)