1load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") 2 3def define_common_targets(): 4 """Defines targets that should be shared between fbcode and xplat. 5 6 The directory containing this targets.bzl file should also contain both 7 TARGETS and BUCK files that call this function. 8 """ 9 10 for aten_mode in (True, False): 11 aten_suffix = "_aten" if aten_mode else "" 12 runtime.cxx_test( 13 name = "sgd_test" + aten_suffix, 14 srcs = [ 15 "sgd_test.cpp", 16 ], 17 deps = [ 18 "//executorch/extension/training/optimizer:sgd" + aten_suffix, 19 "//executorch/runtime/core:core", 20 "//executorch/runtime/core/exec_aten/testing_util:tensor_util", 21 ], 22 ) 23