aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/text/BUILD
blob: 38d91f7e496d47ac74415da3bae91bad7f431dce (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Description:
#   contains parts of TensorFlow that are experimental or unstable and which
#   are not supported.

package(default_visibility = [
    "//learning/brain:__subpackages__",
    "//tensorflow:__subpackages__",
])

licenses(["notice"])  # Apache 2.0

load(
    "//tensorflow:tensorflow.bzl",
    "py_test",
    "tf_custom_op_library",
    "tf_custom_op_py_library",
    "tf_gen_op_libs",
    "tf_gen_op_wrapper_py",
    "tf_kernel_library",
)

tf_custom_op_py_library(
    name = "text_py",
    srcs = [
        "__init__.py",
        "python/ops/__init__.py",
        "python/ops/skip_gram_ops.py",
    ],
    dso = [
        ":python/ops/_skip_gram_ops.so",
    ],
    kernels = [
        ":all_kernels",
        ":all_ops",
    ],
    srcs_version = "PY2AND3",
    deps = [
        ":gen_skip_gram_ops",
        "//tensorflow/contrib/lookup:lookup_py",
        "//tensorflow/contrib/util:util_py",
        "//tensorflow/python:array_ops",
        "//tensorflow/python:check_ops",
        "//tensorflow/python:control_flow_ops",
        "//tensorflow/python:dtypes",
        "//tensorflow/python:framework",
        "//tensorflow/python:framework_ops",
        "//tensorflow/python:math_ops",
        "//tensorflow/python:ops",
        "//tensorflow/python:platform",
        "//tensorflow/python:random_ops",
        "//tensorflow/python:random_seed",
        "//tensorflow/python:training",
        "//tensorflow/python:util",
    ],
)

tf_kernel_library(
    name = "skip_gram_kernels",
    srcs = ["kernels/skip_gram_kernels.cc"],
    deps = [
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//third_party/eigen3",
    ],
    alwayslink = 1,
)

cc_library(
    name = "all_kernels",
    deps = [":skip_gram_kernels"],
)

tf_custom_op_library(
    name = "python/ops/_skip_gram_ops.so",
    srcs = [
        "kernels/skip_gram_kernels.cc",
        "ops/skip_gram_ops.cc",
    ],
)

tf_gen_op_libs(
    op_lib_names = ["skip_gram_ops"],
)

cc_library(
    name = "all_ops",
    deps = [":skip_gram_ops_op_lib"],
)

tf_gen_op_wrapper_py(
    name = "gen_skip_gram_ops",
    out = "python/ops/gen_skip_gram_ops.py",
    deps = [":skip_gram_ops_op_lib"],
)

py_test(
    name = "skip_gram_ops_test",
    size = "medium",
    srcs = ["python/ops/skip_gram_ops_test.py"],
    srcs_version = "PY2AND3",
    deps = [
        ":text_py",
        "//tensorflow/contrib/lookup:lookup_py",
        "//tensorflow/python:client_testlib",
        "//tensorflow/python:constant_op",
        "//tensorflow/python:dtypes",
        "//tensorflow/python:errors",
        "//tensorflow/python:lookup_ops",
        "//tensorflow/python:math_ops",
        "//tensorflow/python:random_seed",
        "//tensorflow/python:training",
    ],
)