• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Tests of TensorFlow kernels written using the Python API.
2
3load("//tensorflow:tensorflow.bzl", "cuda_py_test")
4
5package(
6    default_visibility = ["//tensorflow:internal"],
7    licenses = ["notice"],
8)
9
10cuda_py_test(
11    name = "bijector_test",
12    size = "small",
13    srcs = ["bijector_test.py"],
14    deps = [
15        "//tensorflow/python:array_ops",
16        "//tensorflow/python:client_testlib",
17        "//tensorflow/python:framework_for_generated_wrappers",
18        "//tensorflow/python:framework_test_lib",
19        "//tensorflow/python:math_ops",
20        "//tensorflow/python:platform_test",
21        "//tensorflow/python/ops/distributions",
22        "//third_party/py/numpy",
23    ],
24)
25
26cuda_py_test(
27    name = "util_test",
28    size = "medium",
29    srcs = ["util_test.py"],
30    shard_count = 3,
31    xla_enable_strict_auto_jit = False,  # TODO(b/144920376)
32    deps = [
33        "//tensorflow/python:array_ops",
34        "//tensorflow/python:client_testlib",
35        "//tensorflow/python:framework",
36        "//tensorflow/python:framework_for_generated_wrappers",
37        "//tensorflow/python:framework_test_lib",
38        "//tensorflow/python:gradients",
39        "//tensorflow/python:math_ops",
40        "//tensorflow/python:platform_test",
41        "//tensorflow/python/ops/distributions",
42        "//third_party/py/numpy",
43    ],
44)
45
46cuda_py_test(
47    name = "kullback_leibler_test",
48    size = "small",
49    srcs = ["kullback_leibler_test.py"],
50    deps = [
51        "//tensorflow/python:array_ops",
52        "//tensorflow/python:client_testlib",
53        "//tensorflow/python:platform_test",
54        "//tensorflow/python/ops/distributions",
55    ],
56)
57
58cuda_py_test(
59    name = "beta_test",
60    size = "small",
61    srcs = ["beta_test.py"],
62    tags = [
63        "no_oss",  # b/205574093, and because tf.distributions is deprecated
64        "nomac",  # b/191763315
65        "notsan",  # b/173653918
66    ],
67    xla_tags = [
68        "no_cuda_asan",  # times out
69    ],
70    deps = [
71        "//tensorflow/python:client",
72        "//tensorflow/python:client_testlib",
73        "//tensorflow/python:framework",
74        "//tensorflow/python:framework_for_generated_wrappers",
75        "//tensorflow/python:math_ops",
76        "//tensorflow/python:nn_ops",
77        "//tensorflow/python:platform_test",
78        "//tensorflow/python/ops/distributions",
79        "//third_party/py/numpy",
80    ],
81)
82
83cuda_py_test(
84    name = "bernoulli_test",
85    size = "medium",
86    srcs = ["bernoulli_test.py"],
87    deps = [
88        "//tensorflow/python:array_ops",
89        "//tensorflow/python:client_testlib",
90        "//tensorflow/python:framework_for_generated_wrappers",
91        "//tensorflow/python:math_ops",
92        "//tensorflow/python:platform_test",
93        "//tensorflow/python/ops/distributions",
94        "//third_party/py/numpy",
95    ],
96)
97
98cuda_py_test(
99    name = "categorical_test",
100    size = "small",
101    srcs = ["categorical_test.py"],
102    xla_tags = [
103        "no_cuda_asan",  # times out
104    ],
105    deps = [
106        "//tensorflow/python:array_ops",
107        "//tensorflow/python:client_testlib",
108        "//tensorflow/python:framework",
109        "//tensorflow/python:framework_for_generated_wrappers",
110        "//tensorflow/python:framework_test_lib",
111        "//tensorflow/python:math_ops",
112        "//tensorflow/python:platform_test",
113        "//tensorflow/python:random_ops",
114        "//tensorflow/python/ops/distributions",
115        "//third_party/py/numpy",
116        "@absl_py//absl/testing:parameterized",
117    ],
118)
119
120cuda_py_test(
121    name = "dirichlet_test",
122    size = "small",
123    srcs = ["dirichlet_test.py"],
124    xla_tags = [
125        "no_cuda_asan",  # times out
126    ],
127    deps = [
128        "//tensorflow/python:client_testlib",
129        "//tensorflow/python:framework_for_generated_wrappers",
130        "//tensorflow/python:framework_test_lib",
131        "//tensorflow/python:platform_test",
132        "//tensorflow/python/ops/distributions",
133        "//third_party/py/numpy",
134    ],
135)
136
137cuda_py_test(
138    name = "dirichlet_multinomial_test",
139    size = "medium",
140    srcs = ["dirichlet_multinomial_test.py"],
141    tags = [
142        "noguitar",  # b/110489471
143        "notap",  # b/110489471
144    ],
145    deps = [
146        "//tensorflow/python:array_ops",
147        "//tensorflow/python:client_testlib",
148        "//tensorflow/python:framework_for_generated_wrappers",
149        "//tensorflow/python:framework_test_lib",
150        "//tensorflow/python:math_ops",
151        "//tensorflow/python:platform_test",
152        "//tensorflow/python/ops/distributions",
153        "//third_party/py/numpy",
154    ],
155)
156
157cuda_py_test(
158    name = "exponential_test",
159    srcs = ["exponential_test.py"],
160    deps = [
161        "//tensorflow/python:client",
162        "//tensorflow/python:client_testlib",
163        "//tensorflow/python:framework_for_generated_wrappers",
164        "//tensorflow/python:framework_test_lib",
165        "//tensorflow/python:nn_ops",
166        "//tensorflow/python:platform_test",
167        "//tensorflow/python/ops/distributions",
168        "//third_party/py/numpy",
169    ],
170)
171
172cuda_py_test(
173    name = "gamma_test",
174    srcs = ["gamma_test.py"],
175    deps = [
176        "//tensorflow/python:client",
177        "//tensorflow/python:client_testlib",
178        "//tensorflow/python:framework_for_generated_wrappers",
179        "//tensorflow/python:framework_test_lib",
180        "//tensorflow/python:nn_ops",
181        "//tensorflow/python:platform_test",
182        "//tensorflow/python/ops/distributions",
183        "//third_party/py/numpy",
184    ],
185)
186
187cuda_py_test(
188    name = "laplace_test",
189    srcs = ["laplace_test.py"],
190    deps = [
191        "//tensorflow/python:client",
192        "//tensorflow/python:client_testlib",
193        "//tensorflow/python:framework_for_generated_wrappers",
194        "//tensorflow/python:framework_test_lib",
195        "//tensorflow/python:nn_ops",
196        "//tensorflow/python:platform_test",
197        "//tensorflow/python/ops/distributions",
198        "//third_party/py/numpy",
199    ],
200)
201
202cuda_py_test(
203    name = "multinomial_test",
204    srcs = ["multinomial_test.py"],
205    deps = [
206        "//tensorflow/python:array_ops",
207        "//tensorflow/python:client_testlib",
208        "//tensorflow/python:framework_for_generated_wrappers",
209        "//tensorflow/python:framework_test_lib",
210        "//tensorflow/python:math_ops",
211        "//tensorflow/python:platform_test",
212        "//tensorflow/python/ops/distributions",
213        "//third_party/py/numpy",
214    ],
215)
216
217cuda_py_test(
218    name = "student_t_test",
219    size = "small",
220    srcs = ["student_t_test.py"],
221    tags = [
222        # TODO(b/121223043): Re-enable this test after fixing "mean not defined"
223        # errors.
224        "no_mac",
225        "no_oss",
226        # disable to avoid false positives from scipy.
227        "nomsan",
228        "noasan",  #b/168810473
229    ],
230    deps = [
231        "//tensorflow/python:client_testlib",
232        "//tensorflow/python:framework",
233        "//tensorflow/python:framework_for_generated_wrappers",
234        "//tensorflow/python:framework_test_lib",
235        "//tensorflow/python:math_ops",
236        "//tensorflow/python:nn_ops",
237        "//tensorflow/python:platform_test",
238        "//tensorflow/python/ops/distributions",
239        "//third_party/py/numpy",
240    ],
241)
242
243cuda_py_test(
244    name = "uniform_test",
245    size = "small",
246    srcs = ["uniform_test.py"],
247    deps = [
248        "//tensorflow/python:array_ops",
249        "//tensorflow/python:client_testlib",
250        "//tensorflow/python:errors",
251        "//tensorflow/python:framework_for_generated_wrappers",
252        "//tensorflow/python:framework_test_lib",
253        "//tensorflow/python:math_ops",
254        "//tensorflow/python/ops/distributions",
255        "//third_party/py/numpy",
256    ],
257)
258
259cuda_py_test(
260    name = "normal_test",
261    size = "medium",
262    srcs = ["normal_test.py"],
263    deps = [
264        "//tensorflow/python:array_ops",
265        "//tensorflow/python:client_testlib",
266        "//tensorflow/python:framework_for_generated_wrappers",
267        "//tensorflow/python:framework_test_lib",
268        "//tensorflow/python:gradients",
269        "//tensorflow/python:nn_ops",
270        "//tensorflow/python:platform_test",
271        "//tensorflow/python:variables",
272        "//tensorflow/python/ops/distributions",
273        "//third_party/py/numpy",
274    ],
275)
276
277cuda_py_test(
278    name = "special_math_test",
279    size = "medium",
280    srcs = ["special_math_test.py"],
281    deps = [
282        "//tensorflow/python:client_testlib",
283        "//tensorflow/python:framework_for_generated_wrappers",
284        "//tensorflow/python:framework_test_lib",
285        "//tensorflow/python:gradients",
286        "//tensorflow/python:platform_test",
287        "//tensorflow/python:variables",
288        "//tensorflow/python/ops/distributions",
289        "//third_party/py/numpy",
290    ],
291)
292
293cuda_py_test(
294    name = "identity_bijector_test",
295    size = "small",
296    srcs = ["identity_bijector_test.py"],
297    deps = [
298        "//tensorflow/python:array_ops",
299        "//tensorflow/python:client_testlib",
300        "//tensorflow/python:framework_for_generated_wrappers",
301        "//tensorflow/python:framework_test_lib",
302        "//tensorflow/python:math_ops",
303        "//tensorflow/python:platform_test",
304        "//tensorflow/python/ops/distributions",
305        "//third_party/py/numpy",
306    ],
307)
308