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

oncall("executorch")

runtime.python_library(
    name = "canonical_partitioner_lib",
    srcs = [
        "duplicate_dequant_node_pass.py",
        "pattern_op_partitioner.py",
        "all_node_partitioner.py",
    ],
    visibility = [
        "//executorch/...",
        "//executorch/exir/backend/...",
        "//executorch/test/...",
        "@EXECUTORCH_CLIENTS",
    ],
    deps = [
        "//caffe2:torch",
        "//executorch/exir/backend:partitioner",
        ":group_partitioner_lib",
    ],
)

runtime.python_library(
    name = "duplicate_constant_node_pass",
    srcs = [
        "duplicate_constant_node_pass.py",
    ],
    visibility = [
        "//executorch/...",
        "//executorch/exir/backend/...",
        "//executorch/test/...",
        "@EXECUTORCH_CLIENTS",
    ],
    deps = [
        "//caffe2:torch",
        "//executorch/exir/backend:partitioner",
    ],
)

runtime.python_library(
    name = "config_partitioner_lib",
    srcs = [
        "config_partitioner.py",
    ],
    visibility = [
        "//executorch/...",
        "//executorch/exir/backend/...",
        "//executorch/test/...",
        "@EXECUTORCH_CLIENTS",
    ],
    deps = [
        "//caffe2:torch",
        "//executorch/exir/backend:partitioner",
    ],
)

runtime.python_library(
    name = "group_partitioner_lib",
    srcs = [
        "group_partitioner.py",
    ],
    visibility = [
        "//executorch/...",
        "//executorch/exir/backend/...",
        "//executorch/test/...",
        "@EXECUTORCH_CLIENTS",
    ],
    deps = [
        "//caffe2:torch",
        "//executorch/exir/backend:partitioner",
    ],
)
