Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 44 additions & 40 deletions backends/qualcomm/runtime/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,45 +35,49 @@ def define_common_targets():
],
)

runtime.cxx_library(
name = "runtime",
srcs = glob(
[
"*.cpp",
"backends/*.cpp",
"backends/htpbackend/*.cpp",
"backends/htpbackend/aarch64/*.cpp",
# "runtime" target is used for offline compile, can be renamed to runtime_aot_build as a BE.
for include_aot_qnn_lib in (True, False):
qnn_build_suffix = ("" if include_aot_qnn_lib else "_android_build")
runtime.cxx_library(
name = "runtime" + qnn_build_suffix,
srcs = glob(
[
"*.cpp",
"backends/*.cpp",
"backends/htpbackend/*.cpp",
"backends/htpbackend/aarch64/*.cpp",
],
exclude = ["Logging.cpp"],
),
exported_headers = glob(
[
"*.h",
"backends/*.h",
"backends/htpbackend/*.h",
],
exclude = ["Logging.h"],
),
define_static_target = True,
link_whole = True, # needed for executorch/examples/models/llama:main to register QnnBackend
platforms = [ANDROID],
visibility = ["@EXECUTORCH_CLIENTS"],
resources = ({
"qnn_lib": "fbsource//third-party/qualcomm/qnn/qnn-{0}:qnn_offline_compile_libs".format(get_qnn_library_verision()),
} if include_aot_qnn_lib else {
}),
deps = [
"fbsource//third-party/qualcomm/qnn/qnn-{0}:api".format(get_qnn_library_verision()),
":logging",
"//executorch/backends/qualcomm:schema",
"//executorch/backends/qualcomm:qc_binary_info_schema",
"//executorch/backends/qualcomm/aot/ir:qcir_utils",
"//executorch/backends/qualcomm/aot/wrappers:wrappers",
"//executorch/runtime/backend:interface",
"//executorch/runtime/core:core",
"//executorch/extension/tensor:tensor",
],
exclude = ["Logging.cpp"],
),
exported_headers = glob(
[
"*.h",
"backends/*.h",
"backends/htpbackend/*.h",
exported_deps = [
"//executorch/runtime/core/exec_aten/util:scalar_type_util",
"//executorch/runtime/core:event_tracer",
],
exclude = ["Logging.h"],
),
define_static_target = True,
link_whole = True, # needed for executorch/examples/models/llama:main to register QnnBackend
platforms = [ANDROID],
visibility = ["@EXECUTORCH_CLIENTS"],
resources = {
"qnn_lib": "fbsource//third-party/qualcomm/qnn/qnn-{0}:qnn_offline_compile_libs".format(get_qnn_library_verision()),
},
deps = [
"fbsource//third-party/qualcomm/qnn/qnn-{0}:api".format(get_qnn_library_verision()),
":logging",
"//executorch/backends/qualcomm:schema",
"//executorch/backends/qualcomm:qc_binary_info_schema",
"//executorch/backends/qualcomm/aot/ir:qcir_utils",
"//executorch/backends/qualcomm/aot/wrappers:wrappers",
"//executorch/runtime/backend:interface",
"//executorch/runtime/core:core",
"//executorch/extension/tensor:tensor",
],
exported_deps = [
"//executorch/runtime/core/exec_aten/util:scalar_type_util",
"//executorch/runtime/core:event_tracer",
],
)
)
2 changes: 1 addition & 1 deletion backends/qualcomm/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def define_common_targets():
"fbsource//third-party/qualcomm/qnn/qnn-{0}:api".format(get_qnn_library_verision()),
"//executorch/runtime/backend:interface",
"//executorch/runtime/core:core",
"//executorch/backends/qualcomm/runtime:runtime",
"//executorch/backends/qualcomm/runtime:runtime_android_build",
],
exported_deps = [
":schema",
Expand Down