Skip to content

Commit 7fb1dcc

Browse files
committed
Use runtime.python_library in our BUCK/TARGETS files
IIUC, we should've been doing this all along for compatibility with OSS Buck. Was blocking `buck2 build //runtime/...` (which is still failing, but differently). ghstack-source-id: db05394 ghstack-comment-id: 2683586060 Pull Request resolved: #8712
1 parent b135ebb commit 7fb1dcc

File tree

53 files changed

+223
-223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+223
-223
lines changed

backends/arm/TARGETS

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# @noautodeps
2-
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
2+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
33

4-
python_library(
4+
runtime.python_library(
55
name = "arm_partitioner",
66
srcs = [
77
"ethosu_backend.py",
@@ -18,7 +18,7 @@ python_library(
1818
],
1919
)
2020

21-
python_library(
21+
runtime.python_library(
2222
name = "arm_backend",
2323
srcs = [
2424
"arm_backend.py",
@@ -37,7 +37,7 @@ python_library(
3737
],
3838
)
3939

40-
python_library(
40+
runtime.python_library(
4141
name = "process_node",
4242
srcs = ["process_node.py"],
4343
typing = True,
@@ -51,7 +51,7 @@ python_library(
5151
],
5252
)
5353

54-
python_library(
54+
runtime.python_library(
5555
name = "arm_vela",
5656
srcs = [
5757
"arm_vela.py",
@@ -62,7 +62,7 @@ python_library(
6262
],
6363
)
6464

65-
python_library(
65+
runtime.python_library(
6666
name = "tosa_mapping",
6767
srcs = [
6868
"tosa_mapping.py",
@@ -74,7 +74,7 @@ python_library(
7474
],
7575
)
7676

77-
python_library(
77+
runtime.python_library(
7878
name = "tosa_quant_utils",
7979
srcs = [
8080
"tosa_quant_utils.py",
@@ -89,7 +89,7 @@ python_library(
8989
],
9090
)
9191

92-
python_library(
92+
runtime.python_library(
9393
name = "tosa_specification",
9494
srcs = [
9595
"tosa_specification.py",
@@ -101,7 +101,7 @@ python_library(
101101
],
102102
)
103103

104-
python_library(
104+
runtime.python_library(
105105
name = "tosa_utils",
106106
srcs = [
107107
"tosa_utils.py",
@@ -114,7 +114,7 @@ python_library(
114114
],
115115
)
116116

117-
python_library(
117+
runtime.python_library(
118118
name = "arm_model_evaluator",
119119
srcs = [
120120
"util/arm_model_evaluator.py",

backends/arm/_passes/TARGETS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
1+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22

3-
python_library(
3+
runtime.python_library(
44
name = "passes",
55
srcs = glob(["*.py"]),
66
typing = True,

backends/arm/operator_support/TARGETS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
1+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22

3-
python_library(
3+
runtime.python_library(
44
name = "operator_support",
55
srcs = glob(["*.py"]),
66
typing = True,

backends/arm/operators/TARGETS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# @noautodeps
2-
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
2+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
33

4-
python_library(
4+
runtime.python_library(
55
name = "node_visitor",
66
srcs = ["node_visitor.py"],
77
typing = True,
@@ -11,7 +11,7 @@ python_library(
1111
],
1212
)
1313

14-
python_library(
14+
runtime.python_library(
1515
name = "ops",
1616
srcs = glob(["op_*.py", "ops_*.py"]),
1717
typing = True,
@@ -26,7 +26,7 @@ python_library(
2626
],
2727
)
2828

29-
python_library(
29+
runtime.python_library(
3030
name = "lib",
3131
srcs = ["__init__.py"],
3232
typing = True,

backends/arm/quantizer/TARGETS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
1+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22

3-
python_library(
3+
runtime.python_library(
44
name = "arm_quantizer",
55
srcs = ["arm_quantizer.py"],
66
deps = [
@@ -11,7 +11,7 @@ python_library(
1111
],
1212
)
1313

14-
python_library(
14+
runtime.python_library(
1515
name = "quantization_annotator",
1616
srcs = ["quantization_annotator.py"],
1717
deps = [
@@ -21,15 +21,15 @@ python_library(
2121
],
2222
)
2323

24-
python_library(
24+
runtime.python_library(
2525
name = "quantization_config",
2626
srcs = ["quantization_config.py"],
2727
deps = [
2828
"//caffe2:torch",
2929
],
3030
)
3131

32-
python_library(
32+
runtime.python_library(
3333
name = "arm_quantizer_utils",
3434
srcs = ["arm_quantizer_utils.py"],
3535
deps = [

backends/arm/test/TARGETS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
1+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22
load(":targets.bzl", "define_arm_tests")
33

44

55
oncall("executorch")
66

7-
python_library(
7+
runtime.python_library(
88
name = "conftest",
99
srcs = ["conftest.py"],
1010
deps = [
@@ -14,7 +14,7 @@ python_library(
1414
]
1515
)
1616

17-
python_library(
17+
runtime.python_library(
1818
name = "runner_utils",
1919
srcs = ["runner_utils.py"],
2020
deps = [
@@ -26,7 +26,7 @@ python_library(
2626
]
2727
)
2828

29-
python_library(
29+
runtime.python_library(
3030
name = "common",
3131
srcs = ["common.py"],
3232
deps = [
@@ -39,7 +39,7 @@ python_library(
3939
]
4040
)
4141

42-
python_library(
42+
runtime.python_library(
4343
name = "common",
4444
srcs = ["common.py"],
4545
deps = [
@@ -52,7 +52,7 @@ python_library(
5252
]
5353
)
5454

55-
python_library(
55+
runtime.python_library(
5656
name = "arm_tester",
5757
srcs = glob(["tester/*.py"]),
5858
deps = [

backends/cadence/aot/TARGETS

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# LICENSE file in the root directory of this source tree.
66

77
load("@fbcode_macros//build_defs:export_files.bzl", "export_file")
8-
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
8+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
99
load(
1010
"@fbsource//tools/build_defs:default_platform_defs.bzl",
1111
"CXX",
@@ -15,7 +15,7 @@ load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")
1515

1616
oncall("odai_jarvis")
1717

18-
python_library(
18+
runtime.python_library(
1919
name = "utils",
2020
srcs = [
2121
"utils.py",
@@ -30,7 +30,7 @@ python_library(
3030
],
3131
)
3232

33-
python_library(
33+
runtime.python_library(
3434
name = "compiler",
3535
srcs = [
3636
"compiler.py",
@@ -51,7 +51,7 @@ python_library(
5151
],
5252
)
5353

54-
python_library(
54+
runtime.python_library(
5555
name = "export_example",
5656
srcs = [
5757
"export_example.py",
@@ -73,7 +73,7 @@ python_library(
7373
],
7474
)
7575

76-
python_library(
76+
runtime.python_library(
7777
name = "pass_utils",
7878
srcs = [
7979
"pass_utils.py",
@@ -88,7 +88,7 @@ python_library(
8888
],
8989
)
9090

91-
python_library(
91+
runtime.python_library(
9292
name = "passes",
9393
srcs = [
9494
"passes.py",
@@ -108,7 +108,7 @@ python_library(
108108
],
109109
)
110110

111-
python_library(
111+
runtime.python_library(
112112
name = "ops_registrations",
113113
srcs = [
114114
"ops_registrations.py",
@@ -148,7 +148,7 @@ python_unittest(
148148
],
149149
)
150150

151-
python_library(
151+
runtime.python_library(
152152
name = "compiler_utils",
153153
srcs = [
154154
"compiler_utils.py",
@@ -160,7 +160,7 @@ python_library(
160160
],
161161
)
162162

163-
python_library(
163+
runtime.python_library(
164164
name = "graph_builder",
165165
srcs = [
166166
"graph_builder.py",
@@ -172,7 +172,7 @@ python_library(
172172
],
173173
)
174174

175-
python_library(
175+
runtime.python_library(
176176
name = "fuse_ops",
177177
srcs = [
178178
"fuse_ops.py",
@@ -192,7 +192,7 @@ python_library(
192192
],
193193
)
194194

195-
python_library(
195+
runtime.python_library(
196196
name = "simplify_ops",
197197
srcs = [
198198
"simplify_ops.py",
@@ -206,7 +206,7 @@ python_library(
206206
],
207207
)
208208

209-
python_library(
209+
runtime.python_library(
210210
name = "remove_ops",
211211
srcs = [
212212
"remove_ops.py",
@@ -224,7 +224,7 @@ python_library(
224224
],
225225
)
226226

227-
python_library(
227+
runtime.python_library(
228228
name = "reorder_ops",
229229
srcs = [
230230
"reorder_ops.py",
@@ -242,7 +242,7 @@ python_library(
242242
],
243243
)
244244

245-
python_library(
245+
runtime.python_library(
246246
name = "replace_ops",
247247
srcs = [
248248
"replace_ops.py",
@@ -380,7 +380,7 @@ python_unittest(
380380
)
381381

382382

383-
python_library(
383+
runtime.python_library(
384384
name = "memory_planning",
385385
srcs = [
386386
"memory_planning.py",
@@ -398,7 +398,7 @@ python_library(
398398
)
399399

400400

401-
python_library(
401+
runtime.python_library(
402402
name = "memory_constraints",
403403
srcs = [
404404
"memory_constraints.py",

backends/cadence/aot/quantizer/TARGETS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
1+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22

33
oncall("odai_jarvis")
44

5-
python_library(
5+
runtime.python_library(
66
name = "utils",
77
srcs = [
88
"utils.py",
@@ -12,7 +12,7 @@ python_library(
1212
],
1313
)
1414

15-
python_library(
15+
runtime.python_library(
1616
name = "patterns",
1717
srcs = [
1818
"patterns.py",
@@ -24,7 +24,7 @@ python_library(
2424
],
2525
)
2626

27-
python_library(
27+
runtime.python_library(
2828
name = "quantizer",
2929
srcs = [
3030
"quantizer.py",
@@ -38,7 +38,7 @@ python_library(
3838
],
3939
)
4040

41-
python_library(
41+
runtime.python_library(
4242
name = "fusion_pass",
4343
srcs = [
4444
"fusion_pass.py",

0 commit comments

Comments
 (0)