diff --git a/devtools/backend_debug/tests/TARGETS b/devtools/backend_debug/tests/BUCK similarity index 76% rename from devtools/backend_debug/tests/TARGETS rename to devtools/backend_debug/tests/BUCK index ae234df8ce4..4e02fff7471 100644 --- a/devtools/backend_debug/tests/TARGETS +++ b/devtools/backend_debug/tests/BUCK @@ -1,8 +1,9 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") oncall("executorch") -python_unittest( +fbcode_target(_kind = python_unittest, name = "test_delegation_info", srcs = [ "test_delegation_info.py", diff --git a/devtools/bundled_program/BUCK b/devtools/bundled_program/BUCK index 0a42614a385..ec6a05df0f2 100644 --- a/devtools/bundled_program/BUCK +++ b/devtools/bundled_program/BUCK @@ -1,5 +1,52 @@ +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/devtools/bundled_program/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") +load(":targets.bzl", "define_common_targets") + + +fbcode_target(_kind = define_common_targets,) + +fbcode_target(_kind = runtime.python_library, + name = "core", + srcs = [ + "core.py", + ], + visibility = ["PUBLIC"], + deps = [ + ":config", + ":version", + "//caffe2:torch", + "//executorch/devtools/bundled_program/schema:bundled_program_schema_py", + "//executorch/exir:schema", + "//executorch/exir:tensor", + ], +) + +fbcode_target(_kind = runtime.python_library, + name = "config", + srcs = [ + "config.py", + ], + visibility = ["PUBLIC"], + deps = [ + "fbsource//third-party/pypi/typing-extensions:typing-extensions", + "//caffe2:torch", + ], +) + +fbcode_target(_kind = runtime.python_library, + name = "version", + srcs = [ + "version.py", + ], + visibility = [ + "//executorch/devtools/...", + ], +) diff --git a/devtools/bundled_program/TARGETS b/devtools/bundled_program/TARGETS deleted file mode 100644 index 10d4d0b9154..00000000000 --- a/devtools/bundled_program/TARGETS +++ /dev/null @@ -1,44 +0,0 @@ -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets() - -runtime.python_library( - name = "core", - srcs = [ - "core.py", - ], - visibility = ["PUBLIC"], - deps = [ - ":config", - ":version", - "//caffe2:torch", - "//executorch/devtools/bundled_program/schema:bundled_program_schema_py", - "//executorch/exir:schema", - "//executorch/exir:tensor", - ], -) - -runtime.python_library( - name = "config", - srcs = [ - "config.py", - ], - visibility = ["PUBLIC"], - deps = [ - "fbsource//third-party/pypi/typing-extensions:typing-extensions", - "//caffe2:torch", - ], -) - -runtime.python_library( - name = "version", - srcs = [ - "version.py", - ], - visibility = [ - "//executorch/devtools/...", - ], -) diff --git a/devtools/bundled_program/schema/BUCK b/devtools/bundled_program/schema/BUCK index 1e8cc179228..84ac296c4e5 100644 --- a/devtools/bundled_program/schema/BUCK +++ b/devtools/bundled_program/schema/BUCK @@ -1,8 +1,35 @@ +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/devtools/bundled_program/schema/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +# Any targets that should be shared between fbcode and xplat must be defined in +# targets.bzl. This file can contain fbcode-only targets. + +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") +load(":targets.bzl", "define_common_targets") + + +fbcode_target(_kind = define_common_targets,) + +fbcode_target(_kind = runtime.python_library, + name = "bundled_program_schema_py", + srcs = [ + "__init__.py", + "bundled_program_schema.py", + ], + visibility = [ + "//executorch/devtools/bundled_program/...", + "//executorch/devtools/etrecord/...", + ], + deps = [ + "//executorch/exir:scalar_type", + ], +) diff --git a/devtools/bundled_program/schema/TARGETS b/devtools/bundled_program/schema/TARGETS deleted file mode 100644 index 51c004cbec0..00000000000 --- a/devtools/bundled_program/schema/TARGETS +++ /dev/null @@ -1,24 +0,0 @@ -# Any targets that should be shared between fbcode and xplat must be defined in -# targets.bzl. This file can contain fbcode-only targets. - -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets() - -runtime.python_library( - name = "bundled_program_schema_py", - srcs = [ - "__init__.py", - "bundled_program_schema.py", - ], - visibility = [ - "//executorch/devtools/bundled_program/...", - "//executorch/devtools/etrecord/...", - ], - deps = [ - "//executorch/exir:scalar_type", - ], -) diff --git a/devtools/bundled_program/schema/test/BUCK b/devtools/bundled_program/schema/test/BUCK index 3f3e1a3d319..9f3ea02867a 100644 --- a/devtools/bundled_program/schema/test/BUCK +++ b/devtools/bundled_program/schema/test/BUCK @@ -1,4 +1,17 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # add this empty BUCK file to unblock landing. Without this, we get land error: # "No build file at xplat/executorch/devtools/bundled_program/test/BUCK when resolving target fbsource//xplat/executorch/devtools/bundled_program/test/BUCK:." -oncall("executorch") + +# !!!! fbcode/executorch/devtools/bundled_program/schema/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") + + +fbcode_target(_kind = python_unittest, + name = "schema", + srcs = [ + "test_schema.py", + ], +) diff --git a/devtools/bundled_program/schema/test/TARGETS b/devtools/bundled_program/schema/test/TARGETS deleted file mode 100644 index 6c0b5ff7260..00000000000 --- a/devtools/bundled_program/schema/test/TARGETS +++ /dev/null @@ -1,10 +0,0 @@ -load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") - -oncall("executorch") - -python_unittest( - name = "schema", - srcs = [ - "test_schema.py", - ], -) diff --git a/devtools/bundled_program/serialize/TARGETS b/devtools/bundled_program/serialize/BUCK similarity index 86% rename from devtools/bundled_program/serialize/TARGETS rename to devtools/bundled_program/serialize/BUCK index 1cacc04dc18..ae920d1e4c2 100644 --- a/devtools/bundled_program/serialize/TARGETS +++ b/devtools/bundled_program/serialize/BUCK @@ -1,10 +1,11 @@ +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") # Use runtime.python_library instead of the one defined in python_library.bzl, # so we can have access to EXECUTORCH_CLIENTS list. -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "lib", srcs = [ "__init__.py", diff --git a/devtools/bundled_program/serialize/test/BUCK b/devtools/bundled_program/serialize/test/BUCK index 7a2e1e302d8..e3cb3fbe279 100644 --- a/devtools/bundled_program/serialize/test/BUCK +++ b/devtools/bundled_program/serialize/test/BUCK @@ -1,4 +1,22 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # add this empty BUCK file to unblock landing. Without this, we get land error: # "No build file at xplat/executorch/devtools/bundled_program/serialize/test/BUCK when resolving target fbsource//xplat/executorch/devtools/bundled_program/serialize/test/BUCK:." -oncall("executorch") + +# !!!! fbcode/executorch/devtools/bundled_program/serialize/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") + + +fbcode_target(_kind = python_unittest, + name = "serialize", + srcs = [ + "test_serialize.py", + ], + deps = [ + "//executorch/devtools/bundled_program:core", + "//executorch/devtools/bundled_program/serialize:lib", + "//executorch/devtools/bundled_program/util:test_util", + ], +) diff --git a/devtools/bundled_program/serialize/test/TARGETS b/devtools/bundled_program/serialize/test/TARGETS deleted file mode 100644 index 4c6bfbe3d5e..00000000000 --- a/devtools/bundled_program/serialize/test/TARGETS +++ /dev/null @@ -1,15 +0,0 @@ -load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") - -oncall("executorch") - -python_unittest( - name = "serialize", - srcs = [ - "test_serialize.py", - ], - deps = [ - "//executorch/devtools/bundled_program:core", - "//executorch/devtools/bundled_program/serialize:lib", - "//executorch/devtools/bundled_program/util:test_util", - ], -) diff --git a/devtools/bundled_program/test/BUCK b/devtools/bundled_program/test/BUCK index 213d4c228d1..7809f382bb5 100644 --- a/devtools/bundled_program/test/BUCK +++ b/devtools/bundled_program/test/BUCK @@ -1,4 +1,70 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # add this empty BUCK file to unblock landing. Without this, we get land error: # "No build file at xplat/executorch/exir/tests/BUCK when resolving target fbsource//xplat/executorch/exir/tests:." -oncall("executorch") + +# !!!! fbcode/executorch/devtools/bundled_program/test/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +# @noautodeps + +load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") + + +fbcode_target(_kind = python_unittest, + name = "bundle_data", + srcs = [ + "test_bundle_data.py", + ], + deps = [ + "//caffe2:torch", + "//executorch/devtools/bundled_program:config", + "//executorch/devtools/bundled_program:core", + "//executorch/devtools/bundled_program/schema:bundled_program_schema_py", + "//executorch/devtools/bundled_program/util:test_util", + "//executorch/exir/_serialize:lib", + ], +) + +fbcode_target(_kind = python_unittest, + name = "config", + srcs = [ + "test_config.py", + ], + deps = [ + "//caffe2:torch", + "//executorch/devtools/bundled_program:config", + "//executorch/devtools/bundled_program/util:test_util", + "//executorch/extension/pytree:pylib", + ], +) + +fbcode_target(_kind = python_unittest, + name = "end2end", + srcs = [ + "test_end2end.py", + ], + deps = [ + "//caffe2:torch", + "//executorch/devtools/bundled_program:config", + "//executorch/devtools/bundled_program:core", + "//executorch/devtools/bundled_program/serialize:lib", + "//executorch/devtools/bundled_program/util:test_util", + "//executorch/exir:dynamic_shape", + "//executorch/exir:lib", + "//executorch/exir:memory", + "//executorch/exir:pass_manager", + "//executorch/exir:print_program", + "//executorch/exir:tensor", + "//executorch/exir/_serialize:lib", + "//executorch/exir/emit:lib", + "//executorch/exir/passes:lib", + "//executorch/exir/tests:control_flow_models", + "//executorch/exir/tests:dynamic_shape_models", + "//executorch/exir/tests:models", + "//executorch/exir/tests:transformer", + "//executorch/extension/pybindings:portable_lib", + "//executorch/extension/pytree:pybindings", + "//executorch/kernels/portable:custom_ops_generated_lib", + ], +) diff --git a/devtools/bundled_program/test/TARGETS b/devtools/bundled_program/test/TARGETS deleted file mode 100644 index 652c74b8f43..00000000000 --- a/devtools/bundled_program/test/TARGETS +++ /dev/null @@ -1,63 +0,0 @@ -# @noautodeps - -load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") - -oncall("executorch") - -python_unittest( - name = "bundle_data", - srcs = [ - "test_bundle_data.py", - ], - deps = [ - "//caffe2:torch", - "//executorch/devtools/bundled_program:config", - "//executorch/devtools/bundled_program:core", - "//executorch/devtools/bundled_program/schema:bundled_program_schema_py", - "//executorch/devtools/bundled_program/util:test_util", - "//executorch/exir/_serialize:lib", - ], -) - -python_unittest( - name = "config", - srcs = [ - "test_config.py", - ], - deps = [ - "//caffe2:torch", - "//executorch/devtools/bundled_program:config", - "//executorch/devtools/bundled_program/util:test_util", - "//executorch/extension/pytree:pylib", - ], -) - -python_unittest( - name = "end2end", - srcs = [ - "test_end2end.py", - ], - deps = [ - "//caffe2:torch", - "//executorch/devtools/bundled_program:config", - "//executorch/devtools/bundled_program:core", - "//executorch/devtools/bundled_program/serialize:lib", - "//executorch/devtools/bundled_program/util:test_util", - "//executorch/exir:dynamic_shape", - "//executorch/exir:lib", - "//executorch/exir:memory", - "//executorch/exir:pass_manager", - "//executorch/exir:print_program", - "//executorch/exir:tensor", - "//executorch/exir/_serialize:lib", - "//executorch/exir/emit:lib", - "//executorch/exir/passes:lib", - "//executorch/exir/tests:control_flow_models", - "//executorch/exir/tests:dynamic_shape_models", - "//executorch/exir/tests:models", - "//executorch/exir/tests:transformer", - "//executorch/extension/pybindings:portable_lib", - "//executorch/extension/pytree:pybindings", - "//executorch/kernels/portable:custom_ops_generated_lib", - ], -) diff --git a/devtools/bundled_program/util/BUCK b/devtools/bundled_program/util/BUCK index a241c3384a6..d32ca7c6ca3 100644 --- a/devtools/bundled_program/util/BUCK +++ b/devtools/bundled_program/util/BUCK @@ -1,4 +1,23 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # add this empty BUCK file to unblock landing. Without this, we get land error: # "No build file at xplat/executorch/devtools/bundled_program/util/BUCK when resolving target fbsource//xplat/executorch/devtools/bundled_program/util/BUCK:." -oncall("executorch") + +# !!!! fbcode/executorch/devtools/bundled_program/util/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") + + +fbcode_target(_kind = runtime.python_library, + name = "test_util", + srcs = [ + "test_util.py", + ], + visibility = ["//executorch/devtools/bundled_program/..."], + deps = [ + "//caffe2:torch", + "//executorch/devtools/bundled_program:config", + "//executorch/exir:lib", + ], +) diff --git a/devtools/bundled_program/util/TARGETS b/devtools/bundled_program/util/TARGETS deleted file mode 100644 index b41e1ffd775..00000000000 --- a/devtools/bundled_program/util/TARGETS +++ /dev/null @@ -1,16 +0,0 @@ -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") - -oncall("executorch") - -runtime.python_library( - name = "test_util", - srcs = [ - "test_util.py", - ], - visibility = ["//executorch/devtools/bundled_program/..."], - deps = [ - "//caffe2:torch", - "//executorch/devtools/bundled_program:config", - "//executorch/exir:lib", - ], -) diff --git a/devtools/debug_format/TARGETS b/devtools/debug_format/BUCK similarity index 65% rename from devtools/debug_format/TARGETS rename to devtools/debug_format/BUCK index 2cbf7cf8048..8fbec46f028 100644 --- a/devtools/debug_format/TARGETS +++ b/devtools/debug_format/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 = "base_schema", srcs = [ "base_schema.py", @@ -11,7 +12,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "et_schema", srcs = [ "et_schema.py", diff --git a/devtools/etdump/BUCK b/devtools/etdump/BUCK index 0a42614a385..9695d864275 100644 --- a/devtools/etdump/BUCK +++ b/devtools/etdump/BUCK @@ -1,5 +1,47 @@ +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/devtools/etdump/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") +load(":targets.bzl", "define_common_targets") + + +fbcode_target(_kind = define_common_targets,) + +fbcode_target(_kind = runtime.python_library, + name = "schema_flatcc", + srcs = [ + "schema_flatcc.py", + ], + visibility = [ + "//executorch/devtools/...", + ], + deps = [ + "//executorch/exir:scalar_type", + ], +) + +fbcode_target(_kind = runtime.python_library, + name = "serialize", + srcs = [ + "serialize.py", + ], + resources = { + "//executorch/devtools/etdump:etdump_schema_flatcc.fbs": "etdump_schema_flatcc.fbs", + "//executorch/schema:scalar_type.fbs": "scalar_type.fbs", + }, + visibility = [ + "//executorch/devtools/...", + "//executorch/runtime/test/...", + ], + deps = [ + "fbsource//third-party/pypi/setuptools:setuptools", + ":schema_flatcc", + "//executorch/exir/_serialize:lib", + ], +) diff --git a/devtools/etdump/TARGETS b/devtools/etdump/TARGETS deleted file mode 100644 index b67802e64b3..00000000000 --- a/devtools/etdump/TARGETS +++ /dev/null @@ -1,39 +0,0 @@ -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets() - -runtime.python_library( - name = "schema_flatcc", - srcs = [ - "schema_flatcc.py", - ], - visibility = [ - "//executorch/devtools/...", - ], - deps = [ - "//executorch/exir:scalar_type", - ], -) - -runtime.python_library( - name = "serialize", - srcs = [ - "serialize.py", - ], - resources = { - "//executorch/devtools/etdump:etdump_schema_flatcc.fbs": "etdump_schema_flatcc.fbs", - "//executorch/schema:scalar_type.fbs": "scalar_type.fbs", - }, - visibility = [ - "//executorch/devtools/...", - "//executorch/runtime/test/...", - ], - deps = [ - "fbsource//third-party/pypi/setuptools:setuptools", - ":schema_flatcc", - "//executorch/exir/_serialize:lib", - ], -) diff --git a/devtools/etdump/data_sinks/BUCK b/devtools/etdump/data_sinks/BUCK index 0a42614a385..d90bb5ed20c 100644 --- a/devtools/etdump/data_sinks/BUCK +++ b/devtools/etdump/data_sinks/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("executorch") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/devtools/etdump/data_sinks/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/devtools/etdump/data_sinks/TARGETS b/devtools/etdump/data_sinks/TARGETS deleted file mode 100644 index 0a42614a385..00000000000 --- a/devtools/etdump/data_sinks/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets() diff --git a/devtools/etdump/data_sinks/tests/BUCK b/devtools/etdump/data_sinks/tests/BUCK new file mode 100644 index 00000000000..f5029903c21 --- /dev/null +++ b/devtools/etdump/data_sinks/tests/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/devtools/etdump/data_sinks/tests/TARGETS b/devtools/etdump/data_sinks/tests/TARGETS deleted file mode 100644 index 0a42614a385..00000000000 --- a/devtools/etdump/data_sinks/tests/TARGETS +++ /dev/null @@ -1,5 +0,0 @@ -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets() diff --git a/devtools/etdump/tests/TARGETS b/devtools/etdump/tests/BUCK similarity index 68% rename from devtools/etdump/tests/TARGETS rename to devtools/etdump/tests/BUCK index 51e807891df..d038ad12002 100644 --- a/devtools/etdump/tests/TARGETS +++ b/devtools/etdump/tests/BUCK @@ -1,11 +1,12 @@ +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(":targets.bzl", "define_common_targets") oncall("executorch") -define_common_targets() +fbcode_target(_kind = define_common_targets,) -python_unittest( +fbcode_target(_kind = python_unittest, name = "serialize_test", srcs = [ "serialize_test.py", diff --git a/devtools/etrecord/TARGETS b/devtools/etrecord/BUCK similarity index 76% rename from devtools/etrecord/TARGETS rename to devtools/etrecord/BUCK index 3bb70ef4564..5197c39d3e0 100644 --- a/devtools/etrecord/TARGETS +++ b/devtools/etrecord/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 = "etrecord", srcs = [ "__init__.py", diff --git a/devtools/etrecord/tests/TARGETS b/devtools/etrecord/tests/BUCK similarity index 81% rename from devtools/etrecord/tests/TARGETS rename to devtools/etrecord/tests/BUCK index 59f73bdb406..f5d031d40fb 100644 --- a/devtools/etrecord/tests/TARGETS +++ b/devtools/etrecord/tests/BUCK @@ -1,9 +1,10 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") oncall("executorch") -python_unittest( +fbcode_target(_kind = python_unittest, name = "etrecord_test", srcs = ["etrecord_test.py"], deps = [ @@ -11,7 +12,7 @@ python_unittest( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "etrecord_test_library", srcs = ["etrecord_test.py"], deps = [ diff --git a/devtools/inspector/TARGETS b/devtools/inspector/BUCK similarity index 85% rename from devtools/inspector/TARGETS rename to devtools/inspector/BUCK index 8834dfbb6ba..4b17939582b 100644 --- a/devtools/inspector/TARGETS +++ b/devtools/inspector/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_binary.bzl", "python_binary") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "inspector", srcs = [ "_inspector.py", @@ -23,7 +24,7 @@ runtime.python_library( ], ) -python_binary( +fbcode_target(_kind = python_binary, name = "inspector_cli", main_function = ".inspector_cli.main", main_src = "inspector_cli.py", @@ -33,7 +34,7 @@ python_binary( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "inspector_utils", srcs = [ "_inspector_utils.py", @@ -50,7 +51,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "intermediate_output_capturer", srcs = [ "_intermediate_output_capturer.py", @@ -60,7 +61,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "lib", srcs = ["__init__.py"], deps = [ diff --git a/devtools/inspector/numerical_comparator/TARGETS b/devtools/inspector/numerical_comparator/BUCK similarity index 77% rename from devtools/inspector/numerical_comparator/TARGETS rename to devtools/inspector/numerical_comparator/BUCK index eb2923d924d..2c55931e6fb 100644 --- a/devtools/inspector/numerical_comparator/TARGETS +++ b/devtools/inspector/numerical_comparator/BUCK @@ -1,15 +1,16 @@ +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 = "numerical_comparator_base", srcs = ["numerical_comparator_base.py"], deps = [], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "l1_numerical_comparator", srcs = ["l1_numerical_comparator.py"], deps = [ @@ -18,7 +19,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "mse_numerical_comparator", srcs = ["mse_numerical_comparator.py"], deps = [ @@ -27,7 +28,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "snr_numerical_comparator", srcs = ["snr_numerical_comparator.py"], deps = [ @@ -36,7 +37,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "lib", srcs = ["__init__.py"], deps = [