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) diff --git a/backends/vulkan/test/BUCK b/backends/vulkan/test/BUCK index 7a73d7bad65..50c68504088 100644 --- a/backends/vulkan/test/BUCK +++ b/backends/vulkan/test/BUCK @@ -1,7 +1,9 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native") load(":compute_api_tests.bzl", "define_compute_api_test_targets") -fb_native.filegroup( +oncall("executorch") +non_fbcode_target(_kind = fb_native.filegroup, name = "test_shaders", srcs = glob([ "glsl/*", @@ -11,4 +13,96 @@ fb_native.filegroup( ], ) -define_compute_api_test_targets() +non_fbcode_target(_kind = define_compute_api_test_targets,) + +# !!!! fbcode/executorch/backends/vulkan/test/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") + + +fbcode_target(_kind = python_unittest, + name = "test_vulkan_delegate", + srcs = [ + "test_vulkan_delegate.py", + ], + preload_deps = [ + "fbsource//third-party/swiftshader/lib/linux-x64:libvk_swiftshader_fbcode", + "//executorch/backends/vulkan:vulkan_backend_lib", + "//executorch/kernels/portable:custom_ops_generated_lib", + ], + deps = [ + ":test_utils", + "//caffe2:torch", + "//executorch/backends/transforms:convert_dtype_pass", + "//executorch/backends/vulkan:vulkan_preprocess", + "//executorch/backends/vulkan/partitioner:vulkan_partitioner", + "//executorch/exir:lib", + "//executorch/extension/pybindings:portable_lib", # @manual + "//executorch/extension/pytree:pylib", + "//executorch/kernels/portable:custom_ops_generated_lib", + ], +) + +fbcode_target(_kind = python_unittest, + name = "test_vulkan_passes", + srcs = [ + "test_vulkan_passes.py", + ], + deps = [ + "//caffe2:torch", + "//executorch/backends/vulkan/_passes:vulkan_passes", + "//executorch/backends/vulkan:vulkan_preprocess", + "//pytorch/ao:torchao", # @manual + ] +) + +fbcode_target(_kind = python_unittest, + name = "test_vulkan_delegate_header", + srcs = [ + "test_vulkan_delegate_header.py", + ], + deps = [ + "//executorch/backends/vulkan:vulkan_preprocess", + ], +) + +fbcode_target(_kind = python_unittest, + name = "test_serialization", + srcs = [ + "test_serialization.py", + ], + deps = [ + "//caffe2:torch", + "//executorch/backends/vulkan:vulkan_preprocess", + ], +) + +fbcode_target(_kind = runtime.python_library, + name = "tester", + srcs = ["tester.py"], + deps = [ + "//executorch/backends/vulkan/partitioner:vulkan_partitioner", + "//executorch/backends/vulkan:vulkan_preprocess", + ] +) + +fbcode_target(_kind = runtime.python_library, + name = "test_utils", + srcs = [ + "utils.py", + ], + deps = [ + "//caffe2:torch", + "//executorch/backends/vulkan:vulkan_preprocess", + "//executorch/backends/vulkan/partitioner:vulkan_partitioner", + "//executorch/backends/xnnpack:xnnpack_preprocess", + "//executorch/backends/xnnpack/quantizer:xnnpack_quantizer", + "//executorch/backends/xnnpack/partition:xnnpack_partitioner", + "//executorch/devtools:lib", + "//executorch/devtools/bundled_program/serialize:lib", + "//executorch/exir:lib", + "//executorch/extension/pybindings:portable_lib", # @manual + "//executorch/extension/pytree:pylib", + ], +) diff --git a/backends/vulkan/test/TARGETS b/backends/vulkan/test/TARGETS deleted file mode 100644 index ee296a4f68f..00000000000 --- a/backends/vulkan/test/TARGETS +++ /dev/null @@ -1,90 +0,0 @@ -load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") - -oncall("executorch") - -python_unittest( - name = "test_vulkan_delegate", - srcs = [ - "test_vulkan_delegate.py", - ], - preload_deps = [ - "fbsource//third-party/swiftshader/lib/linux-x64:libvk_swiftshader_fbcode", - "//executorch/backends/vulkan:vulkan_backend_lib", - "//executorch/kernels/portable:custom_ops_generated_lib", - ], - deps = [ - ":test_utils", - "//caffe2:torch", - "//executorch/backends/transforms:convert_dtype_pass", - "//executorch/backends/vulkan:vulkan_preprocess", - "//executorch/backends/vulkan/partitioner:vulkan_partitioner", - "//executorch/exir:lib", - "//executorch/extension/pybindings:portable_lib", # @manual - "//executorch/extension/pytree:pylib", - "//executorch/kernels/portable:custom_ops_generated_lib", - ], -) - -python_unittest( - name = "test_vulkan_passes", - srcs = [ - "test_vulkan_passes.py", - ], - deps = [ - "//caffe2:torch", - "//executorch/backends/vulkan/_passes:vulkan_passes", - "//executorch/backends/vulkan:vulkan_preprocess", - "//pytorch/ao:torchao", # @manual - ] -) - -python_unittest( - name = "test_vulkan_delegate_header", - srcs = [ - "test_vulkan_delegate_header.py", - ], - deps = [ - "//executorch/backends/vulkan:vulkan_preprocess", - ], -) - -python_unittest( - name = "test_serialization", - srcs = [ - "test_serialization.py", - ], - deps = [ - "//caffe2:torch", - "//executorch/backends/vulkan:vulkan_preprocess", - ], -) - -runtime.python_library( - name = "tester", - srcs = ["tester.py"], - deps = [ - "//executorch/backends/vulkan/partitioner:vulkan_partitioner", - "//executorch/backends/vulkan:vulkan_preprocess", - ] -) - -runtime.python_library( - name = "test_utils", - srcs = [ - "utils.py", - ], - deps = [ - "//caffe2:torch", - "//executorch/backends/vulkan:vulkan_preprocess", - "//executorch/backends/vulkan/partitioner:vulkan_partitioner", - "//executorch/backends/xnnpack:xnnpack_preprocess", - "//executorch/backends/xnnpack/quantizer:xnnpack_quantizer", - "//executorch/backends/xnnpack/partition:xnnpack_partitioner", - "//executorch/devtools:lib", - "//executorch/devtools/bundled_program/serialize:lib", - "//executorch/exir:lib", - "//executorch/extension/pybindings:portable_lib", # @manual - "//executorch/extension/pytree:pylib", - ], -) diff --git a/backends/vulkan/test/custom_ops/BUCK b/backends/vulkan/test/custom_ops/BUCK index 1e8cc179228..1c77681b69c 100644 --- a/backends/vulkan/test/custom_ops/BUCK +++ b/backends/vulkan/test/custom_ops/BUCK @@ -1,8 +1,16 @@ +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/test/custom_ops/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/test/custom_ops/TARGETS b/backends/vulkan/test/custom_ops/TARGETS deleted file mode 100644 index e84397dc20e..00000000000 --- a/backends/vulkan/test/custom_ops/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets(is_fbcode = True) diff --git a/backends/vulkan/test/op_tests/BUCK b/backends/vulkan/test/op_tests/BUCK index 1e8cc179228..8f97558ecaf 100644 --- a/backends/vulkan/test/op_tests/BUCK +++ b/backends/vulkan/test/op_tests/BUCK @@ -1,8 +1,16 @@ +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/test/op_tests/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/test/op_tests/TARGETS b/backends/vulkan/test/op_tests/TARGETS deleted file mode 100644 index e84397dc20e..00000000000 --- a/backends/vulkan/test/op_tests/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets(is_fbcode = True)