aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/toco/python/BUILD
blob: 33c5b164622cee94d7ba16e7b1a3006dbacb9ca9 (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
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_graphviz_dump_options",
        "//tensorflow/contrib/lite/toco:toco_port",
        "//tensorflow/contrib/lite/toco:toco_tooling",
        "//tensorflow/core:lib",
        "//third_party/python_runtime: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",
        "//third_party/python_runtime: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",
    ],
)

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",
    ],
    tags = [
        "no_oss",
        "no_pip",
    ],
)