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

oncall("executorch")

runtime.python_library(
    name = "kv_cache",
    srcs = [
        "kv_cache.py",
    ],
    deps = [
        "//caffe2:torch",
        "//pytorch/torchtune:lib",
    ],
)

runtime.python_library(
    name = "attention",
    srcs = [
        "attention.py",
    ],
    deps = [
        ":kv_cache",
        "//caffe2:torch",
        "//executorch/extension/llm/custom_ops:custom_ops",
        "//pytorch/torchtune:lib",
    ],
)

runtime.python_library(
    name = "position_embeddings",
    srcs = [
        "_position_embeddings.py",
    ],
    deps = [
        "//caffe2:torch",
    ],
)

runtime.python_library(
    name = "module_lib",
    srcs = [
        "__init__.py",
    ],
    deps= [
        ":position_embeddings",
        ":attention",
        ":kv_cache",
    ]
)
