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

oncall("executorch")

runtime.python_library(
    name = "xnnpack_partitioner",
    srcs = [
        "xnnpack_partitioner.py",
    ],
    visibility = [
        "//executorch/...",
        "@EXECUTORCH_CLIENTS",
    ],
    deps = [
        ":partitioner_graphs",
        "//executorch/backends/xnnpack:xnnpack_preprocess",
        "//executorch/backends/xnnpack/partition/config:xnnpack_partitioner_configs",
        "//executorch/exir:delegate",
        "//executorch/exir:lib",
        "//executorch/exir/backend:partitioner",
        "//executorch/exir/backend:utils",
        "//executorch/exir/backend/canonical_partitioners:canonical_partitioner_lib",
    ],
)

runtime.python_library(
    name = "partitioner_graphs",
    srcs = glob([
        "graphs/*.py",
    ]),
    visibility = [
        "//executorch/...",
        "@EXECUTORCH_CLIENTS",
    ],
    deps = [
        "//executorch/exir:lib",
    ],
)
