diff --git a/backends/arm/TARGETS b/backends/arm/BUCK similarity index 84% rename from backends/arm/TARGETS rename to backends/arm/BUCK index 6e81adfed6f..4bd0dda38ac 100644 --- a/backends/arm/TARGETS +++ b/backends/arm/BUCK @@ -1,3 +1,4 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # Copyright 2025 Arm Limited and/or its affiliates. # # This source code is licensed under the BSD-style license found in the @@ -6,7 +7,7 @@ # @noautodeps load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "constants", srcs = [ "constants.py", @@ -15,7 +16,7 @@ runtime.python_library( "//executorch/exir/dialects:lib", ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "common", srcs = glob(["common/*.py"]), deps = [ @@ -25,7 +26,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "arm_compile_spec", srcs = [ "common/arm_compile_spec.py", @@ -42,7 +43,7 @@ runtime.python_library( "//executorch/backends/arm/_passes:passes", ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "ethosu", srcs = [ "ethosu/__init__.py", @@ -58,7 +59,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "vgf", srcs = [ "vgf/__init__.py", @@ -74,7 +75,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "process_node", srcs = ["process_node.py"], deps = [ @@ -85,7 +86,7 @@ runtime.python_library( "//executorch/exir:lib", ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "arm_vela", srcs = [ "arm_vela.py", @@ -94,7 +95,7 @@ runtime.python_library( "fbsource//third-party/pypi/ethos-u-vela:ethos-u-vela", ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "arm_model_evaluator", srcs = [ "util/arm_model_evaluator.py", @@ -103,7 +104,7 @@ runtime.python_library( "//caffe2:torch", ] ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "_factory", srcs = [ "util/_factory.py" diff --git a/backends/arm/_passes/TARGETS b/backends/arm/_passes/BUCK similarity index 83% rename from backends/arm/_passes/TARGETS rename to backends/arm/_passes/BUCK index a75c63fb86e..e708fb05982 100644 --- a/backends/arm/_passes/TARGETS +++ b/backends/arm/_passes/BUCK @@ -1,6 +1,7 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "passes", srcs = glob(["*.py"]), deps = [ diff --git a/backends/arm/debug/TARGETS b/backends/arm/debug/BUCK similarity index 65% rename from backends/arm/debug/TARGETS rename to backends/arm/debug/BUCK index a88e3b077cd..bfc28e9df77 100644 --- a/backends/arm/debug/TARGETS +++ b/backends/arm/debug/BUCK @@ -1,7 +1,8 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # @noautodeps load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "schema", srcs = [ "__init__.py", diff --git a/backends/arm/operator_support/TARGETS b/backends/arm/operator_support/BUCK similarity index 76% rename from backends/arm/operator_support/TARGETS rename to backends/arm/operator_support/BUCK index 8f6721bd911..b007868866d 100644 --- a/backends/arm/operator_support/TARGETS +++ b/backends/arm/operator_support/BUCK @@ -1,6 +1,7 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "operator_support", srcs = glob(["*.py"]), deps = [ diff --git a/backends/arm/operators/TARGETS b/backends/arm/operators/BUCK similarity index 75% rename from backends/arm/operators/TARGETS rename to backends/arm/operators/BUCK index 38eb9e7cad9..867e062596f 100644 --- a/backends/arm/operators/TARGETS +++ b/backends/arm/operators/BUCK @@ -1,7 +1,8 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # @noautodeps load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "node_visitor", srcs = ["node_visitor.py"], deps = [ @@ -11,12 +12,12 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "operator_validation_utils", srcs = ["operator_validation_utils.py"], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "ops", srcs = glob(["op_*.py", "ops_*.py"]), deps = [ @@ -30,7 +31,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "lib", srcs = ["__init__.py"], deps = [ diff --git a/backends/arm/quantizer/TARGETS b/backends/arm/quantizer/BUCK similarity index 76% rename from backends/arm/quantizer/TARGETS rename to backends/arm/quantizer/BUCK index 1a02340f92b..e49040c3b7b 100644 --- a/backends/arm/quantizer/TARGETS +++ b/backends/arm/quantizer/BUCK @@ -1,7 +1,8 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") # Exposed through __init__.py -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "quantization_config", srcs = ["quantization_config.py"], deps = [ @@ -11,7 +12,7 @@ runtime.python_library( ) # Exposed through __init__.py -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "arm_quantizer", srcs = ["arm_quantizer.py"], deps = [ @@ -23,7 +24,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "quantization_annotator", srcs = ["quantization_annotator.py"], deps = [ @@ -34,7 +35,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "arm_quantizer_utils", srcs = ["arm_quantizer_utils.py"], deps = [ @@ -43,7 +44,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "lib", srcs = ["__init__.py"], deps = [ diff --git a/backends/arm/runtime/BUCK b/backends/arm/runtime/BUCK index 67f2bab681a..c045cdf52fc 100644 --- a/backends/arm/runtime/BUCK +++ b/backends/arm/runtime/BUCK @@ -1,5 +1,13 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("targets.bzl", "define_common_targets") oncall("odai_jarvis") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/arm/runtime/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,) diff --git a/backends/arm/runtime/TARGETS b/backends/arm/runtime/TARGETS deleted file mode 100644 index 67f2bab681a..00000000000 --- a/backends/arm/runtime/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load("targets.bzl", "define_common_targets") - -oncall("odai_jarvis") - -define_common_targets() diff --git a/backends/arm/test/TARGETS b/backends/arm/test/BUCK similarity index 84% rename from backends/arm/test/TARGETS rename to backends/arm/test/BUCK index f3cb00e3f55..4ec8d9f865e 100644 --- a/backends/arm/test/TARGETS +++ b/backends/arm/test/BUCK @@ -1,3 +1,4 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # Copyright 2025 Arm Limited and/or its affiliates. # # This source code is licensed under the BSD-style license found in the @@ -9,7 +10,7 @@ load(":targets.bzl", "define_arm_tests") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "conftest", srcs = ["conftest.py"], deps = [ @@ -19,7 +20,7 @@ runtime.python_library( ] ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "runner_utils", srcs = ["runner_utils.py"], resources = { @@ -38,7 +39,7 @@ runtime.python_library( ] ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "common", srcs = ["common.py"], deps = [ @@ -48,7 +49,7 @@ runtime.python_library( ] ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "arm_tester_serialize", srcs = ["tester/serialize.py"], deps = [ @@ -57,7 +58,7 @@ runtime.python_library( ] ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "arm_tester_lib", srcs = glob(["tester/*.py"], exclude = ["tester/serialize.py"]), deps = [ @@ -75,7 +76,7 @@ runtime.python_library( ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "arm_tester", deps = [ "//executorch/backends/arm/test:arm_tester_lib", @@ -83,4 +84,4 @@ runtime.python_library( ] ) -define_arm_tests() +fbcode_target(_kind = define_arm_tests,) diff --git a/backends/arm/test/misc/TARGETS b/backends/arm/test/misc/BUCK similarity index 76% rename from backends/arm/test/misc/TARGETS rename to backends/arm/test/misc/BUCK index 00b836c51e4..9284a0a72b0 100644 --- a/backends/arm/test/misc/TARGETS +++ b/backends/arm/test/misc/BUCK @@ -1,3 +1,4 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # Copyright 2025 Arm Limited and/or its affiliates. # # This source code is licensed under the BSD-style license found in the @@ -7,7 +8,7 @@ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "dw_convs_shared_weights_module", srcs = ["test_dw_convs_with_shared_weights.py"], deps = [ diff --git a/backends/arm/tosa/TARGETS b/backends/arm/tosa/BUCK similarity index 78% rename from backends/arm/tosa/TARGETS rename to backends/arm/tosa/BUCK index 423970b80ba..46ff6648c54 100644 --- a/backends/arm/tosa/TARGETS +++ b/backends/arm/tosa/BUCK @@ -1,6 +1,7 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "schemas", srcs = ["schemas/__init__.py"], resources = [ @@ -9,7 +10,7 @@ runtime.python_library( visibility = ["PUBLIC"], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "mapping", srcs = [ "mapping.py", @@ -20,7 +21,7 @@ runtime.python_library( ":specification", ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "specification", srcs = [ "specification.py", @@ -30,7 +31,7 @@ runtime.python_library( "//executorch/exir/backend:compile_spec_schema", ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "utils", srcs = [ "utils.py", @@ -40,7 +41,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "tosa", srcs = [ "__init__.py", @@ -50,7 +51,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "compile_spec", srcs = [ "compile_spec.py", @@ -62,7 +63,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "partitioner", srcs = [ "backend.py", diff --git a/backends/arm/tosa/dialect/TARGETS b/backends/arm/tosa/dialect/BUCK similarity index 74% rename from backends/arm/tosa/dialect/TARGETS rename to backends/arm/tosa/dialect/BUCK index 398d519fee6..87b5676af59 100644 --- a/backends/arm/tosa/dialect/TARGETS +++ b/backends/arm/tosa/dialect/BUCK @@ -1,6 +1,7 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "core", srcs = [ "lib.py", @@ -13,7 +14,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "ops", srcs = glob(["ops/*.py"]), deps = [ @@ -23,7 +24,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "lib", srcs = ["__init__.py"], deps = [ diff --git a/backends/cadence/aot/TARGETS b/backends/cadence/aot/BUCK similarity index 90% rename from backends/cadence/aot/TARGETS rename to backends/cadence/aot/BUCK index e99bd9ab1dc..6a0d600952e 100644 --- a/backends/cadence/aot/TARGETS +++ b/backends/cadence/aot/BUCK @@ -1,3 +1,4 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # @@ -15,7 +16,7 @@ load("@fbsource//xplat/executorch/codegen:codegen.bzl", "executorch_generated_li oncall("odai_jarvis") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "utils", srcs = [ "utils.py", @@ -30,7 +31,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "compiler", srcs = [ "compiler.py", @@ -52,7 +53,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "export_example", srcs = [ "export_example.py", @@ -74,7 +75,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "pass_utils", srcs = [ "pass_utils.py", @@ -89,7 +90,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "passes", srcs = [ "passes.py", @@ -110,7 +111,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "ops_registrations", srcs = [ "ops_registrations.py", @@ -122,7 +123,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "ref_implementations", srcs = [ "ref_implementations.py", @@ -135,9 +136,9 @@ runtime.python_library( ], ) -export_file(name = "functions.yaml") +fbcode_target(_kind = export_file,name = "functions.yaml") -executorch_generated_lib( +fbcode_target(_kind = executorch_generated_lib, name = "cadence_aot_lib", custom_ops_yaml_target = "//executorch/kernels/portable:custom_ops.yaml", functions_yaml_target = ":functions.yaml", @@ -162,7 +163,7 @@ executorch_generated_lib( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_pass_filter", srcs = [ "tests/test_pass_filter.py", @@ -174,7 +175,7 @@ python_unittest( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "compiler_utils", srcs = [ "compiler_utils.py", @@ -186,7 +187,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "graph_builder", srcs = [ "graph_builder.py", @@ -198,7 +199,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "program_builder", srcs = [ "program_builder.py", @@ -213,7 +214,7 @@ runtime.python_library( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_program_builder", srcs = [ "tests/test_program_builder.py", @@ -226,7 +227,7 @@ python_unittest( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "fuse_ops", srcs = [ "fuse_ops.py", @@ -246,7 +247,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "simplify_ops", srcs = [ "simplify_ops.py", @@ -261,7 +262,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "remove_ops", srcs = [ "remove_ops.py", @@ -280,7 +281,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "reorder_ops", srcs = [ "reorder_ops.py", @@ -298,7 +299,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "replace_ops", srcs = [ "replace_ops.py", @@ -319,7 +320,7 @@ runtime.python_library( "//executorch/exir/passes:spec_prop_pass", ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "decompose_ops", srcs = [ "decompose_ops.py", @@ -336,7 +337,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "type_dispatch", srcs = [ "type_dispatch.py", @@ -349,7 +350,7 @@ runtime.python_library( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_type_dispatch_passes", srcs = [ "tests/test_type_dispatch_passes.py", @@ -368,7 +369,7 @@ python_unittest( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "typing_stubs", srcs = [ "typing_stubs.py", @@ -379,7 +380,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "compiler_funcs", srcs = [ "compiler_funcs.py", @@ -392,7 +393,7 @@ runtime.python_library( ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_graph_builder", srcs = [ "tests/test_graph_builder.py", @@ -409,7 +410,7 @@ python_unittest( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_replace_ops_passes", srcs = [ "tests/test_replace_ops_passes.py", @@ -430,7 +431,7 @@ python_unittest( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_decompose_ops_passes", srcs = [ "tests/test_decompose_ops_passes.py", @@ -451,7 +452,7 @@ python_unittest( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_fusion_ops_passes", srcs = [ "tests/test_fusion_ops_passes.py", @@ -472,7 +473,7 @@ python_unittest( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_remove_ops_passes", srcs = [ "tests/test_remove_ops_passes.py", @@ -494,7 +495,7 @@ python_unittest( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_simplify_ops_passes", srcs = [ "tests/test_simplify_ops_passes.py", @@ -513,7 +514,7 @@ python_unittest( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_reorder_ops_passes", srcs = [ "tests/test_reorder_ops_passes.py", @@ -533,7 +534,7 @@ python_unittest( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "memory_planning_algo", srcs = [ "memory_planning_algo.py", @@ -549,7 +550,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "memory_planning", srcs = [ "memory_planning.py", @@ -567,7 +568,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "memory_constraints", srcs = [ "memory_constraints.py", @@ -582,7 +583,7 @@ runtime.python_library( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_memory_passes", srcs = [ "tests/test_memory_passes.py", @@ -604,7 +605,7 @@ python_unittest( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_idma_ops", srcs = [ "tests/test_idma_ops.py", @@ -619,7 +620,7 @@ python_unittest( ], ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_ref_implementations", srcs = [ "tests/test_ref_implementations.py", @@ -633,7 +634,7 @@ python_unittest( ] ) -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_quantizer_ops", srcs = [ "tests/test_quantizer_ops.py", diff --git a/backends/cadence/aot/quantizer/TARGETS b/backends/cadence/aot/quantizer/BUCK similarity index 73% rename from backends/cadence/aot/quantizer/TARGETS rename to backends/cadence/aot/quantizer/BUCK index d13a69bc79f..34fec2556f8 100644 --- a/backends/cadence/aot/quantizer/TARGETS +++ b/backends/cadence/aot/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("odai_jarvis") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "utils", srcs = [ "utils.py", @@ -13,7 +14,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "patterns", srcs = [ "patterns.py", @@ -25,7 +26,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "quantizer", srcs = [ "quantizer.py", @@ -38,7 +39,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "fusion_pass", srcs = [ "fusion_pass.py", diff --git a/backends/cadence/fusion_g3/operators/BUCK b/backends/cadence/fusion_g3/operators/BUCK index 67f2bab681a..ae1c804f4ba 100644 --- a/backends/cadence/fusion_g3/operators/BUCK +++ b/backends/cadence/fusion_g3/operators/BUCK @@ -1,5 +1,13 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("targets.bzl", "define_common_targets") oncall("odai_jarvis") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/cadence/fusion_g3/operators/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,) diff --git a/backends/cadence/fusion_g3/operators/TARGETS b/backends/cadence/fusion_g3/operators/TARGETS deleted file mode 100644 index 67f2bab681a..00000000000 --- a/backends/cadence/fusion_g3/operators/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load("targets.bzl", "define_common_targets") - -oncall("odai_jarvis") - -define_common_targets() diff --git a/backends/cadence/generic/kernels/BUCK b/backends/cadence/generic/kernels/BUCK index 67f2bab681a..36846c8eb82 100644 --- a/backends/cadence/generic/kernels/BUCK +++ b/backends/cadence/generic/kernels/BUCK @@ -1,5 +1,13 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("targets.bzl", "define_common_targets") oncall("odai_jarvis") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/cadence/generic/kernels/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,) diff --git a/backends/cadence/generic/kernels/TARGETS b/backends/cadence/generic/kernels/TARGETS deleted file mode 100644 index 67f2bab681a..00000000000 --- a/backends/cadence/generic/kernels/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load("targets.bzl", "define_common_targets") - -oncall("odai_jarvis") - -define_common_targets() diff --git a/backends/cadence/hifi/kernels/BUCK b/backends/cadence/hifi/kernels/BUCK index 67f2bab681a..f13598cef1c 100644 --- a/backends/cadence/hifi/kernels/BUCK +++ b/backends/cadence/hifi/kernels/BUCK @@ -1,5 +1,13 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("targets.bzl", "define_common_targets") oncall("odai_jarvis") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/cadence/hifi/kernels/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,) diff --git a/backends/cadence/hifi/kernels/TARGETS b/backends/cadence/hifi/kernels/TARGETS deleted file mode 100644 index 67f2bab681a..00000000000 --- a/backends/cadence/hifi/kernels/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load("targets.bzl", "define_common_targets") - -oncall("odai_jarvis") - -define_common_targets() diff --git a/backends/cadence/hifi/operators/BUCK b/backends/cadence/hifi/operators/BUCK index 67f2bab681a..0cf3011a56e 100644 --- a/backends/cadence/hifi/operators/BUCK +++ b/backends/cadence/hifi/operators/BUCK @@ -1,5 +1,13 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("targets.bzl", "define_common_targets") oncall("odai_jarvis") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/cadence/hifi/operators/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,) diff --git a/backends/cadence/hifi/operators/TARGETS b/backends/cadence/hifi/operators/TARGETS deleted file mode 100644 index 67f2bab681a..00000000000 --- a/backends/cadence/hifi/operators/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load("targets.bzl", "define_common_targets") - -oncall("odai_jarvis") - -define_common_targets() diff --git a/backends/cadence/hifi/third-party/nnlib/BUCK b/backends/cadence/hifi/third-party/nnlib/BUCK index 67f2bab681a..97901e4c6df 100644 --- a/backends/cadence/hifi/third-party/nnlib/BUCK +++ b/backends/cadence/hifi/third-party/nnlib/BUCK @@ -1,5 +1,13 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("targets.bzl", "define_common_targets") oncall("odai_jarvis") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/cadence/hifi/third-party/nnlib/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,) diff --git a/backends/cadence/hifi/third-party/nnlib/TARGETS b/backends/cadence/hifi/third-party/nnlib/TARGETS deleted file mode 100644 index 67f2bab681a..00000000000 --- a/backends/cadence/hifi/third-party/nnlib/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load("targets.bzl", "define_common_targets") - -oncall("odai_jarvis") - -define_common_targets() diff --git a/backends/cadence/runtime/BUCK b/backends/cadence/runtime/BUCK index 9125cc905f8..e92913f37e4 100644 --- a/backends/cadence/runtime/BUCK +++ b/backends/cadence/runtime/BUCK @@ -1,5 +1,36 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load(":targets.bzl", "define_common_targets") oncall("odai_jarvis") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/cadence/runtime/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load(":targets.bzl", "define_common_targets") +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") + + +fbcode_target(_kind = runtime.python_library, + name = "runtime", + srcs = [ + "__init__.py", + "executor.py", + "runtime.py", + "utils.py" + ] + glob([ + "xtsc-cfg/**/*", + ]), + typing = True, + deps = [ + "//caffe2:torch", + "//executorch/devtools/bundled_program:config", + "//executorch/devtools/bundled_program:core", + "//executorch/devtools/bundled_program/serialize:lib", + "//executorch/devtools:lib", + "//executorch/exir:lib", + ":etdump", + ], +) + +fbcode_target(_kind = define_common_targets,) diff --git a/backends/cadence/runtime/TARGETS b/backends/cadence/runtime/TARGETS deleted file mode 100644 index 65a578f4751..00000000000 --- a/backends/cadence/runtime/TARGETS +++ /dev/null @@ -1,28 +0,0 @@ -load(":targets.bzl", "define_common_targets") -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") - -oncall("odai_jarvis") - -runtime.python_library( - name = "runtime", - srcs = [ - "__init__.py", - "executor.py", - "runtime.py", - "utils.py" - ] + glob([ - "xtsc-cfg/**/*", - ]), - typing = True, - deps = [ - "//caffe2:torch", - "//executorch/devtools/bundled_program:config", - "//executorch/devtools/bundled_program:core", - "//executorch/devtools/bundled_program/serialize:lib", - "//executorch/devtools:lib", - "//executorch/exir:lib", - ":etdump", - ], -) - -define_common_targets() diff --git a/backends/cadence/utils/BUCK b/backends/cadence/utils/BUCK new file mode 100644 index 00000000000..7df2c33492d --- /dev/null +++ b/backends/cadence/utils/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("odai_jarvis") + +fbcode_target(_kind = define_common_targets,) diff --git a/backends/cadence/utils/TARGETS b/backends/cadence/utils/TARGETS deleted file mode 100644 index 67f2bab681a..00000000000 --- a/backends/cadence/utils/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load("targets.bzl", "define_common_targets") - -oncall("odai_jarvis") - -define_common_targets() diff --git a/backends/cortex_m/ops/BUCK b/backends/cortex_m/ops/BUCK index 5630c928299..e538e9e1dd6 100644 --- a/backends/cortex_m/ops/BUCK +++ b/backends/cortex_m/ops/BUCK @@ -1,3 +1,5 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # @@ -6,6 +8,31 @@ load("targets.bzl", "define_common_targets") -oncall("executorch") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/cortex_m/ops/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") +load("targets.bzl", "define_common_targets") + + +fbcode_target(_kind = runtime.python_library, + name = "ops", + srcs = [ + "operators.py", + ], + deps = [ + "fbcode//caffe2:torch", + "//executorch/backends/cortex_m/passes:passes_utils", + "//executorch/backends/cortex_m/quantizer:quantization_configs", + ], +) + +fbcode_target(_kind = define_common_targets,) diff --git a/backends/cortex_m/ops/TARGETS b/backends/cortex_m/ops/TARGETS deleted file mode 100644 index 18b387c8ad2..00000000000 --- a/backends/cortex_m/ops/TARGETS +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. - -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -load("targets.bzl", "define_common_targets") - -oncall("executorch") - -runtime.python_library( - name = "ops", - srcs = [ - "operators.py", - ], - deps = [ - "fbcode//caffe2:torch", - "//executorch/backends/cortex_m/passes:passes_utils", - "//executorch/backends/cortex_m/quantizer:quantization_configs", - ], -) - -define_common_targets() diff --git a/backends/cortex_m/passes/TARGETS b/backends/cortex_m/passes/BUCK similarity index 81% rename from backends/cortex_m/passes/TARGETS rename to backends/cortex_m/passes/BUCK index 687aafe57d4..b70dd5b565e 100644 --- a/backends/cortex_m/passes/TARGETS +++ b/backends/cortex_m/passes/BUCK @@ -1,3 +1,4 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # @@ -8,7 +9,7 @@ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name="replace_quant_nodes_pass", srcs=[ "replace_quant_nodes_pass.py", @@ -24,7 +25,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name="passes_utils", srcs=[ "passes_utils.py", diff --git a/backends/cortex_m/quantizer/TARGETS b/backends/cortex_m/quantizer/BUCK similarity index 82% rename from backends/cortex_m/quantizer/TARGETS rename to backends/cortex_m/quantizer/BUCK index 0af105efef0..45962e65ee5 100644 --- a/backends/cortex_m/quantizer/TARGETS +++ b/backends/cortex_m/quantizer/BUCK @@ -1,3 +1,4 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # @@ -8,7 +9,7 @@ load("@fbcode_macros//build_defs:python_library.bzl", "python_library") oncall("executorch") -python_library( +fbcode_target(_kind = python_library, name = "quantizer", srcs = [ "__init__.py", @@ -23,7 +24,7 @@ python_library( ], ) -python_library( +fbcode_target(_kind = python_library, name = "quantization_configs", srcs = [ "quantization_configs.py", diff --git a/backends/cortex_m/test/BUCK b/backends/cortex_m/test/BUCK index 5630c928299..a715de08a4b 100644 --- a/backends/cortex_m/test/BUCK +++ b/backends/cortex_m/test/BUCK @@ -1,3 +1,5 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # @@ -6,6 +8,32 @@ load("targets.bzl", "define_common_targets") -oncall("executorch") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/backends/cortex_m/test/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") +load("targets.bzl", "define_common_targets") + +fbcode_target(_kind = python_unittest, + name="test_replace_quant_nodes", + srcs=[ + "test_helpers_passes_utils.py", + "test_replace_quant_nodes.py", + ], + deps=[ + "//pytorch/ao:torchao", # @manual + "//caffe2:torch", + "//executorch/backends/cortex_m/passes:replace_quant_nodes_pass", + "//executorch/backends/cortex_m/ops:ops", + ], +) + +fbcode_target(_kind = define_common_targets,) diff --git a/backends/cortex_m/test/TARGETS b/backends/cortex_m/test/TARGETS deleted file mode 100644 index 292a087a88a..00000000000 --- a/backends/cortex_m/test/TARGETS +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. - -load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") -load("targets.bzl", "define_common_targets") - -oncall("executorch") -python_unittest( - name="test_replace_quant_nodes", - srcs=[ - "test_helpers_passes_utils.py", - "test_replace_quant_nodes.py", - ], - deps=[ - "//pytorch/ao:torchao", # @manual - "//caffe2:torch", - "//executorch/backends/cortex_m/passes:replace_quant_nodes_pass", - "//executorch/backends/cortex_m/ops:ops", - ], -) - -define_common_targets() diff --git a/backends/cuda/TARGETS b/backends/cuda/BUCK similarity index 83% rename from backends/cuda/TARGETS rename to backends/cuda/BUCK index 3892d5e1742..8afb90ed69c 100644 --- a/backends/cuda/TARGETS +++ b/backends/cuda/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 = "cuda_passes", srcs = [ "passes/__init__.py", @@ -16,7 +17,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "cuda_backend", srcs = [ "cuda_backend.py", @@ -36,7 +37,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "cuda_partitioner", srcs = [ "cuda_partitioner.py", @@ -50,7 +51,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "triton_kernels", srcs = [ "triton/kernels/__init__.py", @@ -64,7 +65,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "triton_replacement_pass", srcs = [ "triton/__init__.py",