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
46 lines (39 loc) · 1.41 KB
/
targets.bzl
File metadata and controls
46 lines (39 loc) · 1.41 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
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//xplat/executorch/codegen:codegen.bzl", "et_operator_library", "executorch_generated_lib")
load(":lib_defs.bzl", "define_libs")
def define_common_targets(is_fbcode=False):
"""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.
"""
define_libs(is_fbcode)
runtime.export_file(
name = "optimized.yaml",
visibility = ["PUBLIC"],
)
runtime.cxx_library(
name = "optimized_operators",
srcs = [],
visibility = ["PUBLIC"],
exported_deps = [
"//executorch/kernels/optimized/cpu:cpu_optimized",
],
)
et_operator_library(
name = "optimized_oplist",
ops_schema_yaml_target = ":optimized.yaml",
visibility = ["PUBLIC"],
)
# Used mainly for operator testing. In practice, a generated lib specific
# to a project should be created that contains only the required operators
# for a particular model.
executorch_generated_lib(
name = "generated_lib",
deps = [
":optimized_oplist",
":optimized_operators",
],
functions_yaml_target = ":optimized.yaml",
define_static_targets = True,
visibility = ["PUBLIC"],
)