aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/toco/python/BUILD
blob: 92246a8aed8707c29cf92dbfee0d6d8a7cb679fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package(default_visibility = ["//visibility:public"])

licenses(["notice"])  # Apache 2.0

load("//tensorflow:tensorflow.bzl", "tf_py_wrap_cc")
load("//tensorflow:tensorflow.bzl", "tf_py_test")

cc_library(
    name = "toco_python_api",
    srcs = ["toco_python_api.cc"],
    hdrs = ["toco_python_api.h"],
    deps = [
        "//tensorflow/contrib/lite/toco:model_flags_proto_cc",
        "//tensorflow/contrib/lite/toco:toco_flags_proto_cc",
        "//tensorflow/contrib/lite/toco:toco_port",
        "//tensorflow/contrib/lite/toco:toco_tooling",
        "//tensorflow/core:lib",
        "//util/python:python_headers",
    ],
)

tf_py_wrap_cc(
    name = "tensorflow_wrap_toco",
    srcs = ["toco.i"],
    deps = [
        ":toco_python_api",
        "//tensorflow/contrib/lite/toco:model_flags_proto_cc",
        "//tensorflow/contrib/lite/toco:toco_flags_proto_cc",
        "//util/python:python_headers",
        "@com_google_absl//absl/strings",
    ],
)

py_binary(
    name = "toco_from_protos",
    srcs = ["toco_from_protos.py"],
    srcs_version = "PY2AND3",
    deps = [
        ":tensorflow_wrap_toco",
        "//tensorflow/python:platform",
    ],
)

py_binary(
    name = "toco_wrapper",
    srcs = ["toco_wrapper.py"],
    srcs_version = "PY2AND3",
    deps = [
        "//tensorflow:tensorflow_py",
    ],
)

tf_py_test(
    name = "toco_from_protos_test",
    srcs = ["toco_from_protos_test.py"],
    additional_deps = [
        "//tensorflow:tensorflow_py",
        "//tensorflow/contrib/lite/toco:model_flags_proto_py",
        "//tensorflow/contrib/lite/toco:toco_flags_proto_py",
    ],
    data = [
        ":toco_from_protos",
    ],
)

filegroup(
    name = "all_files",
    srcs = glob(
        ["**/*"],
        exclude = [
            "**/METADATA",
            "**/OWNERS",
        ],
    ),
    visibility = ["//tensorflow:__subpackages__"],
)