Skip to content

Commit d28ef1c

Browse files
authored
rename TARGETS-only fbcode dirs with rules to BUCK (xplat-safe) (#20793)
Differential Revision: D109082056 Pull Request resolved: #20793
1 parent 2c90c5e commit d28ef1c

25 files changed

Lines changed: 240 additions & 84 deletions

File tree

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
12
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
23

34
oncall("executorch")
45

5-
runtime.python_library(
6+
fbcode_target(
7+
_kind = runtime.python_library,
68
name = "passes",
79
srcs = [
8-
"replace_view_copy_with_view.py",
10+
"replace_view_copy_with_view.py",
911
],
1012
visibility = [
1113
"//executorch/...",
Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
# LICENSE file in the root directory of this source tree.
55

66
# @noautodeps
7+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
78
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
89

9-
runtime.python_library(
10+
fbcode_target(
11+
_kind = runtime.python_library,
1012
name = "constants",
1113
srcs = [
1214
"constants.py",
@@ -15,7 +17,8 @@ runtime.python_library(
1517
"//executorch/exir/dialects:lib",
1618
],
1719
)
18-
runtime.python_library(
20+
fbcode_target(
21+
_kind = runtime.python_library,
1922
name = "ao_ext",
2023
srcs = glob([
2124
"ao_ext/*.py",
@@ -28,7 +31,8 @@ runtime.python_library(
2831
],
2932
)
3033

31-
runtime.python_library(
34+
fbcode_target(
35+
_kind = runtime.python_library,
3236
name = "lib",
3337
srcs = [
3438
"__init__.py",
@@ -40,7 +44,8 @@ runtime.python_library(
4044
"//executorch/backends/arm/quantizer:lib",
4145
],
4246
)
43-
runtime.python_library(
47+
fbcode_target(
48+
_kind = runtime.python_library,
4449
name = "common",
4550
srcs = glob(["common/*.py"]),
4651
deps = [
@@ -50,7 +55,8 @@ runtime.python_library(
5055
],
5156
)
5257

53-
runtime.python_library(
58+
fbcode_target(
59+
_kind = runtime.python_library,
5460
name = "arm_compile_spec",
5561
srcs = [
5662
"common/arm_compile_spec.py",
@@ -67,7 +73,8 @@ runtime.python_library(
6773
"//executorch/backends/arm/_passes:passes",
6874
],
6975
)
70-
runtime.python_library(
76+
fbcode_target(
77+
_kind = runtime.python_library,
7178
name = "ethosu",
7279
srcs = [
7380
"ethosu/__init__.py",
@@ -83,7 +90,8 @@ runtime.python_library(
8390
],
8491
)
8592

86-
runtime.python_library(
93+
fbcode_target(
94+
_kind = runtime.python_library,
8795
name = "vgf",
8896
srcs = [
8997
"vgf/__init__.py",
@@ -120,7 +128,8 @@ runtime.python_library(
120128
"//executorch/exir:lib",
121129
],
122130
)
123-
runtime.python_library(
131+
fbcode_target(
132+
_kind = runtime.python_library,
124133
name = "public_api",
125134
srcs = ["__init__.py"],
126135
deps = [
@@ -130,7 +139,8 @@ runtime.python_library(
130139
],
131140
)
132141

133-
runtime.python_library(
142+
fbcode_target(
143+
_kind = runtime.python_library,
134144
name = "process_node",
135145
srcs = ["process_node.py"],
136146
deps = [
@@ -142,7 +152,8 @@ runtime.python_library(
142152
"//executorch/exir:lib",
143153
],
144154
)
145-
runtime.python_library(
155+
fbcode_target(
156+
_kind = runtime.python_library,
146157
name = "arm_vela",
147158
srcs = [
148159
"arm_vela.py",
@@ -151,7 +162,8 @@ runtime.python_library(
151162
"fbsource//third-party/pypi/ethos-u-vela:ethos-u-vela",
152163
],
153164
)
154-
runtime.python_library(
165+
fbcode_target(
166+
_kind = runtime.python_library,
155167
name = "arm_model_evaluator",
156168
srcs = [
157169
"util/arm_model_evaluator.py",
@@ -160,7 +172,8 @@ runtime.python_library(
160172
"//caffe2:torch",
161173
]
162174
)
163-
runtime.python_library(
175+
fbcode_target(
176+
_kind = runtime.python_library,
164177
name = "_factory",
165178
srcs = [
166179
"util/_factory.py"
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
12
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
23

3-
runtime.python_library(
4+
fbcode_target(
5+
_kind = runtime.python_library,
46
name = "core",
57
srcs = [
68
"arm_pass.py",
@@ -17,7 +19,8 @@ runtime.python_library(
1719
],
1820
)
1921

20-
runtime.python_library(
22+
fbcode_target(
23+
_kind = runtime.python_library,
2124
name = "arm_pass_manager_base",
2225
srcs = ["arm_pass_manager.py"],
2326
deps = [
@@ -32,7 +35,8 @@ runtime.python_library(
3235
],
3336
)
3437

35-
runtime.python_library(
38+
fbcode_target(
39+
_kind = runtime.python_library,
3640
name = "arm_pass_manager_fb",
3741
srcs = [],
3842
deps = [
@@ -41,7 +45,8 @@ runtime.python_library(
4145
],
4246
)
4347

44-
runtime.python_library(
48+
fbcode_target(
49+
_kind = runtime.python_library,
4550
name = "passes",
4651
srcs = glob(["*.py"], exclude = [
4752
"arm_pass.py",
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# @noautodeps
2+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
23
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
34

4-
runtime.python_library(
5+
fbcode_target(
6+
_kind = runtime.python_library,
57
name = "schema",
68
srcs = [
79
"__init__.py",
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
12
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
23

3-
runtime.python_library(
4+
fbcode_target(
5+
_kind = runtime.python_library,
46
name = "operator_support",
57
srcs = glob(["*.py"]),
68
deps = [
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# @noautodeps
2+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
23
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
34

4-
runtime.python_library(
5+
fbcode_target(
6+
_kind = runtime.python_library,
57
name = "node_visitor",
68
srcs = [
79
"node_visitor.py",
@@ -15,12 +17,14 @@ runtime.python_library(
1517
],
1618
)
1719

18-
runtime.python_library(
20+
fbcode_target(
21+
_kind = runtime.python_library,
1922
name = "operator_validation_utils",
2023
srcs = ["operator_validation_utils.py"],
2124
)
2225

23-
runtime.python_library(
26+
fbcode_target(
27+
_kind = runtime.python_library,
2428
name = "ops",
2529
srcs = glob(["op_*.py", "ops_*.py"]),
2630
deps = [
@@ -34,7 +38,8 @@ runtime.python_library(
3438
],
3539
)
3640

37-
runtime.python_library(
41+
fbcode_target(
42+
_kind = runtime.python_library,
3843
name = "lib",
3944
srcs = ["__init__.py"],
4045
deps = [
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
12
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
23

34
# Exposed through __init__.py
4-
runtime.python_library(
5+
fbcode_target(
6+
_kind = runtime.python_library,
57
name = "quantization_config",
68
srcs = ["quantization_config.py"],
79
deps = [
@@ -10,7 +12,8 @@ runtime.python_library(
1012
],
1113
)
1214

13-
runtime.python_library(
15+
fbcode_target(
16+
_kind = runtime.python_library,
1417
name = "arm_quantizer",
1518
srcs = ["arm_quantizer.py"],
1619
deps = [
@@ -29,7 +32,8 @@ runtime.python_library(
2932
],
3033
)
3134

32-
runtime.python_library(
35+
fbcode_target(
36+
_kind = runtime.python_library,
3337
name = "quantization_annotator",
3438
srcs = ["quantization_annotator.py"],
3539
deps = [
@@ -40,7 +44,8 @@ runtime.python_library(
4044
],
4145
)
4246

43-
runtime.python_library(
47+
fbcode_target(
48+
_kind = runtime.python_library,
4449
name = "arm_quantizer_utils",
4550
srcs = ["arm_quantizer_utils.py"],
4651
deps = [
@@ -52,7 +57,8 @@ runtime.python_library(
5257
],
5358
)
5459

55-
runtime.python_library(
60+
fbcode_target(
61+
_kind = runtime.python_library,
5662
name = "quantizer_support",
5763
srcs = ["quantizer_support.py"],
5864
deps = [
@@ -62,7 +68,8 @@ runtime.python_library(
6268
],
6369
)
6470

65-
runtime.python_library(
71+
fbcode_target(
72+
_kind = runtime.python_library,
6673
name = "lib",
6774
srcs = ["__init__.py"],
6875
deps = [
Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
12
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
23

34
oncall("executorch")
45

5-
runtime.python_library(
6+
fbcode_target(
7+
_kind = runtime.python_library,
68
name = "coalesced_int4_tensor",
79
srcs = [
810
"coalesced_int4_tensor.py",
@@ -16,7 +18,8 @@ runtime.python_library(
1618
],
1719
)
1820

19-
runtime.python_library(
21+
fbcode_target(
22+
_kind = runtime.python_library,
2023
name = "dp4a_planar_int5_tensor",
2124
srcs = [
2225
"dp4a_planar_int5_tensor.py",
@@ -30,7 +33,8 @@ runtime.python_library(
3033
],
3134
)
3235

33-
runtime.python_library(
36+
fbcode_target(
37+
_kind = runtime.python_library,
3438
name = "dp4a_planar_int6_tensor",
3539
srcs = [
3640
"dp4a_planar_int6_tensor.py",
@@ -44,7 +48,8 @@ runtime.python_library(
4448
],
4549
)
4650

47-
runtime.python_library(
51+
fbcode_target(
52+
_kind = runtime.python_library,
4853
name = "quantize_op_dispatch",
4954
srcs = [
5055
"quantize_op_dispatch/__init__.py",
@@ -66,7 +71,8 @@ runtime.python_library(
6671
],
6772
)
6873

69-
runtime.python_library(
74+
fbcode_target(
75+
_kind = runtime.python_library,
7076
name = "cuda_passes",
7177
srcs = [
7278
"passes/__init__.py",
@@ -82,7 +88,8 @@ runtime.python_library(
8288
],
8389
)
8490

85-
runtime.python_library(
91+
fbcode_target(
92+
_kind = runtime.python_library,
8693
name = "cuda_backend",
8794
srcs = [
8895
"cuda_backend.py",
@@ -102,7 +109,8 @@ runtime.python_library(
102109
],
103110
)
104111

105-
runtime.python_library(
112+
fbcode_target(
113+
_kind = runtime.python_library,
106114
name = "cuda_partitioner",
107115
srcs = [
108116
"cuda_partitioner.py",
@@ -116,7 +124,8 @@ runtime.python_library(
116124
],
117125
)
118126

119-
runtime.python_library(
127+
fbcode_target(
128+
_kind = runtime.python_library,
120129
name = "triton_kernels",
121130
srcs = [
122131
"triton/kernels/__init__.py",
@@ -134,7 +143,8 @@ runtime.python_library(
134143
],
135144
)
136145

137-
runtime.python_library(
146+
fbcode_target(
147+
_kind = runtime.python_library,
138148
name = "triton_replacement_pass",
139149
srcs = [
140150
"triton/__init__.py",

0 commit comments

Comments
 (0)