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 13 # if aten_mode: 14 # kernel_deps = [ 15 # "//executorch/kernels/aten:generated_lib", 16 # "//executorch/kernels/aten:generated_lib_headers", 17 # "//executorch/kernels/test:function_header_wrapper_aten", 18 # ] 19 # else: 20 # kernel_deps = [ 21 # "//executorch/kernels/portable/cpu:op_add", 22 # "//executorch/kernels/portable/cpu:op_mul", 23 # "//executorch/kernels/portable/cpu:op_clone", 24 # "//executorch/kernels/portable:generated_lib_headers", 25 # ] 26 27 runtime.cxx_library( 28 name = "sgd" + aten_suffix, 29 srcs = [ 30 "sgd.cpp", 31 ], 32 exported_headers = [ 33 "sgd.h", 34 ], 35 exported_deps = [ 36 "//executorch/runtime/core:core", 37 "//executorch/runtime/core/exec_aten:lib" + aten_suffix, 38 ], # + kernel_deps, 39 visibility = [ 40 "@EXECUTORCH_CLIENTS", 41 ], 42 ) 43