-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
When attempting to build the QNN AAR library, the build fails due to a compilation issue caused by the misplaced declaration of the data_files_vector variable in the Android JNI layer. Specifically, the variable is declared inside an else if block, which leads to incorrect scope and build failures.
Steps to Reproduce
1. Clone the executorch-examples repository.
2. Initiate the Android build process for the QNN AAR library.
3. Observe the build error related to data_files_vector.
Build Error
The build fails in the file:
executorch/extension/android/jni/jni_layer_llama.cpp
due to the improper placement of the std::vectorstd::string data_files_vector declaration.
Expected Behavior
The Android QNN AAR library should compile successfully without scope-related errors.
Proposed Fix
Move the declaration of data_files_vector outside of the conditional block so that it remains in scope for all necessary code paths. A diff-style patch is provided in the original issue demonstrating this change.
Impact
This build issue currently blocks the generation of the Android QNN AAR library, which may affect downstream workflows that depend on Android support.