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 runtime.cxx_library( 14 name = "thread_parallel" + aten_suffix, 15 srcs = [ 16 "thread_parallel.cpp", 17 ], 18 exported_headers = [ 19 "thread_parallel.h", 20 ], 21 visibility = [ 22 "//executorch/...", 23 "@EXECUTORCH_CLIENTS", 24 ], 25 deps = [ 26 "//executorch/extension/threadpool:threadpool", 27 "//executorch/runtime/core:core", 28 "//executorch/runtime/core/exec_aten/util:tensor_util" + aten_suffix, 29 ], 30 ) 31