Skip to content

Commit 5d35efa

Browse files
FbsourceTargetsToBuck Botmeta-codesync[bot]
authored andcommitted
Rename build files from TARGETS to BUCK (group ID: -1179671466944197245) (#19416)
Summary: Pull Request resolved: #19416 Reviewed By: bigfootjon Differential Revision: D104414920
1 parent 4413a5c commit 5d35efa

7 files changed

Lines changed: 139 additions & 128 deletions

File tree

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

45
oncall("executorch")
56

6-
runtime.python_library(
7+
fbcode_target(_kind = runtime.python_library,
78
name = "fuse_quantized_ops",
89
srcs = ["fuse_quantized_ops.py"],
910
visibility = [
@@ -20,7 +21,7 @@ runtime.python_library(
2021
],
2122
)
2223

23-
runtime.python_library(
24+
fbcode_target(_kind = runtime.python_library,
2425
name = "insert_prepack_nodes",
2526
srcs = ["insert_prepack_nodes.py"],
2627
visibility = [
@@ -34,7 +35,7 @@ runtime.python_library(
3435
],
3536
)
3637

37-
runtime.python_library(
38+
fbcode_target(_kind = runtime.python_library,
3839
name = "squeeze_unsqueeze_inputs",
3940
srcs = [
4041
"squeeze_unsqueeze_inputs.py",
@@ -50,7 +51,7 @@ runtime.python_library(
5051
]
5152
)
5253

53-
runtime.python_library(
54+
fbcode_target(_kind = runtime.python_library,
5455
name = "remove_asserts",
5556
srcs = ["remove_asserts.py"],
5657
visibility = [
@@ -63,7 +64,7 @@ runtime.python_library(
6364
],
6465
)
6566

66-
runtime.python_library(
67+
fbcode_target(_kind = runtime.python_library,
6768
name = "remove_redundant_ops",
6869
srcs = ["remove_redundant_ops.py"],
6970
visibility = [
@@ -76,7 +77,7 @@ runtime.python_library(
7677
],
7778
)
7879

79-
runtime.python_library(
80+
fbcode_target(_kind = runtime.python_library,
8081
name = "tag_memory_meta_pass",
8182
srcs = ["tag_memory_meta_pass.py"],
8283
visibility = [
@@ -91,7 +92,7 @@ runtime.python_library(
9192
],
9293
)
9394

94-
runtime.python_library(
95+
fbcode_target(_kind = runtime.python_library,
9596
name = "fold_qdq",
9697
srcs = ["fold_qdq.py"],
9798
visibility = [
@@ -104,7 +105,7 @@ runtime.python_library(
104105
],
105106
)
106107

107-
runtime.python_library(
108+
fbcode_target(_kind = runtime.python_library,
108109
name = "insert_dtype_promotion",
109110
srcs = ["insert_dtype_promotion.py"],
110111
visibility = [
@@ -117,7 +118,7 @@ runtime.python_library(
117118
],
118119
)
119120

120-
runtime.python_library(
121+
fbcode_target(_kind = runtime.python_library,
121122
name = "fuse_patterns",
122123
srcs = ["fuse_patterns.py"],
123124
visibility = [
@@ -133,7 +134,7 @@ runtime.python_library(
133134
typing = True,
134135
)
135136

136-
runtime.python_library(
137+
fbcode_target(_kind = runtime.python_library,
137138
name = "vulkan_passes",
138139
srcs = [
139140
"__init__.py",

backends/vulkan/test/BUCK

Lines changed: 108 additions & 2 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", "non_fbcode_target")
12
load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
23
load(":compute_api_tests.bzl", "define_compute_api_test_targets")
34

4-
fb_native.filegroup(
5+
oncall("executorch")
6+
non_fbcode_target(_kind = fb_native.filegroup,
57
name = "test_shaders",
68
srcs = glob([
79
"glsl/*",
@@ -11,4 +13,108 @@ fb_native.filegroup(
1113
],
1214
)
1315

14-
define_compute_api_test_targets()
16+
non_fbcode_target(_kind = define_compute_api_test_targets,)
17+
18+
# !!!! fbcode/executorch/backends/vulkan/test/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!
19+
20+
load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")
21+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22+
23+
24+
fbcode_target(_kind = python_unittest,
25+
name = "test_vulkan_delegate",
26+
srcs = [
27+
"test_vulkan_delegate.py",
28+
],
29+
preload_deps = [
30+
"fbsource//third-party/swiftshader/lib/linux-x64:libvk_swiftshader_fbcode",
31+
"//executorch/backends/vulkan:vulkan_backend_lib",
32+
"//executorch/kernels/portable:custom_ops_generated_lib",
33+
],
34+
deps = [
35+
":test_utils",
36+
"//caffe2:torch",
37+
"//executorch/backends/transforms:convert_dtype_pass",
38+
"//executorch/backends/vulkan:vulkan_preprocess",
39+
"//executorch/backends/vulkan/partitioner:vulkan_partitioner",
40+
"//executorch/exir:lib",
41+
"//executorch/extension/pybindings:portable_lib", # @manual
42+
"//executorch/extension/pytree:pylib",
43+
"//executorch/kernels/portable:custom_ops_generated_lib",
44+
],
45+
)
46+
47+
fbcode_target(_kind = python_unittest,
48+
name = "test_vulkan_passes",
49+
srcs = [
50+
"test_vulkan_passes.py",
51+
],
52+
deps = [
53+
"//caffe2:torch",
54+
"//executorch/backends/vulkan/_passes:vulkan_passes",
55+
"//executorch/backends/vulkan:vulkan_preprocess",
56+
"//executorch/backends/xnnpack/quantizer:xnnpack_quantizer",
57+
"//pytorch/ao:torchao", # @manual
58+
]
59+
)
60+
61+
fbcode_target(_kind = python_unittest,
62+
name = "test_vulkan_delegate_header",
63+
srcs = [
64+
"test_vulkan_delegate_header.py",
65+
],
66+
deps = [
67+
"//executorch/backends/vulkan:vulkan_preprocess",
68+
],
69+
)
70+
71+
fbcode_target(_kind = python_unittest,
72+
name = "test_serialization",
73+
srcs = [
74+
"test_serialization.py",
75+
],
76+
deps = [
77+
"//caffe2:torch",
78+
"//executorch/backends/vulkan:vulkan_preprocess",
79+
],
80+
)
81+
82+
fbcode_target(_kind = python_unittest,
83+
name = "test_vulkan_tensor_repr",
84+
srcs = [
85+
"test_vulkan_tensor_repr.py",
86+
],
87+
deps = [
88+
"//caffe2:torch",
89+
"//executorch/backends/vulkan:vulkan_preprocess",
90+
],
91+
)
92+
93+
fbcode_target(_kind = runtime.python_library,
94+
name = "tester",
95+
srcs = ["tester.py"],
96+
deps = [
97+
"//executorch/backends/vulkan/partitioner:vulkan_partitioner",
98+
"//executorch/backends/vulkan:vulkan_preprocess",
99+
]
100+
)
101+
102+
fbcode_target(_kind = runtime.python_library,
103+
name = "test_utils",
104+
srcs = [
105+
"utils.py",
106+
],
107+
deps = [
108+
"//caffe2:torch",
109+
"//executorch/backends/vulkan:vulkan_preprocess",
110+
"//executorch/backends/vulkan/partitioner:vulkan_partitioner",
111+
"//executorch/backends/xnnpack:xnnpack_preprocess",
112+
"//executorch/backends/xnnpack/quantizer:xnnpack_quantizer",
113+
"//executorch/backends/xnnpack/partition:xnnpack_partitioner",
114+
"//executorch/devtools:lib",
115+
"//executorch/devtools/bundled_program/serialize:lib",
116+
"//executorch/exir:lib",
117+
"//executorch/extension/pybindings:portable_lib", # @manual
118+
"//executorch/extension/pytree:pylib",
119+
],
120+
)

backends/vulkan/test/TARGETS

Lines changed: 0 additions & 102 deletions
This file was deleted.
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
2+
oncall("executorch")
13
# Any targets that should be shared between fbcode and xplat must be defined in
24
# targets.bzl. This file can contain xplat-only targets.
35

46
load(":targets.bzl", "define_common_targets")
57

6-
oncall("executorch")
78

8-
define_common_targets()
9+
non_fbcode_target(_kind = define_common_targets,)
10+
11+
# !!!! fbcode/executorch/backends/vulkan/test/custom_ops/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!
12+
13+
load(":targets.bzl", "define_common_targets")
14+
15+
16+
fbcode_target(_kind = define_common_targets,is_fbcode = True)

backends/vulkan/test/custom_ops/TARGETS

Lines changed: 0 additions & 5 deletions
This file was deleted.

backends/vulkan/test/op_tests/BUCK

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
2+
oncall("executorch")
13
# Any targets that should be shared between fbcode and xplat must be defined in
24
# targets.bzl. This file can contain xplat-only targets.
35

46
load(":targets.bzl", "define_common_targets")
57

6-
oncall("executorch")
78

8-
define_common_targets()
9+
non_fbcode_target(_kind = define_common_targets,)
10+
11+
# !!!! fbcode/executorch/backends/vulkan/test/op_tests/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!
12+
13+
load(":targets.bzl", "define_common_targets")
14+
15+
16+
fbcode_target(_kind = define_common_targets,is_fbcode = True)

backends/vulkan/test/op_tests/TARGETS

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)