diff --git a/extension/training/module/test/BUCK b/extension/training/module/test/BUCK index 1e8cc179228..494f86c619c 100644 --- a/extension/training/module/test/BUCK +++ b/extension/training/module/test/BUCK @@ -1,8 +1,19 @@ +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/extension/training/module/test/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(":targets.bzl", "define_common_targets") + + +fbcode_target(_kind = define_common_targets,is_fbcode = True) diff --git a/extension/training/module/test/TARGETS b/extension/training/module/test/TARGETS deleted file mode 100644 index a6c52d105f6..00000000000 --- a/extension/training/module/test/TARGETS +++ /dev/null @@ -1,8 +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(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets(is_fbcode = True) diff --git a/extension/training/optimizer/BUCK b/extension/training/optimizer/BUCK index 1e8cc179228..21b4f993cb7 100644 --- a/extension/training/optimizer/BUCK +++ b/extension/training/optimizer/BUCK @@ -1,8 +1,19 @@ +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/extension/training/optimizer/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(":targets.bzl", "define_common_targets") + + +fbcode_target(_kind = define_common_targets,) diff --git a/extension/training/optimizer/TARGETS b/extension/training/optimizer/TARGETS deleted file mode 100644 index 2341af9282f..00000000000 --- a/extension/training/optimizer/TARGETS +++ /dev/null @@ -1,8 +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(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets() diff --git a/extension/training/optimizer/test/BUCK b/extension/training/optimizer/test/BUCK index 1e8cc179228..b580fa41061 100644 --- a/extension/training/optimizer/test/BUCK +++ b/extension/training/optimizer/test/BUCK @@ -1,8 +1,19 @@ +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/extension/training/optimizer/test/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(":targets.bzl", "define_common_targets") + + +fbcode_target(_kind = define_common_targets,) diff --git a/extension/training/optimizer/test/TARGETS b/extension/training/optimizer/test/TARGETS deleted file mode 100644 index 2341af9282f..00000000000 --- a/extension/training/optimizer/test/TARGETS +++ /dev/null @@ -1,8 +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(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets() diff --git a/extension/training/pybindings/BUCK b/extension/training/pybindings/BUCK index 1e8cc179228..0c0b7a26202 100644 --- a/extension/training/pybindings/BUCK +++ b/extension/training/pybindings/BUCK @@ -1,8 +1,49 @@ +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/extension/training/pybindings/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.cxx_python_extension, + name = "_training_lib", + srcs = [ + "_training_lib.cpp", + ], + base_module = "executorch.extension.training.pybindings", + types = ["_training_lib.pyi"], + visibility = ["//executorch/extension/training/..."], + deps = [ + "fbsource//third-party/pybind11:pybind11", + "//executorch/extension/aten_util:aten_bridge", + "//executorch/extension/training/optimizer:sgd", + ], + external_deps = ["libtorch_python"], +) + +fbcode_target(_kind = runtime.python_library, + name = "_training_module", + srcs = [ + "_training_module.py", + ], + base_module = "executorch.extension.training.pybindings", + visibility = ["//executorch/extension/training/..."], + deps = [ + "//caffe2:torch", + "//executorch/extension/pybindings:portable_lib", + ], +) diff --git a/extension/training/pybindings/TARGETS b/extension/training/pybindings/TARGETS deleted file mode 100644 index 19b54961493..00000000000 --- a/extension/training/pybindings/TARGETS +++ /dev/null @@ -1,38 +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.cxx_python_extension( - name = "_training_lib", - srcs = [ - "_training_lib.cpp", - ], - base_module = "executorch.extension.training.pybindings", - types = ["_training_lib.pyi"], - visibility = ["//executorch/extension/training/..."], - deps = [ - "fbsource//third-party/pybind11:pybind11", - "//executorch/extension/aten_util:aten_bridge", - "//executorch/extension/training/optimizer:sgd", - ], - external_deps = ["libtorch_python"], -) - -runtime.python_library( - name = "_training_module", - srcs = [ - "_training_module.py", - ], - base_module = "executorch.extension.training.pybindings", - visibility = ["//executorch/extension/training/..."], - deps = [ - "//caffe2:torch", - "//executorch/extension/pybindings:portable_lib", - ], -)