forked from pytorch/executorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtargets.bzl
More file actions
62 lines (56 loc) · 1.91 KB
/
targets.bzl
File metadata and controls
62 lines (56 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "get_oss_build_kwargs", "runtime")
def define_common_targets():
"""Defines targets that should be shared between fbcode and xplat.
The directory containing this targets.bzl file should also contain both
TARGETS and BUCK files that call this function.
"""
runtime.python_library(
name = "models",
srcs = [
"__init__.py",
],
visibility = [
"//executorch/examples/xnnpack/...",
"//executorch/backends/xnnpack/test/...",
],
deps = [
"//executorch/examples/models:models", # @manual
],
)
runtime.python_library(
name = "xnnpack_aot_lib",
srcs = [
"aot_compiler.py",
],
deps = [
":models",
"//executorch/backends/xnnpack/partition:xnnpack_partitioner",
"//executorch/extension/export_util:export_util",
"//executorch/examples/xnnpack/quantization:quant_utils",
"//executorch/exir:lib",
"//executorch/exir/backend:backend_api",
"//executorch/devtools:lib",
],
)
runtime.python_binary(
name = "aot_compiler",
main_module = "executorch.examples.xnnpack.aot_compiler",
resources = {
"//executorch/examples/models/llama/params:params": "params",
},
deps = [
":xnnpack_aot_lib",
],
visibility = ["PUBLIC"],
)
# executor_runner for XNNPACK Backend and portable kernels.
runtime.cxx_binary(
name = "xnn_executor_runner",
deps = [
"//executorch/examples/portable/executor_runner:executor_runner_lib",
"//executorch/backends/xnnpack:xnnpack_backend",
"//executorch/kernels/portable:generated_lib",
],
define_static_target = True,
**get_oss_build_kwargs()
)