-
Notifications
You must be signed in to change notification settings - Fork 865
Expand file tree
/
Copy pathtargets.bzl
More file actions
88 lines (83 loc) · 2.61 KB
/
targets.bzl
File metadata and controls
88 lines (83 loc) · 2.61 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
def define_common_targets():
runtime.python_library(
name = "aoti_partitioner",
srcs = [
"aoti_partitioner.py",
],
visibility = [
"//executorch/...",
],
deps = [
"//caffe2:torch",
"//executorch/exir/backend:partitioner",
"//executorch/exir/backend:utils",
],
)
runtime.python_library(
name = "aoti_backend",
srcs = [
"aoti_backend.py",
],
visibility = [
"//executorch/...",
],
deps = [
"//caffe2:torch",
"//executorch/backends/aoti/passes:passes",
"//executorch/exir/_serialize:lib",
"//executorch/exir/backend:backend_details",
"//executorch/exir/backend:compile_spec_schema",
],
)
# AOTI common shims functionality
runtime.cxx_library(
name = "common_shims",
srcs = [
"common_shims.cpp",
],
headers = [
"common_shims.h",
"export.h",
"utils.h",
],
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
link_whole = True,
supports_python_dlopen = True,
# Constructor needed for backend registration.
compiler_flags = ["-Wno-global-constructors"],
visibility = ["PUBLIC"],
deps = [
"//executorch/runtime/core:core",
"//executorch/runtime/core/exec_aten:lib",
],
)
# AOTI model container functionality
runtime.cxx_library(
name = "delegate_handle",
headers = [
"aoti_delegate_handle.h",
],
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
link_whole = True,
supports_python_dlopen = True,
# Constructor needed for backend registration.
compiler_flags = ["-Wno-global-constructors"],
visibility = ["PUBLIC"],
deps = [
"//executorch/runtime/backend:interface",
"//executorch/runtime/core:core",
],
)
# Common AOTI functionality (combining both common_shims and delegate_handle)
runtime.cxx_library(
name = "aoti_common",
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
link_whole = True,
supports_python_dlopen = True,
visibility = ["PUBLIC"],
exported_deps = [
":common_shims",
":delegate_handle",
],
)