load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

oncall("executorch")

fbcode_target(
    _kind = runtime.python_library,
    name = "recipes",
    srcs = [
        "__init__.py",
    ],
    visibility = ["PUBLIC"],
    deps = [
        ":arm_recipe_provider",
        ":arm_recipe_types",
        "//executorch/export:recipe_registry",
    ],
)

fbcode_target(
    _kind = runtime.python_library,
    name = "arm_recipe_provider",
    srcs = [
        "arm_recipe_provider.py",
    ],
    visibility = ["PUBLIC"],
    deps = [
        ":arm_recipe_types",
        # Imported lazily for the accelerator-config list; declared so the dep
        # does not rely on reaching vela through :ethosu.
        "fbsource//third-party/pypi/ethos-u-vela:ethos-u-vela",
        "//executorch/backends/arm:_factory",
        "//executorch/backends/arm:arm_compile_spec",
        "//executorch/backends/arm:ethosu",
        "//executorch/backends/arm:vgf",
        "//executorch/backends/arm/quantizer:lib",
        "//executorch/backends/arm/tosa:compile_spec",
        "//executorch/backends/cortex_m/passes:replace_quant_nodes_pass",
        "//executorch/exir:lib",
        "//executorch/export:lib",
    ],
)

fbcode_target(
    _kind = runtime.python_library,
    name = "arm_recipe_types",
    srcs = [
        "arm_recipe_types.py",
    ],
    visibility = ["PUBLIC"],
    deps = [
        "//executorch/export:recipe",
    ],
)
