|
| 1 | +load("@fbsource//tools/build_defs/android:fb_android_cxx_library.bzl", "fb_android_cxx_library") |
| 2 | +load("@fbsource//xplat/executorch/codegen:codegen.bzl", "executorch_generated_lib") |
| 3 | + |
| 4 | +oncall("executorch") |
| 5 | + |
| 6 | +executorch_generated_lib( |
| 7 | + name = "generated_op_lib_optimized", |
| 8 | + custom_ops_aten_kernel_deps = [ |
| 9 | + "//executorch/kernels/portable:operators_aten", |
| 10 | + ], |
| 11 | + custom_ops_yaml_target = "//executorch/kernels/portable:custom_ops.yaml", |
| 12 | + define_static_targets = True, |
| 13 | + fallback_yaml_target = "//executorch/kernels/portable:functions.yaml", |
| 14 | + functions_yaml_target = "//executorch/kernels/optimized:optimized.yaml", |
| 15 | + visibility = ["PUBLIC"], |
| 16 | + deps = [ |
| 17 | + "//executorch/kernels/optimized:optimized_operators", |
| 18 | + "//executorch/kernels/optimized:optimized_oplist", |
| 19 | + "//executorch/kernels/portable:executorch_aten_ops", |
| 20 | + "//executorch/kernels/portable:executorch_custom_ops", |
| 21 | + "//executorch/kernels/portable:operators", |
| 22 | + ], |
| 23 | +) |
| 24 | + |
| 25 | +fb_android_cxx_library( |
| 26 | + name = "executorch_jni", |
| 27 | + srcs = ["jni_layer.cpp"], |
| 28 | + headers = ["jni_layer_constants.h"], |
| 29 | + allow_jni_merging = False, |
| 30 | + compiler_flags = [ |
| 31 | + "-frtti", |
| 32 | + "-fexceptions", |
| 33 | + ], |
| 34 | + soname = "libexecutorch.$(ext)", |
| 35 | + visibility = ["PUBLIC"], |
| 36 | + deps = [ |
| 37 | + "//fbandroid/libraries/fbjni:fbjni", |
| 38 | + "//fbandroid/native/fb:fb", |
| 39 | + "//third-party/glog:glog", |
| 40 | + "//xplat/executorch/extension/module:module_static", |
| 41 | + "//xplat/executorch/extension/runner_util:managed_tensor_static", |
| 42 | + ], |
| 43 | +) |
| 44 | + |
| 45 | +fb_android_cxx_library( |
| 46 | + name = "executorch_jni_full", |
| 47 | + srcs = ["jni_layer.cpp"], |
| 48 | + headers = ["jni_layer_constants.h"], |
| 49 | + allow_jni_merging = False, |
| 50 | + compiler_flags = [ |
| 51 | + "-frtti", |
| 52 | + "-fexceptions", |
| 53 | + ], |
| 54 | + soname = "libexecutorch.$(ext)", |
| 55 | + visibility = ["PUBLIC"], |
| 56 | + deps = [ |
| 57 | + ":generated_op_lib_optimized_static", |
| 58 | + "//fbandroid/libraries/fbjni:fbjni", |
| 59 | + "//fbandroid/native/fb:fb", |
| 60 | + "//third-party/glog:glog", |
| 61 | + "//xplat/executorch/backends/xnnpack:xnnpack_backend_static", |
| 62 | + "//xplat/executorch/extension/module:module_static", |
| 63 | + "//xplat/executorch/extension/runner_util:managed_tensor_static", |
| 64 | + ], |
| 65 | +) |
| 66 | + |
| 67 | +fb_android_cxx_library( |
| 68 | + name = "executorch_llama_jni", |
| 69 | + srcs = ["jni_layer_llama.cpp"], |
| 70 | + allow_jni_merging = False, |
| 71 | + compiler_flags = [ |
| 72 | + "-frtti", |
| 73 | + "-fexceptions", |
| 74 | + "-Wno-format", |
| 75 | + ], |
| 76 | + soname = "libexecutorch_llama_jni.$(ext)", |
| 77 | + visibility = ["PUBLIC"], |
| 78 | + deps = [ |
| 79 | + "//fbandroid/libraries/fbjni:fbjni", |
| 80 | + "//fbandroid/native/fb:fb", |
| 81 | + "//third-party/glog:glog", |
| 82 | + "//xplat/executorch/examples/models/llama2/runner:runner_static", |
| 83 | + "//xplat/executorch/examples/models/llava/runner:runner_static", |
| 84 | + "//xplat/executorch/extension/threadpool:cpuinfo_utils_static", |
| 85 | + "//xplat/executorch/extension/threadpool:threadpool_static", |
| 86 | + ], |
| 87 | +) |
0 commit comments