Skip to content
Closed
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
5 changes: 3 additions & 2 deletions backends/qualcomm/runtime/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ load(
"ANDROID",
)
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//xplat/executorch/backends/qualcomm/qnn_version.bzl", "get_qnn_library_verision")

def define_common_targets():
"""Defines targets that should be shared between fbcode and xplat.
Expand Down Expand Up @@ -56,10 +57,10 @@ def define_common_targets():
platforms = [ANDROID],
visibility = ["@EXECUTORCH_CLIENTS"],
resources = {
"qnn_lib": "fbsource//third-party/qualcomm/qnn/qnn-2.25:qnn_offline_compile_libs",
"qnn_lib": "fbsource//third-party/qualcomm/qnn/qnn-{0}:qnn_offline_compile_libs".format(get_qnn_library_verision()),
},
deps = [
"fbsource//third-party/qualcomm/qnn:api",
"fbsource//third-party/qualcomm/qnn/qnn-{0}:api".format(get_qnn_library_verision()),
":logging",
"//executorch/backends/qualcomm:schema",
"//executorch/backends/qualcomm/aot/ir:qcir_utils",
Expand Down
3 changes: 3 additions & 0 deletions backends/qualcomm/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ def define_common_targets():
":schema",
],
)

def get_qnn_library_verision():
return "2.26"
3 changes: 2 additions & 1 deletion examples/models/llama2/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")
load("@fbsource//xplat/executorch/backends/qualcomm/qnn_version.bzl", "get_qnn_library_verision")

oncall("executorch")

Expand Down Expand Up @@ -69,7 +70,7 @@ runtime.python_binary(
runtime.command_alias(
name = "export_llama_qnn",
env = {
"LD_LIBRARY_PATH": "$(location fbsource//third-party/qualcomm/qnn/qnn-2.25:qnn_offline_compile_libs)",
"LD_LIBRARY_PATH": "$(location fbsource//third-party/qualcomm/qnn/qnn-{0}:qnn_offline_compile_libs)".format(get_qnn_library_verision()),
},
exe = ":export_llama",
)
Expand Down
2 changes: 2 additions & 0 deletions shim/xplat/executorch/backends/qualcomm/qnn_version.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def get_qnn_library_verision():
return "2.26"
Loading