BUILD 1.74 KB
Newer Older
1
2
load("@rules_python//python:defs.bzl", "py_library", "py_test")

3
4
5
package_group(
    name = "default_visibility",
    includes = ["//tensorflow_federated/python/core:core_visibility"],
6
    packages = ["//tensorflow_federated/python/core/backends/native/..."],
7
8
9
)

package(default_visibility = [":default_visibility"])
10
11
12
13
14
15
16
17

licenses(["notice"])

py_library(
    name = "native",
    srcs = ["__init__.py"],
    srcs_version = "PY3",
    visibility = ["//tensorflow_federated/python/core/backends:__pkg__"],
18
19
20
21
22
23
24
25
26
27
28
29
    deps = [
        ":compiler",
        ":execution_contexts",
    ],
)

py_library(
    name = "compiler",
    srcs = ["compiler.py"],
    srcs_version = "PY3",
    deps = [
        "//tensorflow_federated/python/core/api:computation_base",
30
31
32
33
        "//tensorflow_federated/python/core/impl:computation_impl",
        "//tensorflow_federated/python/core/impl/compiler:building_blocks",
        "//tensorflow_federated/python/core/impl/compiler:transformations",
        "//tensorflow_federated/python/core/impl/wrappers:computation_wrapper_instances",
34
    ],
35
36
37
38
39
40
41
)

py_library(
    name = "execution_contexts",
    srcs = ["execution_contexts.py"],
    srcs_version = "PY3",
    deps = [
42
        ":compiler",
43
44
45
46
47
        "//tensorflow_federated/python/core/impl/context_stack:context_stack_impl",
        "//tensorflow_federated/python/core/impl/executors:execution_context",
        "//tensorflow_federated/python/core/impl/executors:executor_stacks",
    ],
)
48
49
50
51
52
53
54
55

py_test(
    name = "execution_contexts_test",
    srcs = ["execution_contexts_test.py"],
    python_version = "PY3",
    srcs_version = "PY3",
    deps = [
        ":execution_contexts",
Michael Reneer's avatar
Michael Reneer committed
56
        "//tensorflow_federated/python/common_libs:test_utils",
57
58
59
        "//tensorflow_federated/python/core/api:computations",
    ],
)