1# Any targets that should be shared between fbcode and xplat must be defined in 2# targets.bzl. This file can contain fbcode-only targets. 3 4load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") 5load(":targets.bzl", "define_common_targets") 6 7oncall("executorch") 8 9define_common_targets() 10 11runtime.cxx_python_extension( 12 name = "_training_lib", 13 srcs = [ 14 "_training_lib.cpp", 15 ], 16 base_module = "executorch.extension.training.pybindings", 17 types = ["_training_lib.pyi"], 18 visibility = ["//executorch/extension/training/..."], 19 deps = [ 20 "//executorch/extension/aten_util:aten_bridge", 21 "//executorch/extension/training/optimizer:sgd", 22 ], 23 external_deps = [ 24 "pybind11", 25 "libtorch_python", 26 ], 27) 28 29runtime.python_library( 30 name = "_training_module", 31 srcs = [ 32 "_training_module.py", 33 ], 34 base_module = "executorch.extension.training.pybindings", 35 visibility = ["//executorch/extension/training/..."], 36 deps = [ 37 "//caffe2:torch", 38 "//executorch/extension/pybindings:portable_lib", 39 ], 40) 41