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 46717a52014..9c32c166687 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 = "insert_dtype_promotion", srcs = ["insert_dtype_promotion.py"], visibility = [ @@ -117,7 +118,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "fuse_patterns", srcs = ["fuse_patterns.py"], visibility = [ @@ -133,7 +134,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/test/BUCK b/backends/vulkan/test/BUCK index 7a73d7bad65..daab61d4958 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,108 @@ 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", + "//executorch/backends/xnnpack/quantizer:xnnpack_quantizer", + "//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 = python_unittest, + name = "test_vulkan_tensor_repr", + srcs = [ + "test_vulkan_tensor_repr.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 7517f7d66f3..00000000000 --- a/backends/vulkan/test/TARGETS +++ /dev/null @@ -1,102 +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", - "//executorch/backends/xnnpack/quantizer:xnnpack_quantizer", - "//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", - ], -) - -python_unittest( - name = "test_vulkan_tensor_repr", - srcs = [ - "test_vulkan_tensor_repr.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)