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
68 lines (60 loc) · 1.89 KB
/
targets.bzl
File metadata and controls
68 lines (60 loc) · 1.89 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
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//xplat/executorch/codegen:codegen.bzl", "et_operator_library", "executorch_generated_lib")
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.export_file(
name = "functions.yaml",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
)
runtime.export_file(
name = "edge_dialect_aten_op.yaml",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
)
et_operator_library(
name = "executorch_aten_ops",
ops_schema_yaml_target = ":functions.yaml",
define_static_targets = True,
)
runtime.cxx_library(
name = "operators_edge_dialect_aten",
srcs = [],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
exported_deps = [
"//executorch/kernels/aten/cpu:cpu",
],
)
et_operator_library(
name = "edge_dialect_aten_ops",
ops_schema_yaml_target = ":edge_dialect_aten_op.yaml",
define_static_targets = True,
)
executorch_generated_lib(
name = "generated_lib",
aten_mode = True,
deps = [
":executorch_aten_ops",
":edge_dialect_aten_ops",
],
kernel_deps = [
":operators_edge_dialect_aten",
],
custom_ops_yaml_target = "//executorch/kernels/aten:edge_dialect_aten_op.yaml",
define_static_targets = True,
custom_ops_requires_aot_registration = False,
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
)