diff --git a/backends/test/harness/TARGETS b/backends/test/harness/BUCK similarity index 64% rename from backends/test/harness/TARGETS rename to backends/test/harness/BUCK index 2799aedb7b5..d432aa6dc3d 100644 --- a/backends/test/harness/TARGETS +++ b/backends/test/harness/BUCK @@ -1,8 +1,9 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "tester", srcs = native.glob(["*.py", "stages/*.py"]), visibility = ["PUBLIC"], diff --git a/backends/test/suite/BUCK b/backends/test/suite/BUCK new file mode 100644 index 00000000000..18a7fe3324a --- /dev/null +++ b/backends/test/suite/BUCK @@ -0,0 +1,4 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +load(":targets.bzl", "define_common_targets") + +fbcode_target(_kind = define_common_targets,is_fbcode = True) diff --git a/backends/test/suite/TARGETS b/backends/test/suite/TARGETS deleted file mode 100644 index 8832b48d98a..00000000000 --- a/backends/test/suite/TARGETS +++ /dev/null @@ -1,3 +0,0 @@ -load(":targets.bzl", "define_common_targets") - -define_common_targets(is_fbcode = True) diff --git a/backends/transforms/BUCK b/backends/transforms/BUCK new file mode 100644 index 00000000000..f5029903c21 --- /dev/null +++ b/backends/transforms/BUCK @@ -0,0 +1,6 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +load(":targets.bzl", "define_common_targets") + +oncall("executorch") + +fbcode_target(_kind = define_common_targets,) diff --git a/backends/transforms/TARGETS b/backends/transforms/TARGETS deleted file mode 100644 index 0a42614a385..00000000000 --- a/backends/transforms/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets() diff --git a/backends/vulkan/BUCK b/backends/vulkan/BUCK index 1e8cc179228..c4ea0e8bd94 100644 --- a/backends/vulkan/BUCK +++ b/backends/vulkan/BUCK @@ -1,8 +1,15 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # Any targets that should be shared between fbcode and xplat must be defined in # targets.bzl. This file can contain xplat-only targets. load(":targets.bzl", "define_common_targets") -oncall("executorch") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/vulkan/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load(":targets.bzl", "define_common_targets") + +fbcode_target(_kind = define_common_targets,is_fbcode = True) diff --git a/backends/vulkan/TARGETS b/backends/vulkan/TARGETS deleted file mode 100644 index 41893d29274..00000000000 --- a/backends/vulkan/TARGETS +++ /dev/null @@ -1,4 +0,0 @@ -load(":targets.bzl", "define_common_targets") -oncall("executorch") - -define_common_targets(is_fbcode = True) diff --git a/backends/vulkan/_passes/TARGETS b/backends/vulkan/_passes/BUCK similarity index 86% rename from backends/vulkan/_passes/TARGETS rename to backends/vulkan/_passes/BUCK index 453b4814637..643ec2cc917 100644 --- a/backends/vulkan/_passes/TARGETS +++ b/backends/vulkan/_passes/BUCK @@ -1,9 +1,10 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "fuse_quantized_ops", srcs = ["fuse_quantized_ops.py"], visibility = [ @@ -20,7 +21,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "insert_prepack_nodes", srcs = ["insert_prepack_nodes.py"], visibility = [ @@ -34,7 +35,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "squeeze_unsqueeze_inputs", srcs = [ "squeeze_unsqueeze_inputs.py", @@ -50,7 +51,7 @@ runtime.python_library( ] ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "remove_asserts", srcs = ["remove_asserts.py"], visibility = [ @@ -63,7 +64,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "remove_redundant_ops", srcs = ["remove_redundant_ops.py"], visibility = [ @@ -76,7 +77,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "tag_memory_meta_pass", srcs = ["tag_memory_meta_pass.py"], visibility = [ @@ -91,7 +92,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "fold_qdq", srcs = ["fold_qdq.py"], visibility = [ @@ -104,7 +105,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "fuse_patterns", srcs = ["fuse_patterns.py"], visibility = [ @@ -120,7 +121,7 @@ runtime.python_library( typing = True, ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "vulkan_passes", srcs = [ "__init__.py", diff --git a/backends/vulkan/partitioner/TARGETS b/backends/vulkan/partitioner/BUCK similarity index 83% rename from backends/vulkan/partitioner/TARGETS rename to backends/vulkan/partitioner/BUCK index 3177ed2807e..18ff58c0a75 100644 --- a/backends/vulkan/partitioner/TARGETS +++ b/backends/vulkan/partitioner/BUCK @@ -1,8 +1,9 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "vulkan_partitioner", srcs = [ "vulkan_partitioner.py", diff --git a/backends/vulkan/patterns/TARGETS b/backends/vulkan/patterns/BUCK similarity index 83% rename from backends/vulkan/patterns/TARGETS rename to backends/vulkan/patterns/BUCK index 3baf7c9e251..a7153b30967 100644 --- a/backends/vulkan/patterns/TARGETS +++ b/backends/vulkan/patterns/BUCK @@ -1,9 +1,10 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "vulkan_patterns", srcs = [ "__init__.py", diff --git a/backends/vulkan/quantizer/TARGETS b/backends/vulkan/quantizer/BUCK similarity index 66% rename from backends/vulkan/quantizer/TARGETS rename to backends/vulkan/quantizer/BUCK index be70bafb670..04fbd1ff4b3 100644 --- a/backends/vulkan/quantizer/TARGETS +++ b/backends/vulkan/quantizer/BUCK @@ -1,8 +1,9 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "vulkan_quantizer", srcs = ["vulkan_quantizer.py"], deps = [ @@ -11,7 +12,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "vulkan_quantizer_utils", srcs = ["vulkan_quantizer_utils.py"], deps = [ diff --git a/backends/vulkan/serialization/BUCK b/backends/vulkan/serialization/BUCK index 6cbd0fa8fac..414cd9c81e4 100644 --- a/backends/vulkan/serialization/BUCK +++ b/backends/vulkan/serialization/BUCK @@ -1,4 +1,11 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load(":targets.bzl", "define_common_targets") oncall("executorch") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/vulkan/serialization/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load(":targets.bzl", "define_common_targets") + +fbcode_target(_kind = define_common_targets,is_fbcode = True) diff --git a/backends/vulkan/serialization/TARGETS b/backends/vulkan/serialization/TARGETS deleted file mode 100644 index 41893d29274..00000000000 --- a/backends/vulkan/serialization/TARGETS +++ /dev/null @@ -1,4 +0,0 @@ -load(":targets.bzl", "define_common_targets") -oncall("executorch") - -define_common_targets(is_fbcode = True)