• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Description:
2#   contains parts of TensorFlow that are experimental or unstable and which
3#   are not supported.
4
5package(default_visibility = [
6    "//learning/brain:__subpackages__",
7    "//tensorflow:__subpackages__",
8])
9
10licenses(["notice"])  # Apache 2.0
11
12load(
13    "//tensorflow:tensorflow.bzl",
14    "py_test",
15    "tf_custom_op_library",
16    "tf_gen_op_libs",
17    "tf_gen_op_wrapper_py",
18    "tf_kernel_library",
19)
20load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library")
21
22tf_custom_op_py_library(
23    name = "text_py",
24    srcs = [
25        "__init__.py",
26        "python/ops/__init__.py",
27        "python/ops/skip_gram_ops.py",
28    ],
29    dso = [
30        ":python/ops/_skip_gram_ops.so",
31    ],
32    kernels = [
33        ":all_kernels",
34        ":all_ops",
35    ],
36    srcs_version = "PY2AND3",
37    deps = [
38        ":gen_skip_gram_ops",
39        "//tensorflow/contrib/lookup:lookup_py",
40        "//tensorflow/contrib/util:util_py",
41        "//tensorflow/python:array_ops",
42        "//tensorflow/python:check_ops",
43        "//tensorflow/python:control_flow_ops",
44        "//tensorflow/python:dtypes",
45        "//tensorflow/python:framework",
46        "//tensorflow/python:framework_ops",
47        "//tensorflow/python:math_ops",
48        "//tensorflow/python:ops",
49        "//tensorflow/python:platform",
50        "//tensorflow/python:random_ops",
51        "//tensorflow/python:random_seed",
52        "//tensorflow/python:training",
53        "//tensorflow/python:util",
54    ],
55)
56
57tf_kernel_library(
58    name = "skip_gram_kernels",
59    srcs = ["kernels/skip_gram_kernels.cc"],
60    deps = [
61        "//tensorflow/core:framework",
62        "//tensorflow/core:lib",
63        "//third_party/eigen3",
64    ],
65    alwayslink = 1,
66)
67
68cc_library(
69    name = "all_kernels",
70    deps = [":skip_gram_kernels"],
71)
72
73tf_custom_op_library(
74    name = "python/ops/_skip_gram_ops.so",
75    srcs = [
76        "kernels/skip_gram_kernels.cc",
77        "ops/skip_gram_ops.cc",
78    ],
79)
80
81tf_gen_op_libs(
82    op_lib_names = ["skip_gram_ops"],
83)
84
85cc_library(
86    name = "all_ops",
87    deps = [":skip_gram_ops_op_lib"],
88)
89
90tf_gen_op_wrapper_py(
91    name = "gen_skip_gram_ops",
92    out = "python/ops/gen_skip_gram_ops.py",
93    deps = [":skip_gram_ops_op_lib"],
94)
95
96py_test(
97    name = "skip_gram_ops_test",
98    size = "medium",
99    srcs = ["python/ops/skip_gram_ops_test.py"],
100    srcs_version = "PY2AND3",
101    deps = [
102        ":text_py",
103        "//tensorflow/contrib/lookup:lookup_py",
104        "//tensorflow/python:client_testlib",
105        "//tensorflow/python:constant_op",
106        "//tensorflow/python:dtypes",
107        "//tensorflow/python:errors",
108        "//tensorflow/python:lookup_ops",
109        "//tensorflow/python:math_ops",
110        "//tensorflow/python:random_seed",
111        "//tensorflow/python:training",
112    ],
113)
114