File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,14 @@ if(EXECUTORCH_BUILD_LLAMA_JNI)
58
58
add_library (llama_runner STATIC IMPORTED )
59
59
set_property (TARGET llama_runner PROPERTY IMPORTED_LOCATION ${LLAMA_RUNNER_PATH} )
60
60
61
+ set (CUSTOM_OPS_LIB_PATH ${CMAKE_CURRENT_BINARY_DIR} /../../examples/models/llama2/custom_ops/libcustom_ops_lib.a )
62
+ add_library (custom_ops_lib STATIC IMPORTED )
63
+ set_property (TARGET custom_ops_lib PROPERTY IMPORTED_LOCATION ${CUSTOM_OPS_LIB_PATH} )
64
+
61
65
set (CUSTOM_OPS_PATH ${CMAKE_CURRENT_BINARY_DIR} /../../examples/models/llama2/custom_ops/libcustom_ops.a )
62
66
add_library (custom_ops STATIC IMPORTED )
63
67
set_property (TARGET custom_ops PROPERTY IMPORTED_LOCATION ${CUSTOM_OPS_PATH} )
68
+ target_link_options_shared_lib (custom_ops_lib )
64
69
65
70
if (TARGET pthreadpool )
66
71
set (LLAMA_JNI_SRCS jni/jni_layer_llama.cpp ../../backends/xnnpack/threadpool/cpuinfo_utils.cpp )
@@ -77,6 +82,6 @@ if(EXECUTORCH_BUILD_LLAMA_JNI)
77
82
endif ()
78
83
target_include_directories (executorch_llama_jni PRIVATE ${_common_include_directories} )
79
84
target_link_libraries (executorch_llama_jni ${link_libraries} llama_runner
80
- custom_ops cpublas eigen_blas )
85
+ custom_ops custom_ops_lib cpublas eigen_blas )
81
86
target_compile_options (executorch_llama_jni PUBLIC ${_common_compile_options} )
82
87
endif ()
You can’t perform that action at this time.
0 commit comments