1# Copyright (c) Meta Platforms, Inc. and affiliates. 2# All rights reserved. 3# 4# Copyright 2024 Arm Limited and/or its affiliates. 5# 6# This source code is licensed under the BSD-style license found in the 7# LICENSE file in the root directory of this source tree. 8 9# Inherited by all other targets. When a key already exists, the elements of the 10# target's value are appended to lists here. 11[target_base] 12excludes = [ 13 "^third-party", 14] 15 16# ---------------------------------- core start ---------------------------------- 17 18[targets.executorch] 19buck_targets = [ 20 "//runtime/executor:program", 21] 22deps = [ 23 "executorch_core", 24] 25filters = [ 26 ".cpp$", 27] 28 29 30[targets.executorch_core] 31buck_targets = [ 32 "//runtime/executor:program_no_prim_ops", 33] 34deps = [ 35 "program_schema", 36] 37filters = [ 38 ".cpp$", 39] 40 41 42[targets.portable_kernels] 43buck_targets = [ 44 # //kernels/portable:operators would be more appropriate, but buck2 doesn't 45 # think it has any "inputs" since its srcs list is empty. 46 "//kernels/portable:generated_lib", 47] 48filters = [ 49 ".cpp$", 50] 51excludes = [ 52 # Exclude the codegen templates, which are picked up because the buck target 53 # is the generated_lib and not the unwrapped set of kernels. 54 "^codegen/templates", 55] 56deps = [ 57 "executorch", 58 "executorch_core", 59] 60 61[targets.optimized_kernels] 62buck_targets = [ 63 "//kernels/optimized:generated_lib", 64] 65filters = [ 66 ".cpp$", 67] 68excludes = [ 69 # Exclude the codegen templates, which are picked up because the buck target 70 # is the generated_lib and not the unwrapped set of kernels. 71 "^codegen/templates", 72] 73deps = [ 74 "executorch", 75 "executorch_core", 76 "extension_threadpool", 77 "portable_kernels", 78] 79 80[targets.quantized_kernels] 81buck_targets = [ 82 "//kernels/quantized:generated_lib", 83] 84filters = [ 85 ".cpp$", 86] 87excludes = [ 88 # Exclude the codegen templates, which are picked up because the buck target 89 # is the generated_lib and not the unwrapped set of kernels. 90 "^codegen/templates", 91] 92deps = [ 93 "executorch", 94 "executorch_core", 95 "portable_kernels", 96] 97 98[targets.program_schema] 99buck_targets = [ 100 "//schema:program", 101] 102filters = [ 103 ".fbs$", 104] 105 106[targets.optimized_cpublas] 107buck_targets = [ 108 "//kernels/optimized:libblas", 109] 110filters = [ 111 ".cpp$", 112] 113excludes = [ 114] 115deps = [ 116 "executorch_core", 117 "executorch", 118] 119 120[targets.optimized_native_cpu_ops_oss] 121buck_targets = [ 122 "//configurations:optimized_native_cpu_ops_oss", 123] 124filters = [ 125 ".cpp$", 126] 127excludes = [ 128] 129deps = [ 130 "executorch_core", 131 "executorch", 132 "portable_kernels", 133] 134# ---------------------------------- core end ---------------------------------- 135# ---------------------------------- extension start ---------------------------------- 136[targets.extension_data_loader] 137buck_targets = [ 138 "//extension/data_loader:buffer_data_loader", 139 "//extension/data_loader:file_data_loader", 140 "//extension/data_loader:mmap_data_loader", 141 "//extension/data_loader:shared_ptr_data_loader", 142] 143filters = [ 144 ".cpp$", 145] 146deps = [ 147 "executorch_core", 148 "executorch", 149] 150 151[targets.extension_module] 152buck_targets = [ 153 "//extension/module:module", 154] 155filters = [ 156 ".cpp$", 157] 158deps = [ 159 "executorch", 160 "executorch_core", 161 "extension_data_loader", 162] 163 164[targets.extension_runner_util] 165buck_targets = [ 166 "//extension/runner_util:inputs", 167] 168filters = [ 169 ".cpp$", 170] 171deps = [ 172 "executorch", 173 "executorch_core", 174] 175 176[targets.extension_llm_runner] 177buck_targets = [ 178 "//extension/llm/runner:runner_lib", 179] 180filters = [ 181 ".cpp$", 182] 183deps = [ 184 "executorch", 185 "executorch_core", 186 "extension_module", 187 "extension_runner_util", 188] 189 190[targets.extension_tensor] 191buck_targets = [ 192 "//extension/tensor:tensor", 193] 194filters = [ 195 ".cpp$", 196] 197deps = [ 198 "executorch", 199 "executorch_core", 200] 201 202[targets.extension_threadpool] 203buck_targets = [ 204 "//extension/threadpool:threadpool", 205] 206filters = [ 207 ".cpp$", 208] 209deps = [ 210 "executorch", 211 "executorch_core", 212] 213 214[targets.extension_training] 215buck_targets = [ 216 "//extension/training/module:training_module", 217 "//extension/training/optimizer:sgd", 218] 219filters = [ 220 ".cpp$", 221] 222deps = [ 223 "executorch_core", 224] 225 226[targets.train_xor] 227buck_targets = [ 228 "//extension/training/examples/XOR:train_xor", 229] 230filters = [ 231 ".cpp$", 232] 233excludes = [ 234 "^codegen", 235] 236deps = [ 237 "executorch", 238 "executorch_core", 239 "portable_kernels", 240] 241# ---------------------------------- extension end ---------------------------------- 242# ---------------------------------- binary start ---------------------------------- 243 244[targets.executor_runner] 245buck_targets = [ 246 "//examples/portable/executor_runner:executor_runner", 247] 248filters = [ 249 ".cpp$", 250] 251excludes = [ 252 "^codegen", 253] 254deps = [ 255 "executorch", 256 "executorch_core", 257 "portable_kernels", 258 "quantized_kernels", 259] 260 261[targets.size_test] 262buck_targets = [ 263 "//test:size_test", 264] 265filters = [ 266 ".cpp$", 267] 268excludes = [ 269 "^codegen", 270] 271deps = [ 272 "executorch_core", 273 "executorch", 274] 275# ---------------------------------- binary end ---------------------------------- 276# ---------------------------------- MPS start ---------------------------------- 277[targets.mps_executor_runner] 278buck_targets = [ 279 "//examples/apple/mps/executor_runner:mps_executor_runner", 280] 281filters = [ 282 "(.mm|.cpp)$", 283] 284excludes = [ 285 "^codegen", 286] 287deps = [ 288 "executorch", 289 "executorch_core", 290 "portable_kernels", 291] 292 293[targets.mps_backend] 294buck_targets = [ 295 "//backends/apple/mps:mps", 296] 297filters = [ 298 "(.mm|.cpp)$", 299] 300deps = [ 301 "executorch", 302 "executorch_core", 303] 304 305[targets.mps_schema] 306buck_targets = [ 307 "//backends/apple/mps:mps_schema", 308] 309filters = [ 310 ".fbs$", 311] 312 313# ---------------------------------- MPS end ---------------------------------- 314# ---------------------------------- XNNPACK start ---------------------------------- 315 316[targets.xnn_executor_runner] 317buck_targets = [ 318 "//examples/xnnpack:xnn_executor_runner", 319] 320filters = [ 321 ".cpp$", 322] 323excludes = [ 324 "^codegen", 325] 326deps = [ 327 "executorch", 328 "executorch_core", 329 "xnnpack_backend", 330 "portable_kernels", 331] 332 333[targets.xnnpack_backend] 334buck_targets = [ 335 "//backends/xnnpack:xnnpack_backend", 336] 337filters = [ 338 ".cpp$", 339] 340deps = [ 341 "executorch", 342 "executorch_core", 343] 344 345[targets.xnnpack_schema] 346buck_targets = [ 347 "//backends/xnnpack/serialization:xnnpack_flatbuffer_header", 348] 349filters = [ 350 ".fbs$", 351] 352# ---------------------------------- XNNPACK end ---------------------------------- 353# ---------------------------------- Vulkan start --------------------------------- 354[targets.vulkan_schema] 355buck_targets = [ 356 "//backends/vulkan/serialization:vk_delegate_schema", 357] 358filters = [ 359 ".fbs$", 360] 361# ---------------------------------- Vulkan end ----------------------------------- 362# ---------------------------------- LLama start ---------------------------------- 363[targets.custom_ops] 364buck_targets = [ 365 "//extension/llm/custom_ops:custom_ops", 366] 367filters = [ 368 # Second clause is to pick up fht_neon.c/fht_avx.c from FFHT. TODO: 369 # remove filters and patch extract_sources.py's Buck query to fetch 370 # srcs; presumably filters is here to remove .h files. 371 "(.cpp$)|(fht.*\\.c$)", 372] 373excludes = [ 374 "^codegen", 375] 376deps = [ 377 "executorch", 378 "executorch_core", 379 "optimized_kernels", 380 "extension_threadpool", 381 "xnnpack_backend", 382] 383 384[targets.llama_runner] 385buck_targets = [ 386 "//examples/models/llama/runner:runner", 387] 388filters = [ 389 ".cpp$", 390] 391excludes = [ 392 "^codegen", 393] 394deps = [ 395 "custom_ops", 396 "executorch", 397 "executorch_core", 398 "extension_data_loader", 399 "extension_module", 400 "portable_kernels", 401 "quantized_kernels", 402 "xnnpack_backend", 403 "optimized_native_cpu_ops_oss", 404] 405# ---------------------------------- LLama end ---------------------------------- 406