1licenses(["notice"])  # Apache 2.0
2
3package_group(
4    name = "internal",
5    includes = [
6        "//tensorflow/compiler/tf2xla:internal",
7    ],
8)
9
10package_group(
11    name = "friends",
12    includes = [
13        "//tensorflow/compiler/tf2xla:friends",
14    ],
15)
16
17package(
18    default_visibility = [":internal"],
19)
20
21load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_test")
22load("//tensorflow:tensorflow.bzl", "cuda_py_test")
23load("//tensorflow/compiler/aot:tfcompile.bzl", "tf_library")
24load("//tensorflow/compiler/tests:build_defs.bzl", "tf_xla_py_test")
25load("//tensorflow/compiler/tests:build_defs.bzl", "generate_backend_suites")
26load(
27    "//tensorflow/core:platform/default/build_config_root.bzl",
28    "tf_cuda_tests_tags",
29)
30
31generate_backend_suites()
32
33py_library(
34    name = "xla_test",
35    testonly = 1,
36    srcs = ["xla_test.py"],
37    srcs_version = "PY2AND3",
38    visibility = [":friends"],
39    deps = [
40        "//tensorflow/contrib/compiler:compiler_py",
41        "//tensorflow/core:protos_all_py",
42        "//tensorflow/python:array_ops",
43        "//tensorflow/python:client",
44        "//tensorflow/python:client_testlib",
45        "//tensorflow/python:framework_for_generated_wrappers",
46        "//tensorflow/python:platform",
47        "//tensorflow/python:random_seed",
48        "//tensorflow/python:session",
49        "//tensorflow/python:variables",
50        "//third_party/py/numpy",
51    ],
52)
53
54tf_xla_py_test(
55    name = "adagrad_test",
56    size = "small",
57    srcs = ["adagrad_test.py"],
58    deps = [
59        ":xla_test",
60        "//tensorflow/python:array_ops",
61        "//tensorflow/python:framework_for_generated_wrappers",
62        "//tensorflow/python:math_ops",
63        "//tensorflow/python:platform_test",
64        "//tensorflow/python:training",
65    ],
66)
67
68tf_xla_py_test(
69    name = "adam_test",
70    size = "small",
71    srcs = ["adam_test.py"],
72    deps = [
73        ":xla_test",
74        "//tensorflow/python:array_ops",
75        "//tensorflow/python:framework_for_generated_wrappers",
76        "//tensorflow/python:math_ops",
77        "//tensorflow/python:platform_test",
78        "//tensorflow/python:training",
79    ],
80)
81
82tf_xla_py_test(
83    name = "argminmax_test",
84    size = "small",
85    srcs = ["argminmax_test.py"],
86    # ArgMax needs CustomCall on CPU, which is not available in normal
87    # (not precompiled) TensorFlow. The flag below excludes the CPU
88    # backend.
89    disabled_backends = "cpu",
90    deps = [
91        ":xla_test",
92        "//tensorflow/python:array_ops",
93        "//tensorflow/python:framework_for_generated_wrappers",
94        "//tensorflow/python:math_ops",
95        "//tensorflow/python:platform_test",
96    ],
97)
98
99tf_xla_py_test(
100    name = "binary_ops_test",
101    size = "small",
102    srcs = ["binary_ops_test.py"],
103    shard_count = 5,
104    tags = [
105        "optonly",  # Times out frequently in fastbuild mode.
106    ],
107    deps = [
108        ":xla_test",
109        "//tensorflow/python:array_ops",
110        "//tensorflow/python:bitwise_ops",
111        "//tensorflow/python:framework_for_generated_wrappers",
112        "//tensorflow/python:math_ops",
113        "//tensorflow/python:math_ops_gen",
114        "//tensorflow/python:nn_ops",
115        "//tensorflow/python:nn_ops_gen",
116        "//tensorflow/python:platform_test",
117    ],
118)
119
120tf_xla_py_test(
121    name = "categorical_op_test",
122    size = "small",
123    srcs = ["categorical_op_test.py"],
124    deps = [
125        ":xla_test",
126        "//tensorflow/python:framework_for_generated_wrappers",
127        "//tensorflow/python:platform_test",
128        "//tensorflow/python:random_ops",
129    ],
130)
131
132tf_xla_py_test(
133    name = "cholesky_op_test",
134    size = "small",
135    srcs = ["cholesky_op_test.py"],
136    tags = ["optonly"],
137    deps = [
138        ":xla_test",
139        "//tensorflow/python:array_ops",
140        "//tensorflow/python:framework_for_generated_wrappers",
141        "//tensorflow/python:math_ops",
142        "//tensorflow/python:platform_test",
143        "//tensorflow/python:training",
144    ],
145)
146
147tf_xla_py_test(
148    name = "matrix_triangular_solve_op_test",
149    size = "small",
150    srcs = ["matrix_triangular_solve_op_test.py"],
151    tags = ["optonly"],
152    deps = [
153        ":xla_test",
154        "//tensorflow/python:array_ops",
155        "//tensorflow/python:framework_for_generated_wrappers",
156        "//tensorflow/python:math_ops",
157        "//tensorflow/python:platform_test",
158        "//tensorflow/python:training",
159    ],
160)
161
162tf_xla_py_test(
163    name = "clustering_test",
164    size = "small",
165    srcs = ["clustering_test.py"],
166    deps = [
167        ":xla_test",
168        "//tensorflow/python:array_ops",
169        "//tensorflow/python:framework_for_generated_wrappers",
170        "//tensorflow/python:math_ops",
171        "//tensorflow/python:platform_test",
172    ],
173)
174
175tf_xla_py_test(
176    name = "concat_ops_test",
177    size = "medium",
178    srcs = ["concat_ops_test.py"],
179    deps = [
180        ":xla_test",
181        "//tensorflow/python:array_ops",
182        "//tensorflow/python:array_ops_gen",
183        "//tensorflow/python:framework_for_generated_wrappers",
184        "//tensorflow/python:gradient_checker",
185        "//tensorflow/python:gradients",
186        "//tensorflow/python:math_ops",
187        "//tensorflow/python:platform_test",
188    ],
189)
190
191tf_xla_py_test(
192    name = "conv2d_test",
193    size = "medium",
194    srcs = ["conv2d_test.py"],
195    shard_count = 10,
196    deps = [
197        ":xla_test",
198        "//tensorflow/python:array_ops",
199        "//tensorflow/python:framework_for_generated_wrappers",
200        "//tensorflow/python:nn",
201        "//tensorflow/python:nn_ops",
202        "//tensorflow/python:nn_ops_gen",
203        "//tensorflow/python:platform_test",
204    ],
205)
206
207tf_xla_py_test(
208    name = "conv3d_test",
209    size = "medium",
210    srcs = ["conv3d_test.py"],
211    shard_count = 5,
212    deps = [
213        ":xla_test",
214        "//tensorflow/python:array_ops",
215        "//tensorflow/python:framework_for_generated_wrappers",
216        "//tensorflow/python:nn",
217        "//tensorflow/python:nn_ops",
218        "//tensorflow/python:nn_ops_gen",
219        "//tensorflow/python:platform_test",
220    ],
221)
222
223tf_xla_py_test(
224    name = "depthwise_conv_op_test",
225    size = "medium",
226    srcs = ["depthwise_conv_op_test.py"],
227    shard_count = 5,
228    tags = [
229        "noasan",
230        "nomsan",
231        "notsan",
232        "optonly",  # Times out frequently in fastbuild mode.
233    ],
234    deps = [
235        ":xla_test",
236        "//tensorflow/python:array_ops",
237        "//tensorflow/python:framework_for_generated_wrappers",
238        "//tensorflow/python:nn",
239        "//tensorflow/python:nn_ops",
240        "//tensorflow/python:nn_ops_gen",
241        "//tensorflow/python:platform_test",
242    ],
243)
244
245tf_xla_py_test(
246    name = "dynamic_stitch_test",
247    size = "small",
248    srcs = ["dynamic_stitch_test.py"],
249    deps = [
250        ":xla_test",
251        "//tensorflow/python:array_ops",
252        "//tensorflow/python:data_flow_ops",
253        "//tensorflow/python:framework_for_generated_wrappers",
254        "//tensorflow/python:platform_test",
255    ],
256)
257
258tf_xla_py_test(
259    name = "extract_image_patches_op_test",
260    size = "small",
261    srcs = ["extract_image_patches_op_test.py"],
262    deps = [
263        ":xla_test",
264        "//tensorflow/python:array_ops",
265        "//tensorflow/python:framework_for_generated_wrappers",
266        "//tensorflow/python:platform_test",
267    ],
268)
269
270tf_xla_py_test(
271    name = "fft_test",
272    size = "medium",
273    srcs = ["fft_test.py"],
274    shard_count = 3,
275    tags = ["optonly"],
276    deps = [
277        ":xla_test",
278        "//tensorflow/contrib/signal:signal_py",
279        "//tensorflow/python:array_ops",
280        "//tensorflow/python:extra_py_tests_deps",
281        "//tensorflow/python:framework_for_generated_wrappers",
282        "//tensorflow/python:platform_test",
283        "//tensorflow/python:spectral_ops",
284    ],
285)
286
287tf_xla_py_test(
288    name = "slice_ops_test",
289    size = "small",
290    srcs = ["slice_ops_test.py"],
291    deps = [
292        ":xla_test",
293        "//tensorflow/python:array_ops",
294        "//tensorflow/python:data_flow_ops",
295        "//tensorflow/python:framework_for_generated_wrappers",
296        "//tensorflow/python:platform_test",
297    ],
298)
299
300tf_xla_py_test(
301    name = "ftrl_test",
302    size = "small",
303    srcs = ["ftrl_test.py"],
304    deps = [
305        ":xla_test",
306        "//tensorflow/python:array_ops",
307        "//tensorflow/python:framework_for_generated_wrappers",
308        "//tensorflow/python:math_ops",
309        "//tensorflow/python:platform_test",
310        "//tensorflow/python:training",
311    ],
312)
313
314tf_xla_py_test(
315    name = "function_test",
316    size = "small",
317    srcs = ["function_test.py"],
318    deps = [
319        ":xla_test",
320        "//tensorflow/python:array_ops",
321        "//tensorflow/python:framework_for_generated_wrappers",
322        "//tensorflow/python:platform_test",
323    ],
324)
325
326tf_xla_py_test(
327    name = "image_ops_test",
328    size = "small",
329    srcs = ["image_ops_test.py"],
330    tags = [
331        "optonly",  # Times out frequently in fastbuild mode.
332    ],
333    deps = [
334        ":xla_test",
335        "//tensorflow/python:array_ops",
336        "//tensorflow/python:framework_for_generated_wrappers",
337        "//tensorflow/python:image_ops",
338        "//tensorflow/python:platform_test",
339    ],
340)
341
342tf_xla_py_test(
343    name = "lrn_ops_test",
344    size = "medium",
345    srcs = ["lrn_ops_test.py"],
346    deps = [
347        ":xla_test",
348        "//tensorflow/python:array_ops",
349        "//tensorflow/python:framework_for_generated_wrappers",
350        "//tensorflow/python:nn",
351        "//tensorflow/python:nn_ops_gen",
352        "//tensorflow/python:platform_test",
353    ],
354)
355
356tf_xla_py_test(
357    name = "matrix_band_part_test",
358    size = "medium",
359    srcs = ["matrix_band_part_test.py"],
360    tags = ["optonly"],
361    deps = [
362        ":xla_test",
363        "//tensorflow/python:array_ops",
364        "//tensorflow/python:framework_for_generated_wrappers",
365        "//tensorflow/python:platform_test",
366    ],
367)
368
369tf_xla_py_test(
370    name = "momentum_test",
371    size = "small",
372    srcs = ["momentum_test.py"],
373    deps = [
374        ":xla_test",
375        "//tensorflow/python:array_ops",
376        "//tensorflow/python:framework_for_generated_wrappers",
377        "//tensorflow/python:math_ops",
378        "//tensorflow/python:platform_test",
379        "//tensorflow/python:training",
380    ],
381)
382
383tf_xla_py_test(
384    name = "nary_ops_test",
385    size = "small",
386    srcs = ["nary_ops_test.py"],
387    deps = [
388        ":xla_test",
389        "//tensorflow/python:array_ops",
390        "//tensorflow/python:framework_for_generated_wrappers",
391        "//tensorflow/python:math_ops",
392        "//tensorflow/python:platform_test",
393    ],
394)
395
396tf_xla_py_test(
397    name = "nullary_ops_test",
398    size = "small",
399    srcs = ["nullary_ops_test.py"],
400    deps = [
401        ":xla_test",
402        "//tensorflow/python:control_flow_ops",
403        "//tensorflow/python:framework_for_generated_wrappers",
404        "//tensorflow/python:platform_test",
405    ],
406)
407
408tf_xla_py_test(
409    name = "pooling_ops_test",
410    size = "medium",
411    srcs = ["pooling_ops_test.py"],
412    shard_count = 10,
413    deps = [
414        ":xla_test",
415        "//tensorflow/python:array_ops",
416        "//tensorflow/python:framework_for_generated_wrappers",
417        "//tensorflow/python:nn_ops",
418        "//tensorflow/python:nn_ops_gen",
419        "//tensorflow/python:platform_test",
420    ],
421)
422
423tf_xla_py_test(
424    name = "pooling_ops_3d_test",
425    size = "medium",
426    srcs = ["pooling_ops_3d_test.py"],
427    shard_count = 10,
428    deps = [
429        ":xla_test",
430        "//tensorflow/python:array_ops",
431        "//tensorflow/python:framework_for_generated_wrappers",
432        "//tensorflow/python:nn_ops",
433        "//tensorflow/python:nn_ops_gen",
434        "//tensorflow/python:platform_test",
435    ],
436)
437
438tf_xla_py_test(
439    name = "random_ops_test",
440    size = "small",
441    srcs = ["random_ops_test.py"],
442    # TODO(b/31361304): enable RNG ops on GPU when parallelized.
443    disabled_backends = [
444        "gpu",
445    ],
446    deps = [
447        ":xla_test",
448        "//tensorflow/python:framework_for_generated_wrappers",
449        "//tensorflow/python:platform_test",
450        "//tensorflow/python:random_ops",
451    ],
452)
453
454tf_xla_py_test(
455    name = "reduce_ops_test",
456    size = "medium",
457    srcs = ["reduce_ops_test.py"],
458    shard_count = 5,
459    deps = [
460        ":xla_test",
461        "//tensorflow/python:array_ops",
462        "//tensorflow/python:errors",
463        "//tensorflow/python:framework_for_generated_wrappers",
464        "//tensorflow/python:math_ops",
465        "//tensorflow/python:platform_test",
466    ],
467)
468
469tf_xla_py_test(
470    name = "reverse_ops_test",
471    size = "medium",
472    srcs = ["reverse_ops_test.py"],
473    deps = [
474        ":xla_test",
475        "//tensorflow/python:array_ops",
476        "//tensorflow/python:framework_for_generated_wrappers",
477    ],
478)
479
480tf_xla_py_test(
481    name = "reverse_sequence_op_test",
482    size = "medium",
483    srcs = ["reverse_sequence_op_test.py"],
484    tags = ["optonly"],
485    deps = [
486        ":xla_test",
487        "//tensorflow/python:array_ops",
488        "//tensorflow/python:framework_for_generated_wrappers",
489        "//tensorflow/python:platform_test",
490    ],
491)
492
493tf_xla_py_test(
494    name = "rmsprop_test",
495    size = "small",
496    srcs = ["rmsprop_test.py"],
497    deps = [
498        ":xla_test",
499        "//tensorflow/python:array_ops",
500        "//tensorflow/python:framework_for_generated_wrappers",
501        "//tensorflow/python:math_ops",
502        "//tensorflow/python:platform_test",
503        "//tensorflow/python:training",
504    ],
505)
506
507tf_xla_py_test(
508    name = "scan_ops_test",
509    size = "small",
510    srcs = ["scan_ops_test.py"],
511    tags = ["optonly"],
512    deps = [
513        ":xla_test",
514        "//tensorflow/python:array_ops",
515        "//tensorflow/python:framework_for_generated_wrappers",
516        "//tensorflow/python:math_ops",
517        "//tensorflow/python:platform_test",
518    ],
519)
520
521tf_xla_py_test(
522    name = "segment_reduction_ops_test",
523    size = "medium",
524    srcs = ["segment_reduction_ops_test.py"],
525    deps = [
526        ":xla_test",
527        "//tensorflow/python:array_ops",
528        "//tensorflow/python:framework_for_generated_wrappers",
529        "//tensorflow/python:math_ops",
530        "//tensorflow/python:math_ops_gen",
531        "//tensorflow/python:platform_test",
532    ],
533)
534
535tf_xla_py_test(
536    name = "spacetobatch_op_test",
537    size = "medium",
538    srcs = ["spacetobatch_op_test.py"],
539    shard_count = 3,
540    deps = [
541        ":xla_test",
542        "//tensorflow/python:array_ops",
543        "//tensorflow/python:framework_for_generated_wrappers",
544        "//tensorflow/python:math_ops",
545        "//tensorflow/python:platform_test",
546    ],
547)
548
549tf_xla_py_test(
550    name = "stack_ops_test",
551    size = "small",
552    srcs = ["stack_ops_test.py"],
553    deps = [
554        ":xla_test",
555        "//tensorflow/python:array_ops",
556        "//tensorflow/python:data_flow_ops",
557        "//tensorflow/python:framework_for_generated_wrappers",
558        "//tensorflow/python:platform_test",
559    ],
560)
561
562tf_xla_py_test(
563    name = "stateless_random_ops_test",
564    size = "small",
565    srcs = ["stateless_random_ops_test.py"],
566    tags = ["optonly"],
567    deps = [
568        ":xla_test",
569        "//tensorflow/contrib/stateless",
570        "//tensorflow/python:framework_for_generated_wrappers",
571        "//tensorflow/python:platform_test",
572    ],
573)
574
575tf_xla_py_test(
576    name = "tensor_array_ops_test",
577    size = "small",
578    srcs = ["tensor_array_ops_test.py"],
579    deps = [
580        ":xla_test",
581        "//tensorflow/python:array_ops",
582        "//tensorflow/python:framework_for_generated_wrappers",
583        "//tensorflow/python:math_ops",
584        "//tensorflow/python:math_ops_gen",
585        "//tensorflow/python:nn_ops",
586        "//tensorflow/python:nn_ops_gen",
587        "//tensorflow/python:platform_test",
588        "//tensorflow/python:tensor_array_grad",
589        "//tensorflow/python:tensor_array_ops",
590        "//tensorflow/python:training",
591    ],
592)
593
594tf_xla_py_test(
595    name = "ternary_ops_test",
596    size = "small",
597    srcs = ["ternary_ops_test.py"],
598    deps = [
599        ":xla_test",
600        "//tensorflow/python:array_ops",
601        "//tensorflow/python:framework_for_generated_wrappers",
602        "//tensorflow/python:math_ops",
603        "//tensorflow/python:platform_test",
604    ],
605)
606
607tf_xla_py_test(
608    name = "unary_ops_test",
609    size = "medium",
610    srcs = ["unary_ops_test.py"],
611    deps = [
612        ":xla_test",
613        "//tensorflow/python:array_ops",
614        "//tensorflow/python:framework_for_generated_wrappers",
615        "//tensorflow/python:math_ops",
616        "//tensorflow/python:nn_ops",
617        "//tensorflow/python:nn_ops_gen",
618        "//tensorflow/python:platform_test",
619    ],
620)
621
622tf_xla_py_test(
623    name = "fused_batchnorm_test",
624    size = "small",
625    srcs = ["fused_batchnorm_test.py"],
626    deps = [
627        ":xla_test",
628        "//tensorflow/python:framework_for_generated_wrappers",
629        "//tensorflow/python:math_ops",
630        "//tensorflow/python:math_ops_gen",
631        "//tensorflow/python:nn",
632        "//tensorflow/python:nn_ops",
633        "//tensorflow/python:nn_ops_gen",
634        "//tensorflow/python:platform_test",
635        "//tensorflow/python:training",
636    ],
637)
638
639tf_xla_py_test(
640    name = "variable_ops_test",
641    size = "small",
642    srcs = ["variable_ops_test.py"],
643    tags = ["optonly"],
644    deps = [
645        ":xla_test",
646        "//tensorflow/python:array_ops",
647        "//tensorflow/python:framework_for_generated_wrappers",
648        "//tensorflow/python:math_ops",
649        "//tensorflow/python:math_ops_gen",
650        "//tensorflow/python:nn_ops",
651        "//tensorflow/python:nn_ops_gen",
652        "//tensorflow/python:platform_test",
653        "//tensorflow/python:training",
654    ],
655)
656
657tf_xla_py_test(
658    name = "gather_test",
659    size = "medium",
660    srcs = ["gather_test.py"],
661    deps = [
662        ":xla_test",
663        "//tensorflow/python:array_ops",
664        "//tensorflow/python:data_flow_ops",
665        "//tensorflow/python:framework_for_generated_wrappers",
666        "//tensorflow/python:platform_test",
667    ],
668)
669
670tf_xla_py_test(
671    name = "gather_nd_op_test",
672    size = "medium",
673    srcs = ["gather_nd_op_test.py"],
674    deps = [
675        ":xla_test",
676        "//tensorflow/python:array_ops",
677        "//tensorflow/python:framework_for_generated_wrappers",
678        "//tensorflow/python:platform_test",
679    ],
680)
681
682tf_xla_py_test(
683    name = "scatter_nd_op_test",
684    size = "medium",
685    srcs = ["scatter_nd_op_test.py"],
686    tags = ["optonly"],
687    deps = [
688        ":xla_test",
689        "//tensorflow/python:array_ops",
690        "//tensorflow/python:framework_for_generated_wrappers",
691        "//tensorflow/python:platform_test",
692    ],
693)
694
695cuda_py_test(
696    name = "xla_device_test",
697    size = "small",
698    srcs = ["xla_device_test.py"],
699    additional_deps = [
700        "//tensorflow/python:array_ops",
701        "//tensorflow/python:client",
702        "//tensorflow/python:client_testlib",
703        "//tensorflow/python:control_flow_ops",
704        "//tensorflow/python:framework_for_generated_wrappers",
705        "//tensorflow/python:math_ops",
706    ],
707)
708
709cuda_py_test(
710    name = "jit_test",
711    size = "medium",
712    srcs = ["jit_test.py"],
713    additional_deps = [
714        "//tensorflow/contrib/compiler:compiler_py",
715        "//tensorflow/core:protos_all_py",
716        "//tensorflow/python:array_ops",
717        "//tensorflow/python:client",
718        "//tensorflow/python:client_testlib",
719        "//tensorflow/python:control_flow_ops",
720        "//tensorflow/python:framework",
721        "//tensorflow/python:framework_for_generated_wrappers",
722        "//tensorflow/python:gradients",
723        "//tensorflow/python:math_ops",
724        "//tensorflow/python:nn_ops",
725    ],
726    # TODO(b/62961789): Test fails with SIGABRT
727    tags = [
728        "manual",
729        "notap",
730    ],
731)
732
733cc_library(
734    name = "randomized_tests_library",
735    testonly = 1,
736    srcs = ["randomized_tests.cc"],
737    deps = [
738        "//tensorflow/compiler/jit",
739        "//tensorflow/compiler/jit:common",
740        "//tensorflow/compiler/tf2xla:common",
741        "//tensorflow/core:core_cpu",
742        "//tensorflow/core:core_cpu_internal",
743        "//tensorflow/core:framework",
744        "//tensorflow/core:framework_internal",
745        "//tensorflow/core:lib",
746        "//tensorflow/core:protos_all_cc",
747        "//tensorflow/core:tensorflow_opensource",
748        "//tensorflow/core:test",
749        "//tensorflow/core:testlib",
750        "//tensorflow/core/kernels:ops_util",
751    ],
752)
753
754tf_cuda_cc_test(
755    name = "randomized_tests",
756    size = "large",
757    # This test is randomized, so only run it if explicitly requested.
758    tags = [
759        "manual",
760        "notap",
761    ] + tf_cuda_tests_tags(),
762    deps = [":randomized_tests_library"],
763)
764
765py_library(
766    name = "lstm",
767    testonly = 1,
768    srcs = ["lstm.py"],
769    srcs_version = "PY2AND3",
770    deps = [
771        "//tensorflow/python:array_ops",
772        "//tensorflow/python:framework_for_generated_wrappers",
773        "//tensorflow/python:math_ops",
774        "//tensorflow/python:random_ops",
775        "//tensorflow/python:variables",
776    ],
777)
778
779cuda_py_test(
780    name = "lstm_test",
781    srcs = ["lstm_test.py"],
782    additional_deps = [
783        ":lstm",
784        ":xla_test",
785        "//tensorflow/python:array_ops",
786        "//tensorflow/python:client_testlib",
787        "//tensorflow/python:framework_for_generated_wrappers",
788        "//tensorflow/python:gradients",
789        "//tensorflow/python:init_ops",
790        "//tensorflow/python:math_ops",
791        "//tensorflow/python:platform",
792        "//tensorflow/python:variables",
793    ],
794)
795
796# An example of ahead-of-time compilation using tfcompile.  The
797# lstm_layer_inference.pbtxt file was generated by running lstm_test
798# --dump_graph_dir, and the config file was written by hand.
799#
800# Run the following to build a minimal benchmark of the computation on Android:
801# $ bazel build -c opt --cxxopt='-std=c++11' --linkopt='-lm' \
802#   --cpu=armeabi-v7a \
803#   --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
804#   --crosstool_top=//external:android/crosstool \
805#   //tensorflow/compiler/tests:lstm_layer_inference_benchmark
806
807#
808# Currently the resulting binary size is ~190KB
809tf_library(
810    name = "lstm_layer_inference",
811    testonly = 1,
812    config = "lstm_layer_inference.config.pbtxt",
813    cpp_class = "LSTMLayerInference",
814    graph = "lstm_layer_inference.pbtxt",
815    tags = ["manual"],
816    tfcompile_flags = ["--xla_cpu_multi_thread_eigen=false"],
817)
818
819tf_xla_py_test(
820    name = "fake_quant_ops_test",
821    size = "medium",
822    srcs = ["fake_quant_ops_test.py"],
823    deps = [
824        ":xla_test",
825        "//tensorflow/python:framework_for_generated_wrappers",
826        "//tensorflow/python:platform_test",
827    ],
828)
829
830# -----------------------------------------------------------------------------
831
832filegroup(
833    name = "all_files",
834    srcs = glob(
835        ["**/*"],
836        exclude = [
837            "**/METADATA",
838            "**/OWNERS",
839        ],
840    ),
841    visibility = ["//tensorflow:__subpackages__"],
842)
843