1 # Description: 2 # Op kernel implementations for TensorFlow. 3 # 4 # Note: Any test that uses GPU support and which we would like to 5 # benchmark should be linked statically so that it can be executed 6 # from a py_binary or cuda_py_test test logger. For such a test, 7 # append "_gpu" to the test name to invoke the GPU benchmarks. Example: 8 # 9 # # for CPU tests 10 # $ bazel test --config opt //third_party/tensorflow/core/kernels:my_op_test 11 # # for GPU benchmarks 12 # $ bazel run --config opt --config=cuda //third_party/tensorflow/core/kernels:my_op_test_gpu -- --benchmarks=.. 13 # 14 package(default_visibility = ["//visibility:public"]) 15 16 licenses(["notice"]) # Apache 2.0 17 18 package_group( 19 name = "friends", 20 packages = [ 21 "//learning/brain/contrib/...", 22 "//learning/brain/research/sparse_matrix/...", 23 "//learning/faster_training/...", 24 "//tensorflow/...", 25 ], 26 ) 27 28 load( 29 "//tensorflow:tensorflow.bzl", 30 "if_android", 31 "tf_cc_test", 32 "tf_cc_tests", 33 "tf_cc_binary", 34 "tf_copts", 35 "tf_cuda_library", 36 "tf_opts_nortti_if_android", 37 "tf_kernel_library", 38 "tf_mkl_kernel_library", 39 "cc_header_only_library", 40 "if_not_windows", 41 "if_override_eigen_strong_inline", 42 ) 43 load("@local_config_sycl//sycl:build_defs.bzl", "if_sycl") 44 load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_test") 45 load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_tests") 46 load( 47 "//tensorflow/core:platform/default/build_config.bzl", 48 "tf_proto_library", 49 "tf_kernel_tests_linkstatic", 50 ) 51 load( 52 "//third_party/mkl:build_defs.bzl", 53 "if_mkl", 54 ) 55 load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") 56 57 config_setting( 58 # Add "--define tensorflow_xsmm=1" to your build command to use libxsmm for 59 # convolutions (and possibly more in the future). You will also need 60 # appropriate -mavx*, as required by specific op you use. 61 name = "xsmm", 62 values = { 63 "define": "tensorflow_xsmm=1", 64 }, 65 ) 66 67 config_setting( 68 # Add "--define tensorflow_xsmm_backward=1" to your build command to use 69 # libxsmm for backward convolutions (and possibly more in the future). You 70 # will also need appropriate -mavx*, as required by specific op you use. 71 name = "xsmm_backward", 72 values = { 73 "define": "tensorflow_xsmm_backward=1", 74 }, 75 ) 76 77 # Public support libraries ---------------------------------------------------- 78 79 cc_library( 80 name = "assign_op", 81 hdrs = ["assign_op.h"], 82 deps = [ 83 "//tensorflow/core:framework", 84 "//third_party/eigen3", 85 ], 86 ) 87 88 tf_kernel_library( 89 name = "strided_slice_op", 90 srcs = [ 91 "strided_slice_op.cc", 92 "strided_slice_op_inst_0.cc", 93 "strided_slice_op_inst_1.cc", 94 "strided_slice_op_inst_2.cc", 95 "strided_slice_op_inst_3.cc", 96 "strided_slice_op_inst_4.cc", 97 "strided_slice_op_inst_5.cc", 98 "strided_slice_op_inst_6.cc", 99 "strided_slice_op_inst_7.cc", 100 ], 101 hdrs = [ 102 "slice_op.h", 103 "strided_slice_op.h", 104 "strided_slice_op_impl.h", 105 ], 106 gpu_srcs = [ 107 "slice_op.h", 108 "strided_slice_op.h", 109 "strided_slice_op_impl.h", 110 "strided_slice_op_gpu.cu.cc", 111 ], 112 deps = [ 113 ":bounds_check", 114 ":dense_update_functor", 115 ":ops_util", 116 ":variable_ops", 117 "//tensorflow/core:framework", 118 "//tensorflow/core:lib", 119 "//third_party/eigen3", 120 ], 121 ) 122 123 tf_kernel_library( 124 name = "concat_lib", 125 srcs = [ 126 "concat_lib_cpu.cc", 127 "concat_lib_gpu.cc", 128 ], 129 hdrs = [ 130 "concat_lib.h", 131 "concat_lib_cpu.h", 132 ], 133 gpu_srcs = [ 134 "concat_lib_gpu_impl.cu.cc", 135 "concat_lib.h", 136 "cuda_device_array.h", 137 "cuda_device_array_gpu.h", 138 ], 139 deps = [ 140 ":bounds_check", 141 "//tensorflow/core:framework", 142 "//third_party/eigen3", 143 ], 144 alwayslink = 0, 145 ) 146 147 cc_library( 148 name = "concat_lib_hdrs", 149 hdrs = [ 150 "concat_lib.h", 151 "concat_lib_cpu.h", 152 ], 153 deps = ["//third_party/eigen3"], 154 ) 155 156 cc_library( 157 name = "conv_2d", 158 hdrs = ["conv_2d.h"], 159 deps = [ 160 ":eigen_helpers", 161 ":gpu_util_hdrs", 162 "//tensorflow/core:framework", 163 "//third_party/eigen3", 164 ], 165 ) 166 167 cc_library( 168 name = "conv_2d_hdrs", 169 hdrs = ["conv_2d.h"], 170 deps = [ 171 ":eigen_helpers", 172 "//third_party/eigen3", 173 ], 174 ) 175 176 tf_kernel_library( 177 name = "extract_image_patches_op", 178 prefix = "extract_image_patches_op", 179 deps = [ 180 ":bounds_check", 181 ":eigen_helpers", 182 ":ops_util", 183 "//tensorflow/core:framework", 184 "//tensorflow/core:lib", 185 "//third_party/eigen3", 186 ], 187 ) 188 189 cc_library( 190 name = "conv_3d", 191 hdrs = ["conv_3d.h"], 192 deps = [ 193 ":eigen_helpers", 194 "//tensorflow/core:framework", 195 ], 196 ) 197 198 tf_kernel_library( 199 name = "fill_functor", 200 prefix = "fill_functor", 201 deps = [ 202 "//tensorflow/core:framework", 203 "//third_party/eigen3", 204 ], 205 ) 206 207 cc_library( 208 name = "initializable_lookup_table", 209 srcs = ["initializable_lookup_table.cc"], 210 hdrs = ["initializable_lookup_table.h"], 211 deps = [ 212 "//tensorflow/core:framework", 213 "//tensorflow/core:lib", 214 ], 215 ) 216 217 cc_library( 218 name = "lookup_util", 219 srcs = ["lookup_util.cc"], 220 hdrs = ["lookup_util.h"], 221 deps = [ 222 ":initializable_lookup_table", 223 "//tensorflow/core:framework", 224 "//tensorflow/core:lib", 225 "//tensorflow/core:lib_internal", 226 ], 227 ) 228 229 tf_cuda_library( 230 name = "ops_testutil", 231 testonly = 1, 232 srcs = ["ops_testutil.cc"], 233 hdrs = ["ops_testutil.h"], 234 cuda_deps = [ 235 "//tensorflow/core:gpu_lib", 236 "//tensorflow/core:gpu_runtime", 237 ], 238 deps = [ 239 "//tensorflow/core:core_cpu", 240 "//tensorflow/core:core_cpu_internal", 241 "//tensorflow/core:framework", 242 "//tensorflow/core:lib", 243 "//tensorflow/core:lib_internal", 244 "//tensorflow/core:protos_all_cc", 245 "//tensorflow/core:tensor_testutil", 246 "//tensorflow/core:test", 247 ], 248 ) 249 250 cc_library( 251 name = "ops_util", 252 srcs = ["ops_util.cc"], 253 hdrs = ["ops_util.h"], 254 copts = if_not_windows(["-Wno-sign-compare"]), 255 deps = [ 256 "//tensorflow/core:framework", 257 "//tensorflow/core:lib", 258 "//tensorflow/core:protos_all_cc", 259 "//third_party/eigen3", 260 ], 261 ) 262 263 cc_library( 264 name = "ops_util_hdrs", 265 hdrs = ["ops_util.h"], 266 deps = ["//third_party/eigen3"], 267 ) 268 269 cc_library( 270 name = "conv_ops_gpu_hdrs", 271 hdrs = ["conv_ops_gpu.h"], 272 ) 273 274 cc_library( 275 name = "gpu_util_hdrs", 276 hdrs = ["gpu_utils.h"], 277 ) 278 279 tf_cc_test( 280 name = "ops_util_test", 281 size = "small", 282 srcs = ["ops_util_test.cc"], 283 deps = [ 284 ":ops_util", 285 "//tensorflow/core:framework", 286 "//tensorflow/core:test", 287 "//tensorflow/core:test_main", 288 "//third_party/eigen3", 289 ], 290 ) 291 292 cc_library( 293 name = "reshape_util", 294 srcs = ["reshape_util.cc"], 295 hdrs = ["reshape_util.h"], 296 deps = [ 297 "//tensorflow/core:framework", 298 "//tensorflow/core:lib", 299 "//tensorflow/core:protos_all_cc", 300 ], 301 ) 302 303 tf_cc_test( 304 name = "variable_ops_test", 305 size = "small", 306 srcs = ["variable_ops_test.cc"], 307 deps = [ 308 "//tensorflow/core:all_kernels", 309 "//tensorflow/core:core_cpu", 310 "//tensorflow/core:direct_session_internal", 311 "//tensorflow/core:framework", 312 "//tensorflow/core:lib", 313 "//tensorflow/core:test", 314 "//tensorflow/core:test_main", 315 ], 316 ) 317 318 tf_kernel_library( 319 name = "stage_op", 320 srcs = ["stage_op.cc"], 321 deps = [ 322 "//tensorflow/core:framework", 323 "//tensorflow/core:lib", 324 ], 325 ) 326 327 tf_kernel_library( 328 name = "map_stage_op", 329 srcs = ["map_stage_op.cc"], 330 deps = [ 331 "//tensorflow/core:framework", 332 "//tensorflow/core:lib", 333 ], 334 ) 335 336 cc_library( 337 name = "queue_base", 338 srcs = ["queue_base.cc"], 339 hdrs = ["queue_base.h"], 340 deps = [ 341 ":batch_util", 342 "//tensorflow/core:framework", 343 "//tensorflow/core:lib", 344 "//tensorflow/core:protos_all_cc", 345 ], 346 ) 347 348 cc_library( 349 name = "queue_op", 350 hdrs = ["queue_op.h"], 351 deps = [ 352 ":queue_base", 353 "//tensorflow/core:framework", 354 "//tensorflow/core:lib", 355 ], 356 ) 357 358 cc_library( 359 name = "priority_queue", 360 srcs = ["priority_queue.cc"], 361 hdrs = ["priority_queue.h"], 362 deps = [ 363 ":batch_util", 364 ":queue_base", 365 ":typed_queue", 366 "//tensorflow/core:framework", 367 "//tensorflow/core:lib", 368 "//tensorflow/core:protos_all_cc", 369 ], 370 ) 371 372 cc_library( 373 name = "batch_kernels", 374 srcs = ["batch_kernels.cc"], 375 deps = [ 376 "//tensorflow/core:batch_ops_op_lib", 377 "//tensorflow/core:framework_headers_lib", 378 "//tensorflow/core:protos_all_cc", 379 "//tensorflow/core/kernels:concat_lib_hdrs", 380 "//tensorflow/core/kernels:ops_util_hdrs", 381 "//tensorflow/core/kernels:split_lib_hdrs", 382 "//tensorflow/core/kernels/batching_util:periodic_function_dynamic", 383 "//tensorflow/core/kernels/batching_util:shared_batch_scheduler_hdrs", 384 ], 385 alwayslink = 1, 386 ) 387 388 tf_kernel_library( 389 name = "record_input_op", 390 srcs = [ 391 "record_input_op.cc", 392 "record_yielder.cc", 393 "record_yielder.h", 394 ], 395 deps = [ 396 "//tensorflow/core:framework", 397 "//tensorflow/core:lib", 398 ], 399 ) 400 401 cc_library( 402 name = "save_restore_tensor", 403 srcs = ["save_restore_tensor.cc"], 404 hdrs = ["save_restore_tensor.h"], 405 copts = if_not_windows(["-Wno-sign-compare"]), 406 deps = [ 407 ":bounds_check", 408 "//tensorflow/core:framework", 409 "//tensorflow/core:lib", 410 "//tensorflow/core/util/tensor_bundle", 411 ], 412 ) 413 414 tf_kernel_library( 415 name = "split_lib", 416 srcs = ["split_lib_cpu.cc"], 417 hdrs = ["split_lib.h"], 418 gpu_srcs = [ 419 "split_lib_gpu.cu.cc", 420 "split_lib.h", 421 ], 422 deps = [ 423 ":cuda_device_array", 424 "//tensorflow/core:framework", 425 "//third_party/eigen3", 426 ], 427 alwayslink = 0, 428 ) 429 430 cc_library( 431 name = "split_lib_hdrs", 432 hdrs = [ 433 "split_lib.h", 434 ], 435 deps = [ 436 "//tensorflow/core:framework_lite", 437 "//third_party/eigen3", 438 ], 439 ) 440 441 cc_library( 442 name = "typed_queue", 443 hdrs = ["typed_queue.h"], 444 deps = [ 445 ":queue_base", 446 "//tensorflow/core:framework", 447 ], 448 ) 449 450 cc_library( 451 name = "training_op_helpers", 452 srcs = ["training_op_helpers.cc"], 453 hdrs = ["training_op_helpers.h"], 454 visibility = [":friends"], 455 deps = [ 456 ":dense_update_functor", 457 ":variable_ops", 458 "//tensorflow/core:framework", 459 "//tensorflow/core:lib", 460 ], 461 ) 462 463 cc_library( 464 name = "bounds_check", 465 hdrs = ["bounds_check.h"], 466 visibility = [":friends"], 467 deps = [ 468 "//tensorflow/core:framework_lite", 469 "//third_party/eigen3", 470 ], 471 ) 472 473 cc_library( 474 name = "warn_about_ints", 475 srcs = ["warn_about_ints.cc"], 476 hdrs = ["warn_about_ints.h"], 477 deps = [ 478 "//tensorflow/core:framework", 479 "//tensorflow/core:protos_all_cc", 480 ], 481 ) 482 483 # Private support libraries --------------------------------------------------- 484 485 cc_header_only_library( 486 name = "bounds_check_lib", 487 deps = [":bounds_check"], 488 ) 489 490 cc_library( 491 name = "cuda_device_array", 492 hdrs = [ 493 "cuda_device_array.h", 494 "cuda_device_array_gpu.h", 495 ], 496 visibility = ["//tensorflow:__subpackages__"], 497 deps = [ 498 "//tensorflow/core:framework", 499 "//tensorflow/core:gpu_headers_lib", 500 "//tensorflow/core:lib", 501 ], 502 ) 503 504 cc_library( 505 name = "eigen_helpers", 506 hdrs = [ 507 "eigen_activations.h", 508 "eigen_attention.h", 509 "eigen_backward_cuboid_convolutions.h", 510 "eigen_backward_spatial_convolutions.h", 511 "eigen_cuboid_convolution.h", 512 "eigen_pooling.h", 513 "eigen_softmax.h", 514 "eigen_spatial_convolutions.h", 515 "eigen_volume_patch.h", 516 ], 517 deps = [ 518 "//third_party/eigen3", 519 ], 520 ) 521 522 cc_library( 523 name = "image_resizer_state", 524 hdrs = ["image_resizer_state.h"], 525 visibility = ["//visibility:private"], 526 deps = [ 527 ":bounds_check", 528 "//tensorflow/core:framework", 529 "//tensorflow/core:lib", 530 "//third_party/eigen3", 531 ], 532 ) 533 534 cc_header_only_library( 535 name = "image_resizer_state_lib", 536 deps = [":image_resizer_state"], 537 ) 538 539 # OpKernel libraries ---------------------------------------------------------- 540 541 ARRAY_DEPS = [ 542 ":bounds_check", 543 ":concat_lib", 544 ":fill_functor", 545 ":gather_functor", 546 ":ops_util", 547 ":transpose_functor", 548 "//tensorflow/core:array_grad", 549 "//tensorflow/core:array_ops_op_lib", 550 "//tensorflow/core:core_cpu", 551 "//tensorflow/core:framework", 552 "//tensorflow/core:lib", 553 "//tensorflow/core:lib_internal", 554 "//tensorflow/core:proto_text", 555 "//tensorflow/core:protos_all_cc", 556 "//third_party/eigen3", 557 ] + if_sycl(["//tensorflow/core:sycl_runtime"]) 558 559 cc_library( 560 name = "array_not_windows", 561 deps = [ 562 ":immutable_constant_op", 563 ], 564 ) 565 566 tf_kernel_library( 567 name = "immutable_constant_op", 568 prefix = "immutable_constant_op", 569 deps = ARRAY_DEPS, 570 ) 571 572 tf_kernel_library( 573 name = "set_kernels", 574 prefix = "set_kernels", 575 deps = [ 576 "//tensorflow/core:framework_headers_lib", 577 "//tensorflow/core:lib", 578 "//tensorflow/core:set_ops_op_lib", 579 "//third_party/eigen3", 580 ], 581 ) 582 583 tf_kernel_library( 584 name = "debug_ops", 585 prefix = "debug_ops", 586 deps = ARRAY_DEPS + [ 587 "//tensorflow/core:gpu_runtime", 588 "//tensorflow/core/debug:debug_io_utils", 589 ], 590 ) 591 592 cc_library( 593 name = "array", 594 deps = [ 595 ":batch_space_ops", 596 ":bcast_ops", 597 ":bitcast_op", 598 ":concat_op", 599 ":constant_op", 600 ":depth_space_ops", 601 ":diag_op", 602 ":edit_distance_op", 603 ":extract_image_patches_op", 604 ":gather_nd_op", 605 ":gather_op", 606 ":guarantee_const_op", 607 ":identity_n_op", 608 ":identity_op", 609 ":inplace_ops", 610 ":listdiff_op", 611 ":matrix_band_part_op", 612 ":matrix_diag_op", 613 ":matrix_set_diag_op", 614 ":mirror_pad_op", 615 ":one_hot_op", 616 ":pack_op", 617 ":pad_op", 618 ":quantize_and_dequantize_op", 619 ":reshape_op", 620 ":reverse_op", 621 ":reverse_sequence_op", 622 ":shape_ops", 623 ":slice_op", 624 ":snapshot_op", 625 ":split_op", 626 ":split_v_op", 627 ":strided_slice_op", 628 ":tile_ops", 629 ":transpose_op", 630 ":unique_op", 631 ":unpack_op", 632 ":unravel_index_op", 633 ":where_op", 634 ], 635 ) 636 637 tf_kernel_library( 638 name = "bcast_ops", 639 prefix = "bcast_ops", 640 deps = ARRAY_DEPS, 641 ) 642 643 tf_kernel_library( 644 name = "bitcast_op", 645 prefix = "bitcast_op", 646 deps = ARRAY_DEPS, 647 ) 648 649 tf_kernel_library( 650 name = "concat_op", 651 prefix = "concat_op", 652 deps = ARRAY_DEPS, 653 ) 654 655 tf_kernel_library( 656 name = "guarantee_const_op", 657 prefix = "guarantee_const_op", 658 deps = ARRAY_DEPS, 659 ) 660 661 tf_kernel_library( 662 name = "constant_op", 663 prefix = "constant_op", 664 deps = ARRAY_DEPS, 665 ) 666 667 tf_kernel_library( 668 name = "diag_op", 669 prefix = "diag_op", 670 deps = ARRAY_DEPS, 671 ) 672 673 tf_kernel_library( 674 name = "edit_distance_op", 675 prefix = "edit_distance_op", 676 deps = ARRAY_DEPS, 677 ) 678 679 tf_kernel_library( 680 name = "gather_nd_op", 681 prefix = "gather_nd_op", 682 deps = ARRAY_DEPS, 683 ) 684 685 tf_kernel_library( 686 name = "gather_op", 687 prefix = "gather_op", 688 deps = ARRAY_DEPS, 689 ) 690 691 tf_kernel_library( 692 name = "identity_op", 693 prefix = "identity_op", 694 deps = ARRAY_DEPS, 695 ) 696 697 tf_kernel_library( 698 name = "identity_n_op", 699 prefix = "identity_n_op", 700 deps = ARRAY_DEPS, 701 ) 702 703 tf_kernel_library( 704 name = "listdiff_op", 705 prefix = "listdiff_op", 706 deps = ARRAY_DEPS, 707 ) 708 709 tf_kernel_library( 710 name = "matrix_band_part_op", 711 prefix = "matrix_band_part_op", 712 deps = if_cuda([ 713 ":cuda_solvers", 714 ]) + ARRAY_DEPS, 715 ) 716 717 tf_kernel_library( 718 name = "matrix_diag_op", 719 prefix = "matrix_diag_op", 720 deps = ARRAY_DEPS, 721 ) 722 723 tf_kernel_library( 724 name = "matrix_set_diag_op", 725 prefix = "matrix_set_diag_op", 726 deps = ARRAY_DEPS, 727 ) 728 729 tf_kernel_library( 730 name = "mirror_pad_op", 731 prefix = "mirror_pad_op", 732 deps = ARRAY_DEPS, 733 ) 734 735 tf_kernel_library( 736 name = "one_hot_op", 737 prefix = "one_hot_op", 738 deps = ARRAY_DEPS + ["//tensorflow/core:overflow"], 739 ) 740 741 tf_kernel_library( 742 name = "pack_op", 743 prefix = "pack_op", 744 deps = ARRAY_DEPS, 745 ) 746 747 tf_kernel_library( 748 name = "pad_op", 749 prefix = "pad_op", 750 deps = ARRAY_DEPS, 751 ) 752 753 tf_kernel_library( 754 name = "quantize_and_dequantize_op", 755 prefix = "quantize_and_dequantize_op", 756 deps = ARRAY_DEPS, 757 ) 758 759 tf_kernel_library( 760 name = "compare_and_bitpack_op", 761 srcs = ["compare_and_bitpack_op.cc"], 762 hdrs = ["compare_and_bitpack_op.h"], 763 gpu_srcs = [ 764 "compare_and_bitpack_op.h", 765 "compare_and_bitpack_op_gpu.cu.cc", 766 ], 767 deps = ARRAY_DEPS, 768 ) 769 770 # TODO(ebrevdo): Add benchmarks once the op is in the autogen array namespace. 771 # tf_cuda_cc_test( 772 # name = "compare_and_bitpack_op_test", 773 # srcs = ["compare_and_bitpack_op_test.cc"], 774 # deps = [ 775 # ":array", 776 # ":ops_testutil", 777 # ":ops_util", 778 # "//third_party/eigen3", 779 # "//tensorflow/cc:cc_ops", 780 # "//tensorflow/cc:cc_ops_internal", 781 # "//tensorflow/core:core_cpu", 782 # "//tensorflow/core:core_cpu_internal", 783 # "//tensorflow/core:framework", 784 # "//tensorflow/core:lib", 785 # "//tensorflow/core:protos_all_cc", 786 # "//tensorflow/core:test", 787 # "//tensorflow/core:test_main", 788 # "//tensorflow/core:testlib", 789 # ], 790 # ) 791 792 tf_kernel_library( 793 name = "reshape_op", 794 prefix = "reshape_op", 795 deps = ARRAY_DEPS, 796 ) 797 798 tf_kernel_library( 799 name = "reverse_op", 800 prefix = "reverse_op", 801 deps = ARRAY_DEPS, 802 ) 803 804 tf_kernel_library( 805 name = "reverse_sequence_op", 806 prefix = "reverse_sequence_op", 807 deps = ARRAY_DEPS, 808 ) 809 810 tf_kernel_library( 811 name = "shape_ops", 812 prefix = "shape_ops", 813 deps = ARRAY_DEPS, 814 ) 815 816 tf_kernel_library( 817 name = "slice_op", 818 prefix = "slice_op", 819 deps = ARRAY_DEPS + [":strided_slice_op"], 820 ) 821 822 tf_kernel_library( 823 name = "snapshot_op", 824 prefix = "snapshot_op", 825 deps = ARRAY_DEPS, 826 ) 827 828 tf_kernel_library( 829 name = "split_op", 830 gpu_srcs = ["cuda_device_array.h"], 831 prefix = "split_op", 832 deps = ARRAY_DEPS + [":split_lib"], 833 ) 834 835 tf_kernel_library( 836 name = "split_v_op", 837 gpu_srcs = ["cuda_device_array.h"], 838 prefix = "split_v_op", 839 deps = ARRAY_DEPS + [":split_lib"], 840 ) 841 842 tf_kernel_library( 843 name = "inplace_ops", 844 prefix = "inplace_ops", 845 deps = ARRAY_DEPS, 846 ) 847 848 tf_kernel_library( 849 name = "tile_ops", 850 srcs = ["tile_functor_cpu.cc"], 851 hdrs = ["tile_functor.h"], 852 gpu_srcs = [ 853 "tile_functor.h", 854 "tile_functor_gpu.cu.cc", 855 ], 856 prefix = "tile_ops", 857 textual_hdrs = ["tile_ops_gpu_impl.h"], 858 deps = ARRAY_DEPS, 859 ) 860 861 tf_kernel_library( 862 name = "transpose_op", 863 srcs = [ 864 "transpose_op.cc", 865 ] + if_mkl([ 866 "mkl_transpose_op.cc", 867 ]), 868 hdrs = ["transpose_op.h"], 869 deps = ARRAY_DEPS + if_mkl([ 870 "//third_party/mkl:intel_binary_blob", 871 "@mkl_dnn//:mkl_dnn", 872 ]), 873 ) 874 875 tf_kernel_library( 876 name = "unique_op", 877 prefix = "unique_op", 878 deps = ARRAY_DEPS, 879 ) 880 881 tf_kernel_library( 882 name = "unpack_op", 883 prefix = "unpack_op", 884 deps = ARRAY_DEPS + [":split_lib"], 885 ) 886 887 tf_kernel_library( 888 name = "unravel_index_op", 889 prefix = "unravel_index_op", 890 deps = ARRAY_DEPS, 891 ) 892 893 tf_kernel_library( 894 name = "where_op", 895 srcs = ["where_op.cc"], 896 hdrs = ["where_op.h"], 897 gpu_srcs = [ 898 "where_op.h", 899 "where_op_gpu.cu.h", 900 "where_op_gpu_impl_1.cu.cc", 901 "where_op_gpu_impl_2.cu.cc", 902 "where_op_gpu_impl_3.cu.cc", 903 "where_op_gpu_impl_4.cu.cc", 904 "where_op_gpu_impl_5.cu.cc", 905 ], 906 deps = if_cuda([ 907 ":cuda_solvers", 908 "@cub_archive//:cub", 909 ]) + ARRAY_DEPS, 910 ) 911 912 tf_cc_test( 913 name = "batch_norm_op_test", 914 size = "small", 915 srcs = ["batch_norm_op_test.cc"], 916 deps = [ 917 ":batch_norm_op", 918 ":ops_testutil", 919 ":ops_util", 920 "//tensorflow/core:core_cpu", 921 "//tensorflow/core:framework", 922 "//tensorflow/core:lib", 923 "//tensorflow/core:protos_all_cc", 924 "//tensorflow/core:test", 925 "//tensorflow/core:test_main", 926 "//tensorflow/core:testlib", 927 ], 928 ) 929 930 tf_cc_test( 931 name = "ops_testutil_test", 932 size = "small", 933 srcs = ["ops_testutil_test.cc"], 934 deps = [ 935 ":identity_op", 936 ":ops_testutil", 937 ":ops_util", 938 ":variable_ops", 939 "//tensorflow/core:core_cpu", 940 "//tensorflow/core:framework", 941 "//tensorflow/core:lib", 942 "//tensorflow/core:protos_all_cc", 943 "//tensorflow/core:test", 944 "//tensorflow/core:test_main", 945 "//tensorflow/core:testlib", 946 ], 947 ) 948 949 tf_cc_test( 950 name = "concat_op_test", 951 size = "small", 952 srcs = ["concat_op_test.cc"], 953 deps = [ 954 ":concat_op", 955 ":ops_testutil", 956 ":ops_util", 957 "//tensorflow/core:core_cpu", 958 "//tensorflow/core:framework", 959 "//tensorflow/core:lib", 960 "//tensorflow/core:protos_all_cc", 961 "//tensorflow/core:test", 962 "//tensorflow/core:test_main", 963 "//tensorflow/core:testlib", 964 ], 965 ) 966 967 tf_cuda_cc_test( 968 name = "bincount_op_test", 969 size = "small", 970 srcs = ["bincount_op_test.cc"], 971 deps = [ 972 ":bincount_op", 973 ":ops_testutil", 974 ":ops_util", 975 "//tensorflow/core:core_cpu", 976 "//tensorflow/core:framework", 977 "//tensorflow/core:lib", 978 "//tensorflow/core:math_ops_op_lib", 979 "//tensorflow/core:protos_all_cc", 980 "//tensorflow/core:test", 981 "//tensorflow/core:test_main", 982 "//tensorflow/core:testlib", 983 ], 984 ) 985 986 tf_cuda_cc_test( 987 name = "constant_op_test", 988 size = "small", 989 srcs = ["constant_op_test.cc"], 990 tags = ["no_cuda_on_cpu_tap"], 991 deps = [ 992 ":constant_op", 993 ":ops_testutil", 994 ":ops_util", 995 "//tensorflow/core:core_cpu", 996 "//tensorflow/core:framework", 997 "//tensorflow/core:lib", 998 "//tensorflow/core:protos_all_cc", 999 "//tensorflow/core:test", 1000 "//tensorflow/core:test_main", 1001 "//tensorflow/core:testlib", 1002 ], 1003 ) 1004 1005 tf_cc_test( 1006 name = "deep_conv2d_test", 1007 size = "small", 1008 srcs = ["deep_conv2d_test.cc"], 1009 deps = [ 1010 ":conv_ops", 1011 "//tensorflow/core:test", 1012 "//tensorflow/core:test_main", 1013 ], 1014 ) 1015 1016 tf_cc_test( 1017 name = "xsmm_conv2d_test", 1018 size = "small", 1019 srcs = select({ 1020 ":xsmm": ["xsmm_conv2d_test.cc"], 1021 "//conditions:default": [], 1022 }), 1023 deps = [ 1024 ":conv_ops", 1025 ":ops_testutil", 1026 ":ops_util", 1027 "//tensorflow/core:core_cpu", 1028 "//tensorflow/core:framework", 1029 "//tensorflow/core:lib", 1030 "//tensorflow/core:protos_all_cc", 1031 "//tensorflow/core:test", 1032 "//tensorflow/core:test_main", 1033 "//tensorflow/core:testlib", 1034 ] + select({ 1035 ":xsmm": [ 1036 "@libxsmm_archive//:xsmm_avx", 1037 ], 1038 "//conditions:default": [], 1039 }), 1040 ) 1041 1042 tf_cc_test( 1043 name = "conv_ops_test", 1044 size = "medium", 1045 srcs = ["conv_ops_test.cc"], 1046 deps = [ 1047 ":conv_ops", 1048 ":image", 1049 ":ops_testutil", 1050 ":ops_util", 1051 "//tensorflow/cc:cc_ops", 1052 "//tensorflow/core:core_cpu", 1053 "//tensorflow/core:framework", 1054 "//tensorflow/core:framework_internal", 1055 "//tensorflow/core:lib", 1056 "//tensorflow/core:protos_all_cc", 1057 "//tensorflow/core:tensorflow", 1058 "//tensorflow/core:test", 1059 "//tensorflow/core:test_main", 1060 "//tensorflow/core:testlib", 1061 ], 1062 ) 1063 1064 tf_cc_test( 1065 name = "decode_wav_op_test", 1066 size = "small", 1067 srcs = ["decode_wav_op_test.cc"], 1068 deps = [ 1069 ":decode_wav_op", 1070 ":ops_testutil", 1071 ":ops_util", 1072 "//tensorflow/cc:cc_ops", 1073 "//tensorflow/cc:client_session", 1074 "//tensorflow/core:core_cpu", 1075 "//tensorflow/core:framework", 1076 "//tensorflow/core:framework_internal", 1077 "//tensorflow/core:lib", 1078 "//tensorflow/core:protos_all_cc", 1079 "//tensorflow/core:tensorflow", 1080 "//tensorflow/core:test", 1081 "//tensorflow/core:test_main", 1082 "//tensorflow/core:testlib", 1083 ], 1084 ) 1085 1086 tf_cc_test( 1087 name = "encode_wav_op_test", 1088 size = "small", 1089 srcs = ["encode_wav_op_test.cc"], 1090 deps = [ 1091 ":decode_wav_op", 1092 ":encode_wav_op", 1093 ":ops_testutil", 1094 ":ops_util", 1095 "//tensorflow/cc:cc_ops", 1096 "//tensorflow/cc:client_session", 1097 "//tensorflow/core:core_cpu", 1098 "//tensorflow/core:framework", 1099 "//tensorflow/core:framework_internal", 1100 "//tensorflow/core:lib", 1101 "//tensorflow/core:protos_all_cc", 1102 "//tensorflow/core:tensorflow", 1103 "//tensorflow/core:test", 1104 "//tensorflow/core:test_main", 1105 "//tensorflow/core:testlib", 1106 ], 1107 ) 1108 1109 tf_cc_test( 1110 name = "example_parsing_ops_test", 1111 size = "large", 1112 srcs = ["example_parsing_ops_test.cc"], 1113 deps = [ 1114 ":example_parsing_ops", 1115 ":ops_testutil", 1116 ":ops_util", 1117 "//tensorflow/core:core_cpu", 1118 "//tensorflow/core:framework", 1119 "//tensorflow/core:lib", 1120 "//tensorflow/core:protos_all_cc", 1121 "//tensorflow/core:test", 1122 "//tensorflow/core:test_main", 1123 "//tensorflow/core:testlib", 1124 ], 1125 ) 1126 1127 tf_cc_test( 1128 name = "fake_quant_ops_test", 1129 size = "small", 1130 srcs = ["fake_quant_ops_test.cc"], 1131 deps = [ 1132 ":fake_quant_ops", 1133 ":ops_testutil", 1134 ":ops_util", 1135 "//tensorflow/core:core_cpu", 1136 "//tensorflow/core:framework", 1137 "//tensorflow/core:lib", 1138 "//tensorflow/core:protos_all_cc", 1139 "//tensorflow/core:test", 1140 "//tensorflow/core:test_main", 1141 "//tensorflow/core:testlib", 1142 ], 1143 ) 1144 1145 tf_cc_test( 1146 name = "fused_batch_norm_op_test", 1147 size = "small", 1148 srcs = ["fused_batch_norm_op_test.cc"], 1149 deps = [ 1150 ":fused_batch_norm_op", 1151 ":ops_testutil", 1152 ":ops_util", 1153 "//tensorflow/core:core_cpu", 1154 "//tensorflow/core:framework", 1155 "//tensorflow/core:lib", 1156 "//tensorflow/core:protos_all_cc", 1157 "//tensorflow/core:test", 1158 "//tensorflow/core:test_main", 1159 "//tensorflow/core:testlib", 1160 ], 1161 ) 1162 1163 tf_kernel_library( 1164 name = "gather_functor", 1165 prefix = "gather_functor", 1166 visibility = [":friends"], 1167 deps = [ 1168 ":bounds_check", 1169 "//tensorflow/core:framework", 1170 "//third_party/eigen3", 1171 ], 1172 ) 1173 1174 # Unlike gather_functor library, this does not include the CUDA code and deps. 1175 cc_library( 1176 name = "gather_functor_hdr", 1177 hdrs = ["gather_functor.h"], 1178 ) 1179 1180 tf_kernel_library( 1181 name = "dense_update_functor", 1182 srcs = ["dense_update_functor.cc"], 1183 hdrs = ["dense_update_functor.h"], 1184 gpu_srcs = [ 1185 "dense_update_functor.h", 1186 "dense_update_functor_gpu.cu.cc", 1187 ], 1188 deps = [ 1189 "//tensorflow/core:framework", 1190 "//tensorflow/core:lib", 1191 "//third_party/eigen3", 1192 ], 1193 alwayslink = 0, 1194 ) 1195 1196 tf_cuda_cc_test( 1197 name = "gather_op_test", 1198 size = "small", 1199 srcs = ["gather_op_test.cc"], 1200 deps = [ 1201 ":gather_op", 1202 ":ops_testutil", 1203 ":ops_util", 1204 "//tensorflow/core:core_cpu", 1205 "//tensorflow/core:framework", 1206 "//tensorflow/core:lib", 1207 "//tensorflow/core:protos_all_cc", 1208 "//tensorflow/core:test", 1209 "//tensorflow/core:test_main", 1210 "//tensorflow/core:testlib", 1211 ], 1212 ) 1213 1214 tf_cuda_cc_test( 1215 name = "gather_nd_op_test", 1216 size = "small", 1217 srcs = ["gather_nd_op_test.cc"], 1218 deps = [ 1219 ":gather_nd_op", 1220 ":ops_testutil", 1221 ":ops_util", 1222 "//tensorflow/core:core_cpu", 1223 "//tensorflow/core:framework", 1224 "//tensorflow/core:lib", 1225 "//tensorflow/core:protos_all_cc", 1226 "//tensorflow/core:test", 1227 "//tensorflow/core:test_main", 1228 "//tensorflow/core:testlib", 1229 ], 1230 ) 1231 1232 tf_cc_test( 1233 name = "guarantee_const_op_test", 1234 size = "small", 1235 srcs = ["guarantee_const_op_test.cc"], 1236 deps = [ 1237 ":guarantee_const_op", 1238 ":ops_testutil", 1239 ":ops_util", 1240 ":variable_ops", 1241 "//tensorflow/core:core_cpu", 1242 "//tensorflow/core:framework", 1243 "//tensorflow/core:lib", 1244 "//tensorflow/core:protos_all_cc", 1245 "//tensorflow/core:test", 1246 "//tensorflow/core:test_main", 1247 "//tensorflow/core:testlib", 1248 ], 1249 ) 1250 1251 tf_cc_test( 1252 name = "identity_op_test", 1253 size = "small", 1254 srcs = ["identity_op_test.cc"], 1255 deps = [ 1256 ":identity_op", 1257 ":ops_testutil", 1258 ":ops_util", 1259 "//tensorflow/core:core_cpu", 1260 "//tensorflow/core:framework", 1261 "//tensorflow/core:lib", 1262 "//tensorflow/core:protos_all_cc", 1263 "//tensorflow/core:test", 1264 "//tensorflow/core:test_main", 1265 "//tensorflow/core:testlib", 1266 ], 1267 ) 1268 1269 tf_cc_test( 1270 name = "identity_n_op_test", 1271 size = "small", 1272 srcs = ["identity_n_op_test.cc"], 1273 deps = [ 1274 ":identity_n_op", 1275 ":ops_testutil", 1276 ":ops_util", 1277 "//tensorflow/core:core_cpu", 1278 "//tensorflow/core:framework", 1279 "//tensorflow/core:lib", 1280 "//tensorflow/core:protos_all_cc", 1281 "//tensorflow/core:test", 1282 "//tensorflow/core:test_main", 1283 "//tensorflow/core:testlib", 1284 ], 1285 ) 1286 1287 tf_cc_test( 1288 name = "debug_ops_test", 1289 size = "small", 1290 srcs = ["debug_ops_test.cc"], 1291 deps = [ 1292 ":debug_ops", 1293 ":ops_testutil", 1294 ":ops_util", 1295 "//tensorflow/core:core_cpu", 1296 "//tensorflow/core:debug_ops_op_lib", 1297 "//tensorflow/core:framework", 1298 "//tensorflow/core:lib", 1299 "//tensorflow/core:protos_all_cc", 1300 "//tensorflow/core:test", 1301 "//tensorflow/core:test_main", 1302 "//tensorflow/core:testlib", 1303 "//tensorflow/core/debug:debug_io_utils", 1304 "//tensorflow/core/debug:debug_node_key", 1305 ], 1306 ) 1307 1308 tf_cuda_cc_test( 1309 name = "quantize_and_dequantize_op_test", 1310 size = "small", 1311 srcs = ["quantize_and_dequantize_op_test.cc"], 1312 deps = [ 1313 ":ops_testutil", 1314 ":ops_util", 1315 ":quantize_and_dequantize_op", 1316 "//tensorflow/cc:cc_ops", 1317 "//tensorflow/core:core_cpu", 1318 "//tensorflow/core:framework", 1319 "//tensorflow/core:lib", 1320 "//tensorflow/core:protos_all_cc", 1321 "//tensorflow/core:test", 1322 "//tensorflow/core:test_main", 1323 "//tensorflow/core:testlib", 1324 ], 1325 ) 1326 1327 tf_cc_test( 1328 name = "dequantize_op_test", 1329 size = "small", 1330 srcs = ["dequantize_op_test.cc"], 1331 deps = [ 1332 ":ops_testutil", 1333 ":ops_util", 1334 ":quantized_ops", 1335 "//tensorflow/cc:cc_ops", 1336 "//tensorflow/core:core_cpu", 1337 "//tensorflow/core:framework", 1338 "//tensorflow/core:lib", 1339 "//tensorflow/core:protos_all_cc", 1340 "//tensorflow/core:test", 1341 "//tensorflow/core:test_main", 1342 "//tensorflow/core:testlib", 1343 ], 1344 ) 1345 1346 tf_cc_test( 1347 name = "reverse_op_test", 1348 size = "small", 1349 srcs = ["reverse_op_test.cc"], 1350 deps = [ 1351 ":ops_testutil", 1352 ":ops_util", 1353 ":reverse_op", 1354 "//tensorflow/core:core_cpu", 1355 "//tensorflow/core:core_cpu_internal", 1356 "//tensorflow/core:framework", 1357 "//tensorflow/core:lib", 1358 "//tensorflow/core:protos_all_cc", 1359 "//tensorflow/core:test", 1360 "//tensorflow/core:test_main", 1361 "//tensorflow/core:testlib", 1362 ], 1363 ) 1364 1365 tf_kernel_library( 1366 name = "scatter_functor", 1367 prefix = "scatter_functor", 1368 visibility = [":friends"], 1369 deps = [ 1370 ":bounds_check", 1371 "//tensorflow/core:framework", 1372 "//tensorflow/core:lib", 1373 "//third_party/eigen3", 1374 ], 1375 ) 1376 1377 tf_cc_test( 1378 name = "slice_op_test", 1379 size = "small", 1380 srcs = ["slice_op_test.cc"], 1381 linkopts = select({ 1382 "//tensorflow:darwin": ["-headerpad_max_install_names"], 1383 "//conditions:default": [], 1384 }), 1385 deps = [ 1386 ":ops_testutil", 1387 ":ops_util", 1388 ":slice_op", 1389 "//tensorflow/core:core_cpu", 1390 "//tensorflow/core:framework", 1391 "//tensorflow/core:lib", 1392 "//tensorflow/core:protos_all_cc", 1393 "//tensorflow/core:test", 1394 "//tensorflow/core:test_main", 1395 "//tensorflow/core:testlib", 1396 ], 1397 ) 1398 1399 tf_cc_test( 1400 name = "strided_slice_op_test", 1401 size = "small", 1402 srcs = ["strided_slice_op_test.cc"], 1403 deps = [ 1404 ":ops_testutil", 1405 ":ops_util", 1406 ":slice_op", 1407 ":strided_slice_op", 1408 "//tensorflow/core:core_cpu", 1409 "//tensorflow/core:framework", 1410 "//tensorflow/core:lib", 1411 "//tensorflow/core:protos_all_cc", 1412 "//tensorflow/core:test", 1413 "//tensorflow/core:test_main", 1414 "//tensorflow/core:testlib", 1415 ], 1416 ) 1417 1418 tf_cc_test( 1419 name = "unique_op_test", 1420 size = "small", 1421 srcs = ["unique_op_test.cc"], 1422 deps = [ 1423 ":ops_testutil", 1424 ":ops_util", 1425 ":unique_op", 1426 "//tensorflow/core:core_cpu", 1427 "//tensorflow/core:framework", 1428 "//tensorflow/core:lib", 1429 "//tensorflow/core:protos_all_cc", 1430 "//tensorflow/core:test", 1431 "//tensorflow/core:test_main", 1432 "//tensorflow/core:testlib", 1433 ], 1434 ) 1435 1436 tf_kernel_library( 1437 name = "transpose_functor", 1438 srcs = ["transpose_functor_cpu.cc"], 1439 hdrs = ["transpose_functor.h"], 1440 gpu_srcs = [ 1441 "transpose_functor_gpu.cu.cc", 1442 "transpose_functor.h", 1443 ], 1444 visibility = [":friends"], 1445 deps = [ 1446 ":conv_ops", 1447 ":ops_util", 1448 "//tensorflow/core:framework", 1449 "//tensorflow/core:lib", 1450 "//tensorflow/core:protos_all_cc", 1451 "//third_party/eigen3", 1452 ], 1453 alwayslink = 0, 1454 ) 1455 1456 tf_cc_test( 1457 name = "transpose_util_test", 1458 size = "small", 1459 srcs = ["transpose_util_test.cc"], 1460 deps = [ 1461 ":transpose_functor", 1462 "//tensorflow/core:framework", 1463 "//tensorflow/core:tensor_testutil", 1464 "//tensorflow/core:test", 1465 "//tensorflow/core:test_main", 1466 ], 1467 ) 1468 1469 tf_kernel_library( 1470 name = "candidate_sampler_ops", 1471 prefix = "candidate_sampler_ops", 1472 deps = [ 1473 ":range_sampler", 1474 "//tensorflow/core:candidate_sampling_ops_op_lib", 1475 "//tensorflow/core:framework", 1476 "//tensorflow/core:lib", 1477 ], 1478 ) 1479 1480 cc_library( 1481 name = "range_sampler", 1482 srcs = ["range_sampler.cc"], 1483 hdrs = ["range_sampler.h"], 1484 visibility = ["//visibility:private"], 1485 deps = [ 1486 "//tensorflow/core:lib", 1487 "//tensorflow/core:lib_internal", 1488 ], 1489 ) 1490 1491 tf_cc_test( 1492 name = "range_sampler_test", 1493 size = "small", 1494 srcs = ["range_sampler_test.cc"], 1495 deps = [ 1496 ":range_sampler", 1497 "//tensorflow/core:framework", 1498 "//tensorflow/core:lib", 1499 "//tensorflow/core:test", 1500 "//tensorflow/core:test_main", 1501 ], 1502 ) 1503 1504 tf_kernel_library( 1505 name = "control_flow_ops", 1506 prefix = "control_flow_ops", 1507 deps = [ 1508 "//tensorflow/core:control_flow_ops_op_lib", 1509 "//tensorflow/core:framework", 1510 "//tensorflow/core:lib", 1511 ], 1512 ) 1513 1514 tf_kernel_library( 1515 name = "ctc_ops", 1516 prefix = "ctc", 1517 deps = [ 1518 ":bounds_check", 1519 ":ops_util", 1520 "//tensorflow/core:ctc_ops_op_lib", 1521 "//tensorflow/core:framework", 1522 "//tensorflow/core:lib", 1523 "//tensorflow/core/util/ctc:ctc_beam_search_lib", 1524 "//tensorflow/core/util/ctc:ctc_loss_calculator_lib", 1525 ], 1526 ) 1527 1528 tf_cc_test( 1529 name = "control_flow_ops_test", 1530 size = "small", 1531 srcs = ["control_flow_ops_test.cc"], 1532 deps = [ 1533 ":control_flow_ops", 1534 ":ops_testutil", 1535 ":ops_util", 1536 "//tensorflow/core:framework", 1537 "//tensorflow/core:protos_all_cc", 1538 "//tensorflow/core:test", 1539 "//tensorflow/core:test_main", 1540 "//tensorflow/core:testlib", 1541 ], 1542 ) 1543 1544 cc_library( 1545 name = "data_flow", 1546 deps = [ 1547 ":barrier_ops", 1548 ":conditional_accumulator_base_op", 1549 ":conditional_accumulator_op", 1550 ":dynamic_partition_op", 1551 ":dynamic_stitch_op", 1552 ":fifo_queue_op", 1553 ":lookup_table_init_op", 1554 ":lookup_table_op", 1555 ":map_stage_op", 1556 ":padding_fifo_queue_op", 1557 ":priority_queue_op", 1558 ":queue_ops", 1559 ":random_shuffle_queue_op", 1560 ":record_input_op", 1561 ":session_ops", 1562 ":sparse_conditional_accumulator_op", 1563 ":stack_ops", 1564 ":stage_op", 1565 ":tensor_array_ops", 1566 ], 1567 ) 1568 1569 cc_library( 1570 name = "lookup", 1571 deps = [ 1572 ":lookup_table_init_op", 1573 ":lookup_table_op", 1574 ], 1575 ) 1576 1577 cc_header_only_library( 1578 name = "lookup_headers_lib", 1579 deps = [":lookup"], 1580 ) 1581 1582 DATA_FLOW_DEPS = [ 1583 ":bounds_check", 1584 ":concat_lib", 1585 ":conditional_accumulator", 1586 ":conditional_accumulator_base", 1587 ":fifo_queue", 1588 ":initializable_lookup_table", 1589 ":lookup_util", 1590 ":padding_fifo_queue", 1591 ":priority_queue", 1592 ":queue_base", 1593 ":queue_op", 1594 ":sparse_conditional_accumulator", 1595 ":split_lib", 1596 ":tensor_array", 1597 ":typed_conditional_accumulator_base", 1598 ":typed_queue", 1599 "//third_party/eigen3", 1600 "//tensorflow/core:core_cpu", 1601 "//tensorflow/core:data_flow_ops_op_lib", 1602 "//tensorflow/core:framework", 1603 "//tensorflow/core:lib", 1604 "//tensorflow/core:lib_internal", 1605 ] 1606 1607 tf_kernel_library( 1608 name = "conditional_accumulator_base_op", 1609 prefix = "conditional_accumulator_base_op", 1610 deps = DATA_FLOW_DEPS, 1611 ) 1612 1613 tf_kernel_library( 1614 name = "conditional_accumulator_op", 1615 prefix = "conditional_accumulator_op", 1616 deps = DATA_FLOW_DEPS, 1617 ) 1618 1619 tf_kernel_library( 1620 name = "barrier_ops", 1621 prefix = "barrier_ops", 1622 deps = DATA_FLOW_DEPS, 1623 ) 1624 1625 tf_kernel_library( 1626 name = "fifo_queue_op", 1627 prefix = "fifo_queue_op", 1628 deps = DATA_FLOW_DEPS, 1629 ) 1630 1631 tf_kernel_library( 1632 name = "padding_fifo_queue_op", 1633 prefix = "padding_fifo_queue_op", 1634 deps = DATA_FLOW_DEPS, 1635 ) 1636 1637 tf_kernel_library( 1638 name = "priority_queue_op", 1639 prefix = "priority_queue_op", 1640 deps = DATA_FLOW_DEPS, 1641 ) 1642 1643 tf_kernel_library( 1644 name = "queue_ops", 1645 prefix = "queue_ops", 1646 deps = DATA_FLOW_DEPS, 1647 ) 1648 1649 tf_kernel_library( 1650 name = "random_shuffle_queue_op", 1651 prefix = "random_shuffle_queue_op", 1652 deps = DATA_FLOW_DEPS + [ 1653 ":batch_util", 1654 "//tensorflow/core:protos_all_cc", 1655 ], 1656 ) 1657 1658 tf_kernel_library( 1659 name = "session_ops", 1660 prefix = "session_ops", 1661 deps = DATA_FLOW_DEPS, 1662 ) 1663 1664 tf_kernel_library( 1665 name = "sparse_conditional_accumulator_op", 1666 prefix = "sparse_conditional_accumulator_op", 1667 deps = DATA_FLOW_DEPS, 1668 ) 1669 1670 tf_kernel_library( 1671 name = "stack_ops", 1672 prefix = "stack_ops", 1673 deps = DATA_FLOW_DEPS, 1674 ) 1675 1676 tf_kernel_library( 1677 name = "tensor_array_ops", 1678 prefix = "tensor_array_ops", 1679 deps = DATA_FLOW_DEPS, 1680 ) 1681 1682 DYNAMIC_DEPS = [ 1683 ":bounds_check", 1684 "//tensorflow/core:core_cpu", 1685 "//tensorflow/core:data_flow_ops_op_lib", 1686 "//tensorflow/core:framework", 1687 "//tensorflow/core:lib", 1688 "//tensorflow/core:lib_internal", 1689 ] 1690 1691 tf_kernel_library( 1692 name = "dynamic_partition_op", 1693 prefix = "dynamic_partition_op", 1694 deps = DYNAMIC_DEPS + [ 1695 ":fill_functor", 1696 ":gather_functor", 1697 ] + if_cuda(["@cub_archive//:cub"]), 1698 ) 1699 1700 tf_kernel_library( 1701 name = "dynamic_stitch_op", 1702 gpu_srcs = [ 1703 "cuda_device_array.h", 1704 "cuda_device_array_gpu.h", 1705 ], 1706 prefix = "dynamic_stitch_op", 1707 deps = DYNAMIC_DEPS, 1708 ) 1709 1710 LOOKUP_DEPS = [ 1711 ":bounds_check", 1712 ":initializable_lookup_table", 1713 ":lookup_util", 1714 "//tensorflow/core:core_cpu", 1715 "//tensorflow/core:framework", 1716 "//tensorflow/core:lib", 1717 "//tensorflow/core:lib_internal", 1718 "//tensorflow/core:lookup_ops_op_lib", 1719 ] 1720 1721 tf_kernel_library( 1722 name = "lookup_table_init_op", 1723 prefix = "lookup_table_init_op", 1724 deps = LOOKUP_DEPS, 1725 ) 1726 1727 tf_kernel_library( 1728 name = "lookup_table_op", 1729 prefix = "lookup_table_op", 1730 deps = LOOKUP_DEPS, 1731 ) 1732 1733 cc_library( 1734 name = "checkpoint_ops", 1735 deps = [ 1736 ":generate_vocab_remapping_op", 1737 ":load_and_remap_matrix_op", 1738 ], 1739 ) 1740 1741 tf_kernel_library( 1742 name = "generate_vocab_remapping_op", 1743 srcs = ["generate_vocab_remapping_op.cc"], 1744 deps = [ 1745 ":lookup_table_init_op", 1746 ":lookup_table_op", 1747 "//tensorflow/core:checkpoint_ops_op_lib", 1748 "//tensorflow/core:framework", 1749 "//tensorflow/core:lib", 1750 "//third_party/eigen3", 1751 ], 1752 ) 1753 1754 tf_kernel_library( 1755 name = "load_and_remap_matrix_op", 1756 srcs = ["load_and_remap_matrix_op.cc"], 1757 deps = [ 1758 "//tensorflow/core:checkpoint_ops_op_lib", 1759 "//tensorflow/core:framework", 1760 "//tensorflow/core:lib", 1761 "//tensorflow/core:lib_internal", 1762 "//tensorflow/core/util/tensor_bundle", 1763 "//third_party/eigen3", 1764 ], 1765 ) 1766 1767 tf_cuda_cc_tests( 1768 name = "dynamic_op_test", 1769 size = "small", 1770 srcs = [ 1771 "dynamic_partition_op_test.cc", 1772 "dynamic_stitch_op_test.cc", 1773 ], 1774 deps = [ 1775 ":data_flow", 1776 ":ops_testutil", 1777 ":ops_util", 1778 "//tensorflow/core:core_cpu", 1779 "//tensorflow/core:framework", 1780 "//tensorflow/core:lib", 1781 "//tensorflow/core:protos_all_cc", 1782 "//tensorflow/core:test", 1783 "//tensorflow/core:test_main", 1784 "//tensorflow/core:testlib", 1785 ], 1786 ) 1787 1788 tf_kernel_library( 1789 name = "eye_functor", 1790 hdrs = ["eye_functor.h"], 1791 gpu_srcs = [ 1792 "eye_functor_gpu.cu.cc", 1793 "eye_functor.h", 1794 ], 1795 visibility = [":friends"], 1796 deps = [ 1797 "//tensorflow/core:framework", 1798 "//third_party/eigen3", 1799 ], 1800 alwayslink = 0, 1801 ) 1802 1803 cc_library( 1804 name = "fifo_queue", 1805 srcs = ["fifo_queue.cc"], 1806 hdrs = ["fifo_queue.h"], 1807 visibility = ["//visibility:private"], 1808 deps = [ 1809 ":batch_util", 1810 ":queue_base", 1811 ":typed_queue", 1812 "//tensorflow/core:framework", 1813 "//tensorflow/core:lib", 1814 "//tensorflow/core:protos_all_cc", 1815 ], 1816 ) 1817 1818 cc_library( 1819 name = "padding_fifo_queue", 1820 srcs = ["padding_fifo_queue.cc"], 1821 hdrs = ["padding_fifo_queue.h"], 1822 visibility = ["//visibility:private"], 1823 deps = [ 1824 ":batch_util", 1825 ":fifo_queue", 1826 ":queue_base", 1827 ":typed_queue", 1828 "//tensorflow/core:framework", 1829 "//tensorflow/core:lib", 1830 "//tensorflow/core:protos_all_cc", 1831 ], 1832 ) 1833 1834 cc_library( 1835 name = "conditional_accumulator_base", 1836 srcs = ["conditional_accumulator_base.cc"], 1837 hdrs = [ 1838 "conditional_accumulator_base.h", 1839 ], 1840 deps = [ 1841 "//tensorflow/core:framework", 1842 "//tensorflow/core:lib", 1843 "//third_party/eigen3", 1844 ], 1845 ) 1846 1847 cc_library( 1848 name = "typed_conditional_accumulator_base", 1849 hdrs = ["typed_conditional_accumulator_base.h"], 1850 deps = [ 1851 ":conditional_accumulator_base", 1852 ], 1853 ) 1854 1855 cc_library( 1856 name = "conditional_accumulator", 1857 hdrs = [ 1858 "conditional_accumulator.h", 1859 "conditional_accumulator_base_op.h", 1860 ], 1861 deps = [ 1862 ":conditional_accumulator_base", 1863 ":fill_functor", 1864 ":typed_conditional_accumulator_base", 1865 ], 1866 ) 1867 1868 cc_library( 1869 name = "sparse_conditional_accumulator", 1870 hdrs = ["sparse_conditional_accumulator.h"], 1871 deps = [ 1872 ":typed_conditional_accumulator_base", 1873 ], 1874 ) 1875 1876 tf_kernel_library( 1877 name = "tensor_array", 1878 srcs = ["tensor_array.cc"], 1879 hdrs = ["tensor_array.h"], 1880 visibility = ["//visibility:private"], 1881 deps = [ 1882 ":aggregate_ops", 1883 "//tensorflow/core:framework", 1884 "//tensorflow/core:lib", 1885 "//third_party/eigen3", 1886 ], 1887 ) 1888 1889 tf_kernel_library( 1890 name = "resource_variable_ops", 1891 srcs = ["resource_variable_ops.cc"], 1892 deps = [ 1893 ":bounds_check", 1894 ":critical_section", 1895 ":dense_update_functor", 1896 ":gather_functor", 1897 ":scatter_functor", 1898 ":state", 1899 ":training_op_helpers", 1900 ":variable_ops", 1901 "//tensorflow/core:framework", 1902 "//tensorflow/core:lib", 1903 "//tensorflow/core:resource_variable_ops_op_lib", 1904 "//third_party/eigen3", 1905 ], 1906 ) 1907 1908 tf_kernel_library( 1909 name = "list_kernels", 1910 srcs = ["list_kernels.cc"], 1911 hdrs = ["list_kernels.h"], 1912 gpu_srcs = [ 1913 "list_kernels.cu.cc", 1914 "list_kernels.h", 1915 ], 1916 deps = [ 1917 ":concat_lib", 1918 "//tensorflow/core:framework", 1919 "//tensorflow/core:lib", 1920 "//tensorflow/core:list_ops_op_lib", 1921 "//third_party/eigen3", 1922 ], 1923 ) 1924 1925 tf_kernel_library( 1926 name = "fact_op", 1927 prefix = "fact_op", 1928 deps = [ 1929 "//tensorflow/core:framework", 1930 "//tensorflow/core:lib", 1931 "//tensorflow/core:user_ops_op_lib", 1932 ], 1933 ) 1934 1935 tf_kernel_library( 1936 name = "function_ops", 1937 prefix = "function_ops", 1938 deps = [ 1939 "//tensorflow/core:core_cpu", 1940 "//tensorflow/core:core_cpu_internal", 1941 "//tensorflow/core:framework", 1942 "//tensorflow/core:lib", 1943 ], 1944 ) 1945 1946 tf_kernel_library( 1947 name = "functional_ops", 1948 prefix = "functional_ops", 1949 deps = [ 1950 "//tensorflow/core:framework", 1951 "//tensorflow/core:functional_ops_op_lib", 1952 "//tensorflow/core:lib", 1953 "//third_party/eigen3", 1954 ], 1955 ) 1956 1957 cc_library( 1958 name = "image", 1959 deps = [ 1960 ":adjust_contrast_op", 1961 ":adjust_hue_op", 1962 ":adjust_saturation_op", 1963 ":attention_ops", 1964 ":colorspace_op", 1965 ":crop_and_resize_op", 1966 ":decode_bmp_op", 1967 ":decode_image_op", 1968 ":draw_bounding_box_op", 1969 ":encode_jpeg_op", 1970 ":encode_png_op", 1971 ":extract_jpeg_shape_op", 1972 ":non_max_suppression_op", 1973 ":random_crop_op", 1974 ":resize_area_op", 1975 ":resize_bicubic_op", 1976 ":resize_bilinear_op", 1977 ":resize_nearest_neighbor_op", 1978 ":sample_distorted_bounding_box_op", 1979 ], 1980 ) 1981 1982 IMAGE_DEPS = [ 1983 ":bounds_check", 1984 ":eigen_helpers", 1985 ":image_resizer_state", 1986 "//third_party/eigen3", 1987 "//tensorflow/core:framework", 1988 "//tensorflow/core:gif_internal", 1989 "//tensorflow/core:image_ops_op_lib", 1990 "//tensorflow/core:jpeg_internal", 1991 "//tensorflow/core:lib", 1992 "//tensorflow/core:lib_internal", 1993 "//tensorflow/core:protos_all_cc", 1994 ] 1995 1996 tf_kernel_library( 1997 name = "adjust_contrast_op", 1998 prefix = "adjust_contrast_op", 1999 deps = IMAGE_DEPS, 2000 ) 2001 2002 cc_library( 2003 name = "adjust_hsv_gpu_lib", 2004 hdrs = ["adjust_hsv_gpu.cu.h"], 2005 deps = ["//tensorflow/core:framework"], 2006 ) 2007 2008 tf_kernel_library( 2009 name = "adjust_hue_op", 2010 prefix = "adjust_hue_op", 2011 deps = IMAGE_DEPS + [":adjust_hsv_gpu_lib"], 2012 ) 2013 2014 tf_kernel_library( 2015 name = "adjust_saturation_op", 2016 prefix = "adjust_saturation_op", 2017 deps = IMAGE_DEPS + [":adjust_hsv_gpu_lib"], 2018 ) 2019 2020 tf_kernel_library( 2021 name = "attention_ops", 2022 prefix = "attention_ops", 2023 deps = IMAGE_DEPS, 2024 ) 2025 2026 tf_kernel_library( 2027 name = "colorspace_op", 2028 prefix = "colorspace_op", 2029 deps = IMAGE_DEPS, 2030 ) 2031 2032 tf_kernel_library( 2033 name = "crop_and_resize_op", 2034 prefix = "crop_and_resize_op", 2035 deps = IMAGE_DEPS, 2036 ) 2037 2038 tf_kernel_library( 2039 name = "decode_bmp_op", 2040 prefix = "decode_bmp_op", 2041 deps = IMAGE_DEPS, 2042 ) 2043 2044 tf_kernel_library( 2045 name = "decode_image_op", 2046 prefix = "decode_image_op", 2047 deps = IMAGE_DEPS, 2048 ) 2049 2050 tf_kernel_library( 2051 name = "draw_bounding_box_op", 2052 prefix = "draw_bounding_box_op", 2053 deps = IMAGE_DEPS, 2054 ) 2055 2056 tf_kernel_library( 2057 name = "encode_jpeg_op", 2058 prefix = "encode_jpeg_op", 2059 deps = IMAGE_DEPS, 2060 ) 2061 2062 tf_kernel_library( 2063 name = "encode_png_op", 2064 prefix = "encode_png_op", 2065 deps = IMAGE_DEPS, 2066 ) 2067 2068 tf_kernel_library( 2069 name = "extract_jpeg_shape_op", 2070 prefix = "extract_jpeg_shape_op", 2071 deps = IMAGE_DEPS, 2072 ) 2073 2074 tf_kernel_library( 2075 name = "non_max_suppression_op", 2076 prefix = "non_max_suppression_op", 2077 deps = IMAGE_DEPS, 2078 ) 2079 2080 tf_kernel_library( 2081 name = "random_crop_op", 2082 prefix = "random_crop_op", 2083 deps = IMAGE_DEPS, 2084 ) 2085 2086 tf_kernel_library( 2087 name = "resize_area_op", 2088 prefix = "resize_area_op", 2089 deps = IMAGE_DEPS, 2090 ) 2091 2092 tf_kernel_library( 2093 name = "resize_bicubic_op", 2094 prefix = "resize_bicubic_op", 2095 deps = IMAGE_DEPS, 2096 ) 2097 2098 tf_kernel_library( 2099 name = "resize_bilinear_op", 2100 prefix = "resize_bilinear_op", 2101 deps = IMAGE_DEPS, 2102 ) 2103 2104 tf_kernel_library( 2105 name = "resize_nearest_neighbor_op", 2106 prefix = "resize_nearest_neighbor_op", 2107 deps = IMAGE_DEPS, 2108 ) 2109 2110 tf_kernel_library( 2111 name = "sample_distorted_bounding_box_op", 2112 prefix = "sample_distorted_bounding_box_op", 2113 deps = IMAGE_DEPS, 2114 ) 2115 2116 tf_kernel_library( 2117 name = "encode_wav_op", 2118 prefix = "encode_wav_op", 2119 deps = [ 2120 ":bounds_check", 2121 "//tensorflow/core:audio_ops_op_lib", 2122 "//tensorflow/core:framework", 2123 "//tensorflow/core:lib", 2124 "//tensorflow/core:lib_internal", 2125 "//tensorflow/core:protos_all_cc", 2126 ], 2127 ) 2128 2129 tf_kernel_library( 2130 name = "decode_wav_op", 2131 prefix = "decode_wav_op", 2132 deps = [ 2133 "//tensorflow/core:audio_ops_op_lib", 2134 "//tensorflow/core:framework", 2135 "//tensorflow/core:lib", 2136 "//tensorflow/core:lib_internal", 2137 "//tensorflow/core:protos_all_cc", 2138 ], 2139 ) 2140 2141 tf_cc_tests( 2142 name = "eigen_test", 2143 size = "small", 2144 srcs = [ 2145 "eigen_activations_test.cc", 2146 "eigen_attention_test.cc", 2147 "eigen_backward_spatial_convolutions_test.cc", 2148 "eigen_pooling_test.cc", 2149 "eigen_softmax_test.cc", 2150 "eigen_spatial_convolutions_test.cc", 2151 ], 2152 deps = [ 2153 ":eigen_helpers", 2154 "//tensorflow/core:core_cpu", 2155 "//tensorflow/core:framework", 2156 "//tensorflow/core:protos_all_cc", 2157 "//tensorflow/core:test", 2158 "//tensorflow/core:test_main", 2159 "//tensorflow/core:testlib", 2160 ], 2161 ) 2162 2163 tf_cc_tests( 2164 name = "basic_ops_benchmark_test", 2165 size = "small", 2166 srcs = [ 2167 "basic_ops_benchmark_test.cc", 2168 ], 2169 deps = [ 2170 ":math", 2171 ":ops_util", 2172 ":state", 2173 "//tensorflow/core:core_cpu", 2174 "//tensorflow/core:framework", 2175 "//tensorflow/core:test", 2176 "//tensorflow/core:test_main", 2177 "//tensorflow/core:testlib", 2178 ], 2179 ) 2180 2181 tf_cc_tests( 2182 name = "bonus_tests", 2183 srcs = [ 2184 "adjust_contrast_op_test.cc", 2185 "colorspace_op_test.cc", 2186 "crop_and_resize_op_test.cc", 2187 "non_max_suppression_op_test.cc", 2188 "resize_area_op_test.cc", 2189 "resize_bicubic_op_test.cc", 2190 "resize_bilinear_op_test.cc", 2191 "resize_nearest_neighbor_op_test.cc", 2192 ], 2193 linkopts = select({ 2194 "//tensorflow:darwin": ["-headerpad_max_install_names"], 2195 "//conditions:default": [], 2196 }), 2197 deps = [ 2198 ":image", 2199 ":ops_testutil", 2200 ":ops_util", 2201 "//tensorflow/core:core_cpu", 2202 "//tensorflow/core:framework", 2203 "//tensorflow/core:lib_internal", 2204 "//tensorflow/core:protos_all_cc", 2205 "//tensorflow/core:test", 2206 "//tensorflow/core:test_main", 2207 "//tensorflow/core:testlib", 2208 ], 2209 ) 2210 2211 tf_cuda_cc_test( 2212 name = "adjust_contrast_op_benchmark_test", 2213 srcs = ["adjust_contrast_op_benchmark_test.cc"], 2214 deps = [ 2215 ":image", 2216 ":ops_testutil", 2217 ":ops_util", 2218 "//tensorflow/core:core_cpu", 2219 "//tensorflow/core:framework", 2220 "//tensorflow/core:protos_all_cc", 2221 "//tensorflow/core:test", 2222 "//tensorflow/core:test_main", 2223 "//tensorflow/core:testlib", 2224 ], 2225 ) 2226 2227 tf_cuda_cc_test( 2228 name = "resize_benchmark_test", 2229 srcs = ["resize_op_benchmark_test.cc"], 2230 deps = [ 2231 ":image", 2232 ":ops_testutil", 2233 ":ops_util", 2234 "//tensorflow/core:core_cpu", 2235 "//tensorflow/core:framework", 2236 "//tensorflow/core:protos_all_cc", 2237 "//tensorflow/core:test", 2238 "//tensorflow/core:test_main", 2239 "//tensorflow/core:testlib", 2240 ], 2241 ) 2242 2243 cc_library( 2244 name = "io", 2245 deps = [ 2246 ":fixed_length_record_reader_op", 2247 ":identity_reader_op", 2248 ":lmdb_reader_op", 2249 ":matching_files_op", 2250 ":reader_ops", 2251 ":restore_op", 2252 ":save_op", 2253 ":save_restore_v2_ops", 2254 ":text_line_reader_op", 2255 ":tf_record_reader_op", 2256 ":whole_file_read_ops", 2257 ], 2258 ) 2259 2260 IO_DEPS = [ 2261 ":ops_util", 2262 "//tensorflow/core:framework", 2263 "//tensorflow/core:io_ops_op_lib", 2264 "//tensorflow/core:lib", 2265 "//tensorflow/core:lib_internal", 2266 "//tensorflow/core:protos_all_cc", 2267 "//tensorflow/core:reader_base", 2268 "//tensorflow/core/util/tensor_bundle", 2269 ] 2270 2271 tf_kernel_library( 2272 name = "fixed_length_record_reader_op", 2273 prefix = "fixed_length_record_reader_op", 2274 deps = IO_DEPS, 2275 ) 2276 2277 tf_kernel_library( 2278 name = "identity_reader_op", 2279 prefix = "identity_reader_op", 2280 deps = IO_DEPS, 2281 ) 2282 2283 tf_kernel_library( 2284 name = "lmdb_reader_op", 2285 prefix = "lmdb_reader_op", 2286 deps = IO_DEPS + [ 2287 "@lmdb", 2288 ], 2289 ) 2290 2291 tf_kernel_library( 2292 name = "matching_files_op", 2293 prefix = "matching_files_op", 2294 deps = IO_DEPS, 2295 ) 2296 2297 tf_kernel_library( 2298 name = "reader_ops", 2299 prefix = "reader_ops", 2300 deps = IO_DEPS, 2301 ) 2302 2303 SAVE_RESTORE_DEPS = [ 2304 ":bounds_check_lib", 2305 ":save_restore_tensor", 2306 "//tensorflow/core:framework", 2307 "//tensorflow/core:io_ops_op_lib", 2308 "//tensorflow/core:lib", 2309 "//tensorflow/core:lib_internal", 2310 "//tensorflow/core:protos_all_cc", 2311 "//tensorflow/core/util/tensor_bundle", 2312 ] 2313 2314 tf_kernel_library( 2315 name = "restore_op", 2316 prefix = "restore_op", 2317 deps = SAVE_RESTORE_DEPS, 2318 ) 2319 2320 tf_kernel_library( 2321 name = "save_op", 2322 prefix = "save_op", 2323 deps = SAVE_RESTORE_DEPS, 2324 ) 2325 2326 tf_kernel_library( 2327 name = "save_restore_v2_ops", 2328 prefix = "save_restore_v2_ops", 2329 deps = SAVE_RESTORE_DEPS, 2330 ) 2331 2332 tf_kernel_library( 2333 name = "text_line_reader_op", 2334 prefix = "text_line_reader_op", 2335 deps = IO_DEPS, 2336 ) 2337 2338 tf_kernel_library( 2339 name = "tf_record_reader_op", 2340 prefix = "tf_record_reader_op", 2341 deps = IO_DEPS, 2342 ) 2343 2344 tf_kernel_library( 2345 name = "whole_file_read_ops", 2346 prefix = "whole_file_read_ops", 2347 deps = IO_DEPS, 2348 ) 2349 2350 tf_cc_tests( 2351 name = "bonus2_tests", 2352 size = "small", 2353 srcs = [ 2354 "merge_v2_checkpoints_op_test.cc", 2355 "restore_op_test.cc", 2356 "restore_v2_op_test.cc", 2357 "save_op_test.cc", 2358 "save_v2_op_test.cc", 2359 ], 2360 deps = [ 2361 ":io", 2362 ":ops_testutil", 2363 ":ops_util", 2364 "//tensorflow/cc:cc_ops", 2365 "//tensorflow/core:core_cpu", 2366 "//tensorflow/core:core_cpu_internal", 2367 "//tensorflow/core:framework", 2368 "//tensorflow/core:lib", 2369 "//tensorflow/core:protos_all_cc", 2370 "//tensorflow/core:test", 2371 "//tensorflow/core:test_main", 2372 "//tensorflow/core:testlib", 2373 "//tensorflow/core/util/tensor_bundle", 2374 ], 2375 ) 2376 2377 cc_library( 2378 name = "linalg", 2379 deps = [ 2380 ":cholesky_grad", 2381 ":cholesky_op", 2382 ":determinant_op", 2383 ":matrix_exponential_op", 2384 ":matrix_inverse_op", 2385 ":matrix_logarithm_op", 2386 ":matrix_solve_ls_op", 2387 ":matrix_solve_op", 2388 ":matrix_triangular_solve_op", 2389 ":qr_op", 2390 ":self_adjoint_eig_op", 2391 ":self_adjoint_eig_v2_op", 2392 ":svd_op", 2393 ], 2394 ) 2395 2396 tf_kernel_library( 2397 name = "cuda_solvers", 2398 srcs = ["cuda_solvers.cc"], 2399 hdrs = ["cuda_solvers.h"], 2400 # @local_config_cuda//cuda:cusolver, //third_party/eigen3:blas, 2401 # and //third_party/libf2c all contain various parts of BLAS, LAPACK, 2402 # and f2c helper functions in global namespace. Tell the compiler to 2403 # allow multiple definitions when linking this. 2404 linkopts = select({ 2405 "//tensorflow:darwin": [], 2406 "//conditions:default": ["-Wl,-z,muldefs"], 2407 }), 2408 visibility = [":friends"], 2409 deps = [ 2410 "//tensorflow/core:framework", 2411 "//tensorflow/core:lib", 2412 "//tensorflow/core/platform/default/build_config:cublas_plugin", 2413 "@local_config_cuda//cuda:cublas", 2414 "@local_config_cuda//cuda:cusolver", 2415 ], 2416 ) 2417 2418 LINALG_DEPS = [ 2419 ":linalg_ops_common", 2420 "//third_party/eigen3", 2421 "//tensorflow/core:framework", 2422 "//tensorflow/core:lib", 2423 "//tensorflow/core:linalg_ops_op_lib", 2424 ] + if_cuda([ 2425 ":cuda_solvers", 2426 ":transpose_functor", 2427 ]) 2428 2429 tf_kernel_library( 2430 name = "cholesky_op", 2431 prefix = "cholesky_op", 2432 deps = if_cuda([ 2433 ":matrix_band_part_op", 2434 ]) + LINALG_DEPS, 2435 ) 2436 2437 tf_kernel_library( 2438 name = "cholesky_grad", 2439 prefix = "cholesky_grad", 2440 deps = LINALG_DEPS, 2441 ) 2442 2443 tf_kernel_library( 2444 name = "determinant_op", 2445 prefix = "determinant_op", 2446 deps = if_cuda([ 2447 ":fill_functor", 2448 ]) + LINALG_DEPS, 2449 ) 2450 2451 tf_kernel_library( 2452 name = "matrix_exponential_op", 2453 prefix = "matrix_exponential_op", 2454 deps = LINALG_DEPS, 2455 ) 2456 2457 tf_kernel_library( 2458 name = "matrix_logarithm_op", 2459 prefix = "matrix_logarithm_op", 2460 deps = LINALG_DEPS, 2461 ) 2462 2463 tf_kernel_library( 2464 name = "self_adjoint_eig_op", 2465 prefix = "self_adjoint_eig_op", 2466 deps = LINALG_DEPS, 2467 ) 2468 2469 tf_kernel_library( 2470 name = "self_adjoint_eig_v2_op", 2471 prefix = "self_adjoint_eig_v2_op", 2472 deps = LINALG_DEPS + if_cuda([ 2473 ":cast_op", 2474 ":cwise_op", 2475 ]), 2476 ) 2477 2478 tf_kernel_library( 2479 name = "matrix_inverse_op", 2480 prefix = "matrix_inverse_op", 2481 deps = LINALG_DEPS + if_cuda([":eye_functor"]), 2482 ) 2483 2484 tf_kernel_library( 2485 name = "matrix_solve_ls_op", 2486 prefix = "matrix_solve_ls_op", 2487 deps = LINALG_DEPS, 2488 ) 2489 2490 tf_kernel_library( 2491 name = "matrix_solve_op", 2492 prefix = "matrix_solve_op", 2493 deps = LINALG_DEPS, 2494 ) 2495 2496 tf_kernel_library( 2497 name = "matrix_triangular_solve_op", 2498 prefix = "matrix_triangular_solve_op", 2499 deps = LINALG_DEPS + if_cuda([ 2500 "//tensorflow/core/platform/default/build_config:cublas_plugin", 2501 ]), 2502 ) 2503 2504 tf_kernel_library( 2505 name = "qr_op", 2506 prefix = "qr_op", 2507 deps = LINALG_DEPS + if_cuda([ 2508 ":cwise_op", 2509 ":eye_functor", 2510 ":matrix_band_part_op", 2511 ]), 2512 ) 2513 2514 tf_kernel_library( 2515 name = "svd_op", 2516 prefix = "svd_op", 2517 deps = LINALG_DEPS, 2518 ) 2519 2520 cc_library( 2521 name = "linalg_ops_common", 2522 srcs = ["linalg_ops_common.cc"], 2523 hdrs = ["linalg_ops_common.h"], 2524 visibility = ["//visibility:private"], 2525 deps = [ 2526 "//tensorflow/core:framework", 2527 "//tensorflow/core:lib", 2528 "//third_party/eigen3", 2529 ], 2530 ) 2531 2532 cc_library( 2533 name = "logging", 2534 deps = [ 2535 ":logging_ops", 2536 ":summary_audio_op", 2537 ":summary_image_op", 2538 ":summary_op", 2539 ":summary_tensor_op", 2540 ], 2541 ) 2542 2543 LOGGING_DEPS = [ 2544 "//tensorflow/core:framework", 2545 "//tensorflow/core:lib", 2546 "//tensorflow/core:lib_internal", 2547 "//tensorflow/core:logging_ops_op_lib", 2548 "//tensorflow/core:protos_all_cc", 2549 ] 2550 2551 tf_kernel_library( 2552 name = "logging_ops", 2553 prefix = "logging_ops", 2554 deps = LOGGING_DEPS, 2555 ) 2556 2557 tf_kernel_library( 2558 name = "summary_audio_op", 2559 prefix = "summary_audio_op", 2560 deps = LOGGING_DEPS, 2561 ) 2562 2563 tf_kernel_library( 2564 name = "summary_image_op", 2565 prefix = "summary_image_op", 2566 deps = LOGGING_DEPS, 2567 ) 2568 2569 tf_kernel_library( 2570 name = "summary_op", 2571 prefix = "summary_op", 2572 deps = LOGGING_DEPS, 2573 ) 2574 2575 tf_kernel_library( 2576 name = "summary_tensor_op", 2577 prefix = "summary_tensor_op", 2578 deps = LOGGING_DEPS, 2579 ) 2580 2581 tf_cc_tests( 2582 name = "bonus3_tests", 2583 size = "small", 2584 srcs = [ 2585 "logging_ops_test.cc", 2586 "summary_audio_op_test.cc", 2587 "summary_image_op_test.cc", 2588 "summary_op_test.cc", 2589 "summary_tensor_op_test.cc", 2590 ], 2591 deps = [ 2592 ":logging", 2593 ":ops_testutil", 2594 ":ops_util", 2595 "//tensorflow/core:framework", 2596 "//tensorflow/core:lib", 2597 "//tensorflow/core:protos_all_cc", 2598 "//tensorflow/core:test", 2599 "//tensorflow/core:test_main", 2600 "//tensorflow/core:testlib", 2601 ], 2602 ) 2603 2604 cc_library( 2605 name = "manip", 2606 deps = [ 2607 ":roll_op", 2608 ], 2609 ) 2610 2611 MANIP_DEPS = [ 2612 "//tensorflow/core:framework", 2613 "//tensorflow/core:lib", 2614 "//tensorflow/core:manip_ops_op_lib", 2615 "//third_party/eigen3", 2616 ] 2617 2618 tf_kernel_library( 2619 name = "roll_op", 2620 prefix = "roll_op", 2621 deps = MANIP_DEPS, 2622 ) 2623 2624 tf_cc_test( 2625 name = "roll_op_test", 2626 size = "small", 2627 srcs = ["roll_op_test.cc"], 2628 deps = [ 2629 ":ops_testutil", 2630 ":ops_util", 2631 ":roll_op", 2632 "//tensorflow/core:core_cpu", 2633 "//tensorflow/core:core_cpu_internal", 2634 "//tensorflow/core:framework", 2635 "//tensorflow/core:lib", 2636 "//tensorflow/core:protos_all_cc", 2637 "//tensorflow/core:test", 2638 "//tensorflow/core:test_main", 2639 "//tensorflow/core:testlib", 2640 ], 2641 ) 2642 2643 MATH_DEPS = [ 2644 ":bounds_check", 2645 ":fill_functor", 2646 "//tensorflow/core:core_cpu", 2647 "//tensorflow/core:framework", 2648 "//tensorflow/core:lib", 2649 "//tensorflow/core:lib_internal", 2650 "//tensorflow/core:math_grad", 2651 "//tensorflow/core:math_ops_op_lib", 2652 "//third_party/eigen3", 2653 ] 2654 2655 cc_library( 2656 name = "math_not_windows", 2657 deps = [ 2658 ":sparse_matmul_op", 2659 ], 2660 ) 2661 2662 tf_kernel_library( 2663 name = "sparse_matmul_op", 2664 defines = select({ 2665 ":xsmm": ["TENSORFLOW_USE_LIBXSMM"], 2666 "//conditions:default": [], 2667 }), 2668 prefix = "sparse_matmul_op", 2669 deps = MATH_DEPS + select({ 2670 ":xsmm": [ 2671 "@libxsmm_archive//:xsmm_avx", 2672 ], 2673 "//conditions:default": [], 2674 }), 2675 ) 2676 2677 cc_library( 2678 name = "math", 2679 deps = [ 2680 ":aggregate_ops", 2681 ":argmax_op", 2682 ":batch_matmul_op", 2683 ":betainc_op", 2684 ":bincount_op", 2685 ":bucketize_op", 2686 ":cast_op", 2687 ":check_numerics_op", 2688 ":compare_and_bitpack_op", 2689 ":cross_op", 2690 ":cwise_op", 2691 ":fft_ops", 2692 ":histogram_op", 2693 ":matmul_op", 2694 ":population_count_op", 2695 ":reduction_ops", 2696 ":scan_ops", 2697 ":segment_reduction_ops", 2698 ":sequence_ops", 2699 ], 2700 ) 2701 2702 tf_kernel_library( 2703 name = "aggregate_ops", 2704 prefix = "aggregate_ops", 2705 deps = MATH_DEPS, 2706 ) 2707 2708 tf_kernel_library( 2709 name = "argmax_op", 2710 prefix = "argmax_op", 2711 deps = MATH_DEPS, 2712 ) 2713 2714 tf_kernel_library( 2715 name = "batch_matmul_op", 2716 srcs = [] + if_mkl([ 2717 "mkl_batch_matmul_op.cc", 2718 ]), 2719 prefix = "batch_matmul_op", 2720 deps = MATH_DEPS + if_mkl([ 2721 "//third_party/mkl:intel_binary_blob", 2722 ]), 2723 ) 2724 2725 tf_kernel_library( 2726 name = "betainc_op", 2727 prefix = "betainc_op", 2728 deps = MATH_DEPS, 2729 ) 2730 2731 tf_kernel_library( 2732 name = "bucketize_op", 2733 gpu_srcs = ["cuda_device_array.h"], 2734 prefix = "bucketize_op", 2735 deps = ARRAY_DEPS, 2736 ) 2737 2738 tf_kernel_library( 2739 name = "cast_op", 2740 prefix = "cast_op", 2741 deps = MATH_DEPS, 2742 ) 2743 2744 tf_kernel_library( 2745 name = "check_numerics_op", 2746 prefix = "check_numerics_op", 2747 deps = MATH_DEPS, 2748 ) 2749 2750 tf_kernel_library( 2751 name = "cross_op", 2752 prefix = "cross_op", 2753 deps = MATH_DEPS, 2754 ) 2755 2756 tf_kernel_library( 2757 name = "cwise_op", 2758 prefix = "cwise_op", 2759 deps = MATH_DEPS + ["//tensorflow/core:bitwise_ops_op_lib"], 2760 ) 2761 2762 tf_kernel_library( 2763 name = "population_count_op", 2764 prefix = "population_count_op", 2765 deps = MATH_DEPS, 2766 ) 2767 2768 tf_kernel_library( 2769 name = "fft_ops", 2770 prefix = "fft_ops", 2771 deps = MATH_DEPS + [ 2772 "//tensorflow/core:spectral_ops_op_lib", 2773 ] + if_cuda([ 2774 "//tensorflow/core/platform/default/build_config:cufft_plugin", 2775 ]), 2776 ) 2777 2778 tf_kernel_library( 2779 name = "matmul_op", 2780 srcs = [ 2781 "matmul_op.cc", 2782 ] + if_mkl([ 2783 "mkl_matmul_op.cc", 2784 ]), 2785 hdrs = ["matmul_op.h"], 2786 defines = select({ 2787 ":xsmm": [ 2788 "TENSORFLOW_USE_LIBXSMM", 2789 "EIGEN_USE_LIBXSMM", 2790 ], 2791 "//conditions:default": [], 2792 }), 2793 deps = MATH_DEPS + [ 2794 ":gpu_util_hdrs", 2795 ] + select({ 2796 ":xsmm": [ 2797 "@libxsmm_archive//:xsmm_avx", 2798 ], 2799 "//conditions:default": [], 2800 }) + if_mkl([ 2801 "//third_party/mkl:intel_binary_blob", 2802 "@mkl_dnn//:mkl_dnn", 2803 ]) + if_cuda([ 2804 "//tensorflow/core/platform/default/build_config:cublas_plugin", 2805 ]), 2806 ) 2807 2808 tf_kernel_library( 2809 name = "reduction_ops", 2810 gpu_srcs = ["reduction_gpu_kernels.cu.h"], 2811 prefix = "reduction_ops", 2812 deps = MATH_DEPS + [":transpose_functor"] + if_cuda(["@cub_archive//:cub"]), 2813 ) 2814 2815 tf_kernel_library( 2816 name = "segment_reduction_ops", 2817 prefix = "segment_reduction_ops", 2818 deps = MATH_DEPS + if_cuda([ 2819 ":cuda_solvers", 2820 ]), 2821 ) 2822 2823 tf_kernel_library( 2824 name = "scan_ops", 2825 prefix = "scan_ops", 2826 deps = MATH_DEPS, 2827 ) 2828 2829 tf_kernel_library( 2830 name = "sequence_ops", 2831 prefix = "sequence_ops", 2832 deps = MATH_DEPS, 2833 ) 2834 2835 tf_cc_test( 2836 name = "sequence_ops_test", 2837 size = "small", 2838 srcs = ["sequence_ops_test.cc"], 2839 deps = [ 2840 ":ops_testutil", 2841 ":ops_util", 2842 ":sequence_ops", 2843 "//tensorflow/core:core_cpu", 2844 "//tensorflow/core:framework", 2845 "//tensorflow/core:lib", 2846 "//tensorflow/core:protos_all_cc", 2847 "//tensorflow/core:test", 2848 "//tensorflow/core:test_main", 2849 "//tensorflow/core:testlib", 2850 ], 2851 ) 2852 2853 tf_cuda_cc_test( 2854 name = "cast_op_test", 2855 size = "small", 2856 srcs = ["cast_op_test.cc"], 2857 deps = [ 2858 ":cast_op", 2859 ":ops_testutil", 2860 ":ops_util", 2861 "//tensorflow/core:core_cpu", 2862 "//tensorflow/core:framework", 2863 "//tensorflow/core:lib", 2864 "//tensorflow/core:protos_all_cc", 2865 "//tensorflow/core:test", 2866 "//tensorflow/core:test_main", 2867 "//tensorflow/core:testlib", 2868 ], 2869 ) 2870 2871 tf_cc_test( 2872 name = "cross_op_test", 2873 size = "small", 2874 srcs = ["cross_op_test.cc"], 2875 deps = [ 2876 ":cross_op", 2877 ":ops_testutil", 2878 ":ops_util", 2879 "//tensorflow/core:core_cpu", 2880 "//tensorflow/core:framework", 2881 "//tensorflow/core:lib", 2882 "//tensorflow/core:protos_all_cc", 2883 "//tensorflow/core:test", 2884 "//tensorflow/core:test_main", 2885 "//tensorflow/core:testlib", 2886 ], 2887 ) 2888 2889 tf_cc_tests( 2890 name = "sparse_tests", 2891 size = "small", 2892 srcs = [ 2893 "sparse_add_op_test.cc", 2894 "sparse_dense_binary_op_shared_test.cc", 2895 "sparse_reduce_sum_op_test.cc", 2896 ], 2897 deps = [ 2898 ":ops_testutil", 2899 ":ops_util", 2900 ":sparse_add_op", 2901 ":sparse_dense_binary_op_shared", 2902 ":sparse_reduce_op", 2903 "//tensorflow/core:core_cpu", 2904 "//tensorflow/core:framework", 2905 "//tensorflow/core:lib", 2906 "//tensorflow/core:protos_all_cc", 2907 "//tensorflow/core:test", 2908 "//tensorflow/core:test_main", 2909 "//tensorflow/core:testlib", 2910 ], 2911 ) 2912 2913 tf_cuda_cc_test( 2914 name = "cwise_ops_test", 2915 size = "small", 2916 srcs = ["cwise_ops_test.cc"], 2917 deps = [ 2918 ":bounds_check", 2919 ":cwise_op", 2920 ":nn", 2921 ":ops_testutil", 2922 ":ops_util", 2923 "//tensorflow/core:core_cpu", 2924 "//tensorflow/core:framework", 2925 "//tensorflow/core:lib", 2926 "//tensorflow/core:protos_all_cc", 2927 "//tensorflow/core:test", 2928 "//tensorflow/core:test_main", 2929 "//tensorflow/core:testlib", 2930 ], 2931 ) 2932 2933 tf_cuda_cc_test( 2934 name = "matmul_op_test", 2935 size = "small", 2936 srcs = ["matmul_op_test.cc"], 2937 deps = [ 2938 ":matmul_op", 2939 ":ops_testutil", 2940 ":ops_util", 2941 ":quantized_ops", 2942 "//tensorflow/cc:cc_ops", 2943 "//tensorflow/cc:client_session", 2944 "//tensorflow/core:array_ops_op_lib", 2945 "//tensorflow/core:framework", 2946 "//tensorflow/core:math_ops_op_lib", 2947 "//tensorflow/core:nn_ops_op_lib", 2948 "//tensorflow/core:protos_all_cc", 2949 "//tensorflow/core:test", 2950 "//tensorflow/core:test_main", 2951 "//tensorflow/core:testlib", 2952 ], 2953 ) 2954 2955 tf_cuda_cc_test( 2956 name = "batch_matmul_op_test", 2957 size = "small", 2958 srcs = ["batch_matmul_op_test.cc"], 2959 deps = [ 2960 ":batch_matmul_op", 2961 ":ops_testutil", 2962 ":ops_util", 2963 "//tensorflow/core:core_cpu", 2964 "//tensorflow/core:framework", 2965 "//tensorflow/core:lib", 2966 "//tensorflow/core:protos_all_cc", 2967 "//tensorflow/core:test", 2968 "//tensorflow/core:test_main", 2969 "//tensorflow/core:testlib", 2970 ], 2971 ) 2972 2973 tf_cuda_cc_test( 2974 name = "reduction_ops_test", 2975 size = "small", 2976 srcs = ["reduction_ops_test.cc"], 2977 linkopts = select({ 2978 "//tensorflow:darwin": ["-headerpad_max_install_names"], 2979 "//conditions:default": [], 2980 }), 2981 deps = [ 2982 ":ops_testutil", 2983 ":ops_util", 2984 ":reduction_ops", 2985 "//tensorflow/core:core_cpu", 2986 "//tensorflow/core:framework", 2987 "//tensorflow/core:lib", 2988 "//tensorflow/core:protos_all_cc", 2989 "//tensorflow/core:test", 2990 "//tensorflow/core:test_main", 2991 "//tensorflow/core:testlib", 2992 ], 2993 ) 2994 2995 tf_cc_test( 2996 name = "segment_reduction_ops_test", 2997 size = "small", 2998 srcs = ["segment_reduction_ops_test.cc"], 2999 deps = [ 3000 ":ops_testutil", 3001 ":ops_util", 3002 ":segment_reduction_ops", 3003 "//tensorflow/core:core_cpu", 3004 "//tensorflow/core:core_cpu_internal", 3005 "//tensorflow/core:framework", 3006 "//tensorflow/core:lib", 3007 "//tensorflow/core:protos_all_cc", 3008 "//tensorflow/core:test", 3009 "//tensorflow/core:test_main", 3010 "//tensorflow/core:testlib", 3011 ], 3012 ) 3013 3014 tf_cc_test( 3015 name = "immutable_constant_op_test", 3016 srcs = ["immutable_constant_op_test.cc"], 3017 deps = [ 3018 ":array", 3019 ":immutable_constant_op", 3020 ":matmul_op", 3021 ":ops_testutil", 3022 ":ops_util", 3023 ":random_shuffle_op", 3024 "//tensorflow/cc:cc_ops", 3025 "//tensorflow/core:core_cpu", 3026 "//tensorflow/core:direct_session", 3027 "//tensorflow/core:framework", 3028 "//tensorflow/core:lib", 3029 "//tensorflow/core:ops", 3030 "//tensorflow/core:test", 3031 "//tensorflow/core:test_main", 3032 "//tensorflow/core:testlib", 3033 ], 3034 ) 3035 3036 tf_cc_test( 3037 name = "shape_op_test", 3038 srcs = ["shape_op_test.cc"], 3039 deps = [ 3040 ":array", 3041 ":ops_testutil", 3042 ":ops_util", 3043 "//tensorflow/cc:cc_ops", 3044 "//tensorflow/cc:client_session", 3045 "//tensorflow/core:core_cpu", 3046 "//tensorflow/core:direct_session", 3047 "//tensorflow/core:framework", 3048 "//tensorflow/core:lib", 3049 "//tensorflow/core:ops", 3050 "//tensorflow/core:protos_all_cc", 3051 "//tensorflow/core:test", 3052 "//tensorflow/core:test_main", 3053 "//tensorflow/core:testlib", 3054 ], 3055 ) 3056 3057 tf_cuda_cc_test( 3058 name = "sparse_matmul_op_test", 3059 size = "small", 3060 srcs = ["sparse_matmul_op_test.cc"], 3061 deps = [ 3062 ":ops_testutil", 3063 ":ops_util", 3064 ":sparse_matmul_op", 3065 "//tensorflow/core:core_cpu", 3066 "//tensorflow/core:framework", 3067 "//tensorflow/core:lib", 3068 "//tensorflow/core:protos_all_cc", 3069 "//tensorflow/core:test", 3070 "//tensorflow/core:test_main", 3071 "//tensorflow/core:testlib", 3072 ], 3073 ) 3074 3075 tf_cuda_cc_test( 3076 name = "split_op_test", 3077 size = "small", 3078 srcs = ["split_op_test.cc"], 3079 deps = [ 3080 ":ops_testutil", 3081 ":ops_util", 3082 ":split_op", 3083 "//tensorflow/core:core_cpu", 3084 "//tensorflow/core:framework", 3085 "//tensorflow/core:lib", 3086 "//tensorflow/core:protos_all_cc", 3087 "//tensorflow/core:test", 3088 "//tensorflow/core:test_main", 3089 "//tensorflow/core:testlib", 3090 ], 3091 ) 3092 3093 tf_cuda_cc_test( 3094 name = "split_v_op_test", 3095 size = "small", 3096 srcs = ["split_v_op_test.cc"], 3097 deps = [ 3098 ":ops_testutil", 3099 ":ops_util", 3100 ":split_v_op", 3101 "//tensorflow/core:core_cpu", 3102 "//tensorflow/core:framework", 3103 "//tensorflow/core:lib", 3104 "//tensorflow/core:protos_all_cc", 3105 "//tensorflow/core:test", 3106 "//tensorflow/core:test_main", 3107 "//tensorflow/core:testlib", 3108 ], 3109 ) 3110 3111 tf_cuda_cc_test( 3112 name = "diag_op_test", 3113 size = "small", 3114 srcs = ["diag_op_test.cc"], 3115 deps = [ 3116 ":diag_op", 3117 ":ops_testutil", 3118 ":ops_util", 3119 "//tensorflow/core:core_cpu", 3120 "//tensorflow/core:framework", 3121 "//tensorflow/core:lib", 3122 "//tensorflow/core:protos_all_cc", 3123 "//tensorflow/core:test", 3124 "//tensorflow/core:test_main", 3125 "//tensorflow/core:testlib", 3126 ], 3127 ) 3128 3129 # conv_grad_ops currently has to be built with conv_ops*. 3130 # TODO(josh11b, zhengxq): put these a separate libraries in ":nn" below once 3131 # conv_ops_gpu.h has be separated into its own library. 3132 tf_kernel_library( 3133 name = "conv_ops", 3134 srcs = [ 3135 "conv_grad_filter_ops.cc", 3136 "conv_grad_input_ops.cc", 3137 "conv_grad_ops.cc", 3138 "conv_grad_ops_3d.cc", 3139 "deep_conv2d.cc", 3140 ] + select({ 3141 ":xsmm": ["xsmm_conv2d.cc"], 3142 "//conditions:default": [], 3143 }), 3144 hdrs = [ 3145 "fill_functor.h", 3146 "conv_grad_ops.h", 3147 "deep_conv2d.h", 3148 "gemm_functors.h", 3149 "winograd_transform.h", 3150 ] + select({ 3151 ":xsmm": ["xsmm_conv2d.h"], 3152 "//conditions:default": [], 3153 }), 3154 # Override EIGEN_STRONG_INLINE to inline when --define=override_eigen_strong_inline=true, 3155 # So that it doesn't take 20 minutes to compile conv_grad_ops_3d.cc and conv_ops_3d.cc 3156 # on Windows. See https://github.com/tensorflow/tensorflow/issues/10521 3157 copts = if_override_eigen_strong_inline(["/DEIGEN_STRONG_INLINE=inline"]), 3158 defines = select({ 3159 ":xsmm": [ 3160 "TENSORFLOW_USE_LIBXSMM", 3161 "EIGEN_USE_LIBXSMM", 3162 ], 3163 "//conditions:default": [], 3164 }) + select({ 3165 ":xsmm_backward": ["TENSORFLOW_USE_LIBXSMM_BACKWARD"], 3166 "//conditions:default": [], 3167 }), 3168 prefix = "conv_ops", 3169 deps = [ 3170 ":bounds_check", 3171 ":conv_2d", 3172 ":conv_3d", 3173 ":image_resizer_state", 3174 ":fill_functor", 3175 ":ops_util", 3176 "//tensorflow/core:core_cpu", 3177 "//tensorflow/core:framework", 3178 "//tensorflow/core:lib", 3179 "//tensorflow/core:lib_internal", 3180 "//tensorflow/core:nn_ops_op_lib", 3181 ] + select({ 3182 ":xsmm": [ 3183 "@libxsmm_archive//:xsmm_avx", 3184 ], 3185 "//conditions:default": [], 3186 }) + if_cuda([ 3187 "//tensorflow/core/platform/default/build_config:cublas_plugin", 3188 "//tensorflow/core/platform/default/build_config:cudnn_plugin", 3189 ]), 3190 ) 3191 3192 tf_kernel_library( 3193 name = "depthwise_conv_op", 3194 prefix = "depthwise_conv_op", 3195 deps = [ 3196 ":bounds_check", 3197 ":conv_ops", 3198 ":ops_util", 3199 "//tensorflow/core:core_cpu", 3200 "//tensorflow/core:framework", 3201 "//tensorflow/core:lib", 3202 "//tensorflow/core:nn_ops_op_lib", 3203 ] + if_cuda(["@cub_archive//:cub"]), 3204 ) 3205 3206 tf_kernel_library( 3207 name = "depthwise_conv_grad_op", 3208 hdrs = [ 3209 "depthwise_conv_op.h", 3210 ], 3211 prefix = "depthwise_conv_grad_op", 3212 deps = [ 3213 ":bounds_check", 3214 ":ops_util", 3215 "//tensorflow/core:core_cpu", 3216 "//tensorflow/core:framework", 3217 "//tensorflow/core:lib", 3218 "//tensorflow/core:nn_ops_op_lib", 3219 ], 3220 ) 3221 3222 cc_library( 3223 name = "nn", 3224 deps = [ 3225 ":batch_norm_op", 3226 ":bias_op", 3227 ":conv_ops", 3228 ":data_format_ops", 3229 ":depthwise_conv_grad_op", 3230 ":depthwise_conv_op", 3231 ":dilation_ops", 3232 ":fused_batch_norm_op", 3233 ":in_topk_op", 3234 ":l2loss_op", 3235 ":lrn_op", 3236 ":nth_element_op", 3237 ":relu_op", 3238 ":softmax_op", 3239 ":softplus_op", 3240 ":softsign_op", 3241 ":topk_op", 3242 ":xent_op", 3243 ], 3244 ) 3245 3246 NN_DEPS = [ 3247 ":bounds_check", 3248 ":conv_2d", 3249 ":fused_batch_norm_util_gpu", 3250 ":ops_util", 3251 ":pooling_ops", 3252 "//tensorflow/core:framework", 3253 "//tensorflow/core:lib", 3254 "//tensorflow/core:lib_internal", 3255 "//tensorflow/core:nn_grad", 3256 "//tensorflow/core:nn_ops_op_lib", 3257 "//third_party/eigen3", 3258 ] 3259 3260 tf_kernel_library( 3261 name = "batch_norm_op", 3262 prefix = "batch_norm_op", 3263 deps = NN_DEPS, 3264 ) 3265 3266 tf_kernel_library( 3267 name = "data_format_ops", 3268 prefix = "data_format_ops", 3269 deps = NN_DEPS, 3270 ) 3271 3272 tf_kernel_library( 3273 name = "bias_op", 3274 prefix = "bias_op", 3275 deps = NN_DEPS, 3276 ) 3277 3278 tf_kernel_library( 3279 name = "fused_batch_norm_op", 3280 prefix = "fused_batch_norm_op", 3281 deps = NN_DEPS + [ 3282 ":fill_functor", 3283 ], 3284 ) 3285 3286 tf_kernel_library( 3287 name = "in_topk_op", 3288 prefix = "in_topk_op", 3289 deps = NN_DEPS, 3290 ) 3291 3292 tf_kernel_library( 3293 name = "lrn_op", 3294 prefix = "lrn_op", 3295 deps = NN_DEPS, 3296 ) 3297 3298 tf_kernel_library( 3299 name = "relu_op", 3300 prefix = "relu_op", 3301 deps = NN_DEPS, 3302 ) 3303 3304 tf_kernel_library( 3305 name = "softmax_op", 3306 prefix = "softmax_op", 3307 deps = NN_DEPS + if_cuda([ 3308 ":reduction_ops", 3309 "@cub_archive//:cub", 3310 ]), 3311 ) 3312 3313 tf_kernel_library( 3314 name = "softplus_op", 3315 prefix = "softplus_op", 3316 deps = NN_DEPS + [":warn_about_ints"], 3317 ) 3318 3319 tf_kernel_library( 3320 name = "softsign_op", 3321 prefix = "softsign_op", 3322 deps = NN_DEPS + [":warn_about_ints"], 3323 ) 3324 3325 tf_kernel_library( 3326 name = "topk_op", 3327 prefix = "topk_op", 3328 deps = NN_DEPS + if_cuda(["@cub_archive//:cub"]), 3329 ) 3330 3331 tf_kernel_library( 3332 name = "nth_element_op", 3333 prefix = "nth_element_op", 3334 deps = NN_DEPS, 3335 ) 3336 3337 tf_kernel_library( 3338 name = "xent_op", 3339 prefix = "xent_op", 3340 deps = NN_DEPS, 3341 ) 3342 3343 tf_kernel_library( 3344 name = "bincount_op", 3345 prefix = "bincount_op", 3346 deps = [ 3347 "//tensorflow/core:framework", 3348 "//tensorflow/core:lib", 3349 "//tensorflow/core:lib_internal", 3350 "//third_party/eigen3", 3351 ] + if_cuda(["@cub_archive//:cub"]), 3352 ) 3353 3354 tf_kernel_library( 3355 name = "histogram_op", 3356 prefix = "histogram_op", 3357 deps = [ 3358 "//tensorflow/core:framework", 3359 "//tensorflow/core:lib", 3360 "//tensorflow/core:lib_internal", 3361 "//third_party/eigen3", 3362 ] + if_cuda(["@cub_archive//:cub"]), 3363 ) 3364 3365 tf_kernel_library( 3366 name = "l2loss_op", 3367 prefix = "l2loss_op", 3368 deps = [ 3369 ":reduction_ops", 3370 "//third_party/eigen3", 3371 "//tensorflow/core:framework", 3372 "//tensorflow/core:lib", 3373 "//tensorflow/core:lib_internal", 3374 "//tensorflow/core:nn_grad", 3375 "//tensorflow/core:nn_ops_op_lib", 3376 ] + if_cuda(["@cub_archive//:cub"]), 3377 ) 3378 3379 tf_cuda_cc_test( 3380 name = "lrn_op_test", 3381 srcs = ["lrn_op_test.cc"], 3382 deps = [ 3383 ":nn", 3384 ":ops_testutil", 3385 ":ops_util", 3386 ":xent_op", 3387 "//tensorflow/cc:cc_ops", 3388 "//tensorflow/core:core_cpu", 3389 "//tensorflow/core:core_cpu_internal", 3390 "//tensorflow/core:framework", 3391 "//tensorflow/core:lib", 3392 "//tensorflow/core:protos_all_cc", 3393 "//tensorflow/core:test", 3394 "//tensorflow/core:test_main", 3395 "//tensorflow/core:testlib", 3396 ], 3397 ) 3398 3399 tf_cuda_cc_test( 3400 name = "xent_op_test", 3401 srcs = ["xent_op_test.cc"], 3402 deps = [ 3403 ":nn", 3404 ":ops_testutil", 3405 ":ops_util", 3406 ":xent_op", 3407 "//tensorflow/cc:cc_ops", 3408 "//tensorflow/core:core_cpu", 3409 "//tensorflow/core:core_cpu_internal", 3410 "//tensorflow/core:framework", 3411 "//tensorflow/core:lib", 3412 "//tensorflow/core:protos_all_cc", 3413 "//tensorflow/core:test", 3414 "//tensorflow/core:test_main", 3415 "//tensorflow/core:testlib", 3416 ], 3417 ) 3418 3419 tf_cuda_cc_test( 3420 name = "nn_ops_test", 3421 srcs = ["nn_ops_test.cc"], 3422 deps = [ 3423 ":nn", 3424 ":ops_testutil", 3425 ":ops_util", 3426 "//tensorflow/cc:cc_ops", 3427 "//tensorflow/cc:cc_ops_internal", 3428 "//tensorflow/core:core_cpu", 3429 "//tensorflow/core:core_cpu_internal", 3430 "//tensorflow/core:framework", 3431 "//tensorflow/core:lib", 3432 "//tensorflow/core:protos_all_cc", 3433 "//tensorflow/core:test", 3434 "//tensorflow/core:test_main", 3435 "//tensorflow/core:testlib", 3436 "//third_party/eigen3", 3437 ], 3438 ) 3439 3440 tf_kernel_library( 3441 name = "pooling_ops", 3442 srcs = [ 3443 "avgpooling_op.cc", 3444 "cudnn_pooling_gpu.cc", 3445 "fractional_avg_pool_op.cc", 3446 "fractional_max_pool_op.cc", 3447 "fractional_pool_common.cc", 3448 "maxpooling_op.cc", 3449 "pooling_ops_3d.cc", 3450 "pooling_ops_common.cc", 3451 ], 3452 hdrs = [ 3453 "avgpooling_op.h", 3454 "cudnn_pooling_gpu.h", 3455 "fractional_pool_common.h", 3456 "maxpooling_op.h", 3457 "pooling_ops_3d.h", 3458 "pooling_ops_common.h", 3459 ] + if_sycl(["pooling_ops_3d_sycl.h"]), 3460 gpu_srcs = [ 3461 "avgpooling_op.h", 3462 "avgpooling_op_gpu.cu.cc", 3463 "maxpooling_op.h", 3464 "maxpooling_op_gpu.cu.cc", 3465 "maxpooling_op_gpu.h", 3466 "pooling_ops_common.h", 3467 "pooling_ops_common_gpu.h", 3468 "pooling_ops_3d_gpu.h", 3469 "pooling_ops_3d_gpu.cu.cc", 3470 ], 3471 deps = [ 3472 ":conv_2d", 3473 ":conv_3d", 3474 ":conv_ops", 3475 ":eigen_helpers", 3476 ":ops_util", 3477 "//tensorflow/core:core_cpu", 3478 "//tensorflow/core:framework", 3479 "//tensorflow/core:lib", 3480 "//tensorflow/core:lib_internal", 3481 "//tensorflow/core:nn_ops_op_lib", 3482 "//third_party/eigen3", 3483 ], 3484 ) 3485 3486 tf_kernel_library( 3487 name = "fake_quant_ops", 3488 srcs = ["fake_quant_ops.cc"], 3489 hdrs = ["fake_quant_ops_functor.h"], 3490 gpu_srcs = [ 3491 "fake_quant_ops_gpu.cu.cc", 3492 "fake_quant_ops_functor.h", 3493 ], 3494 deps = [ 3495 "//tensorflow/core:framework", 3496 "//tensorflow/core:lib", 3497 "//third_party/eigen3", 3498 ], 3499 alwayslink = 1, 3500 ) 3501 3502 tf_kernel_library( 3503 name = "fused_batch_norm_util", 3504 gpu_srcs = [ 3505 "fused_batch_norm_op.h", 3506 "fused_batch_norm_op.cu.cc", 3507 ], 3508 deps = [ 3509 "//tensorflow/core:framework", 3510 "//tensorflow/core:lib", 3511 "//third_party/eigen3", 3512 ], 3513 ) 3514 3515 cc_library( 3516 name = "pooling_ops_hdrs", 3517 hdrs = [ 3518 "avgpooling_op.h", 3519 "maxpooling_op.h", 3520 "pooling_ops_common.h", 3521 ], 3522 deps = [ 3523 ":eigen_helpers", 3524 ":ops_util_hdrs", 3525 "//third_party/eigen3", 3526 ], 3527 ) 3528 3529 tf_kernel_library( 3530 name = "dilation_ops", 3531 prefix = "dilation_ops", 3532 deps = [ 3533 ":ops_util", 3534 "//tensorflow/core:core_cpu", 3535 "//tensorflow/core:framework", 3536 "//tensorflow/core:lib", 3537 "//tensorflow/core:nn_ops_op_lib", 3538 "//third_party/eigen3", 3539 ], 3540 ) 3541 3542 tf_kernel_library( 3543 name = "batch_space_ops", 3544 srcs = [ 3545 "batchtospace_op.cc", 3546 "spacetobatch_functor.cc", 3547 "spacetobatch_functor.h", 3548 "spacetobatch_op.cc", 3549 ], 3550 gpu_srcs = [ 3551 "spacetobatch_functor.h", 3552 "spacetobatch_functor_gpu.cu.cc", 3553 ], 3554 visibility = ["//visibility:private"], 3555 deps = [ 3556 ":bounds_check", 3557 "//tensorflow/core:framework", 3558 "//tensorflow/core:lib", 3559 "//third_party/eigen3", 3560 ], 3561 ) 3562 3563 tf_cuda_cc_test( 3564 name = "spacetobatch_benchmark_test", 3565 srcs = ["spacetobatch_benchmark_test.cc"], 3566 deps = [ 3567 ":batch_space_ops", 3568 ":ops_testutil", 3569 ":ops_util", 3570 "//tensorflow/core:core_cpu", 3571 "//tensorflow/core:framework", 3572 "//tensorflow/core:protos_all_cc", 3573 "//tensorflow/core:test", 3574 "//tensorflow/core:test_main", 3575 "//tensorflow/core:testlib", 3576 ], 3577 ) 3578 3579 tf_kernel_library( 3580 name = "depth_space_ops", 3581 srcs = [ 3582 "depthtospace_op.cc", 3583 "spacetodepth_op.cc", 3584 ], 3585 hdrs = [ 3586 "depthtospace_op.h", 3587 "spacetodepth_op.h", 3588 ], 3589 gpu_srcs = [ 3590 "depthtospace_op.h", 3591 "depthtospace_op_gpu.cu.cc", 3592 "spacetodepth_op.h", 3593 "spacetodepth_op_gpu.cu.cc", 3594 ], 3595 visibility = ["//visibility:private"], 3596 deps = [ 3597 "//tensorflow/core:framework", 3598 "//tensorflow/core:lib", 3599 "//third_party/eigen3", 3600 ], 3601 ) 3602 3603 cc_library( 3604 name = "parsing", 3605 deps = [ 3606 ":decode_compressed_op", 3607 ":decode_csv_op", 3608 ":decode_raw_op", 3609 ":example_parsing_ops", 3610 ":parse_tensor_op", 3611 ":string_to_number_op", 3612 ], 3613 ) 3614 3615 PARSING_DEPS = [ 3616 "//tensorflow/core:framework", 3617 "//tensorflow/core:lib", 3618 "//tensorflow/core:parsing_ops_op_lib", 3619 "//tensorflow/core:proto_text", 3620 "//tensorflow/core:protos_all_cc", 3621 ] 3622 3623 tf_kernel_library( 3624 name = "decode_csv_op", 3625 prefix = "decode_csv_op", 3626 deps = PARSING_DEPS, 3627 ) 3628 3629 tf_kernel_library( 3630 name = "decode_raw_op", 3631 prefix = "decode_raw_op", 3632 deps = PARSING_DEPS, 3633 ) 3634 3635 tf_kernel_library( 3636 name = "decode_compressed_op", 3637 prefix = "decode_compressed_op", 3638 deps = [ 3639 "//tensorflow/core:lib_internal", 3640 ] + PARSING_DEPS, 3641 ) 3642 3643 tf_kernel_library( 3644 name = "example_parsing_ops", 3645 prefix = "example_parsing_ops", 3646 deps = PARSING_DEPS, 3647 ) 3648 3649 tf_kernel_library( 3650 name = "parse_tensor_op", 3651 prefix = "parse_tensor_op", 3652 deps = PARSING_DEPS, 3653 ) 3654 3655 tf_cc_test( 3656 name = "parse_tensor_test", 3657 srcs = ["parse_tensor_test.cc"], 3658 deps = [ 3659 ":ops_testutil", 3660 ":parse_tensor_op", 3661 "//tensorflow/core:core_cpu_internal", 3662 "//tensorflow/core:framework", 3663 "//tensorflow/core:test_main", 3664 "//tensorflow/core:testlib", 3665 ], 3666 ) 3667 3668 tf_kernel_library( 3669 name = "string_to_number_op", 3670 prefix = "string_to_number_op", 3671 deps = PARSING_DEPS, 3672 ) 3673 3674 cc_library( 3675 name = "random_ops", 3676 deps = [ 3677 ":random_op", 3678 ":random_shuffle_op", 3679 ], 3680 ) 3681 3682 RANDOM_OPS_DEPS = [ 3683 "//tensorflow/core:core_cpu", 3684 "//tensorflow/core:framework", 3685 "//tensorflow/core:lib", 3686 "//tensorflow/core:lib_internal", 3687 "//tensorflow/core:random_ops_op_lib", 3688 ] 3689 3690 tf_kernel_library( 3691 name = "random_op", 3692 prefix = "random_op", 3693 deps = RANDOM_OPS_DEPS, 3694 ) 3695 3696 tf_kernel_library( 3697 name = "random_shuffle_op", 3698 prefix = "random_shuffle_op", 3699 deps = RANDOM_OPS_DEPS, 3700 ) 3701 3702 tf_cuda_cc_test( 3703 name = "random_op_test", 3704 size = "small", 3705 srcs = ["random_op_test.cc"], 3706 deps = [ 3707 ":random_ops", 3708 "//tensorflow/core:core_cpu", 3709 "//tensorflow/core:framework", 3710 "//tensorflow/core:lib", 3711 "//tensorflow/core:test", 3712 "//tensorflow/core:test_main", 3713 "//tensorflow/core:testlib", 3714 ], 3715 ) 3716 3717 tf_kernel_library( 3718 name = "stateless_random_ops", 3719 prefix = "stateless_random_ops", 3720 deps = [ 3721 ":bounds_check", 3722 ":random_op", 3723 "//tensorflow/core:framework", 3724 "//tensorflow/core:lib", 3725 "//tensorflow/core:stateless_random_ops_op_lib", 3726 ], 3727 ) 3728 3729 cc_library( 3730 name = "required", 3731 deps = [ 3732 ":no_op", 3733 ":sendrecv_ops", 3734 ], 3735 ) 3736 3737 REQUIRED_DEPS = [ 3738 "//tensorflow/core:framework", 3739 "//tensorflow/core:lib", 3740 "//tensorflow/core:no_op_op_lib", 3741 "//tensorflow/core:sendrecv_ops_op_lib", 3742 ] 3743 3744 tf_kernel_library( 3745 name = "no_op", 3746 prefix = "no_op", 3747 deps = REQUIRED_DEPS, 3748 ) 3749 3750 tf_kernel_library( 3751 name = "sendrecv_ops", 3752 prefix = "sendrecv_ops", 3753 deps = REQUIRED_DEPS, 3754 ) 3755 3756 tf_cc_test( 3757 name = "sendrecv_ops_test", 3758 srcs = ["sendrecv_ops_test.cc"], 3759 linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking 3760 deps = [ 3761 ":ops_testutil", 3762 ":ops_util", 3763 ":sendrecv_ops", 3764 "//tensorflow/core:framework", 3765 "//tensorflow/core:test", 3766 "//tensorflow/core:test_main", 3767 "//tensorflow/core:testlib", 3768 ], 3769 ) 3770 3771 cc_library( 3772 name = "sparse", 3773 deps = [ 3774 ":serialize_sparse_op", 3775 ":sparse_add_grad_op", 3776 ":sparse_add_op", 3777 ":sparse_concat_op", 3778 ":sparse_cross_op", 3779 ":sparse_dense_binary_op_shared", 3780 ":sparse_fill_empty_rows_op", 3781 ":sparse_reduce_op", 3782 ":sparse_reorder_op", 3783 ":sparse_reshape_op", 3784 ":sparse_slice_op", 3785 ":sparse_softmax", 3786 ":sparse_sparse_binary_op_shared", 3787 ":sparse_split_op", 3788 ":sparse_tensor_dense_add_op", 3789 ":sparse_tensor_dense_matmul_op", 3790 ":sparse_tensors_map_ops", 3791 ":sparse_to_dense_op", 3792 ":sparse_xent_op", 3793 ], 3794 ) 3795 3796 SPARSE_DEPS = [ 3797 ":bounds_check", 3798 ":cwise_op", 3799 ":fill_functor", 3800 ":scatter_functor", 3801 "//third_party/eigen3", 3802 "//tensorflow/core:framework", 3803 "//tensorflow/core:lib", 3804 "//tensorflow/core:sparse_ops_op_lib", 3805 ] 3806 3807 tf_kernel_library( 3808 name = "sparse_add_grad_op", 3809 prefix = "sparse_add_grad_op", 3810 deps = SPARSE_DEPS, 3811 ) 3812 3813 tf_kernel_library( 3814 name = "sparse_add_op", 3815 prefix = "sparse_add_op", 3816 deps = SPARSE_DEPS, 3817 ) 3818 3819 tf_kernel_library( 3820 name = "sparse_concat_op", 3821 prefix = "sparse_concat_op", 3822 deps = SPARSE_DEPS, 3823 ) 3824 3825 tf_kernel_library( 3826 name = "sparse_fill_empty_rows_op", 3827 prefix = "sparse_fill_empty_rows_op", 3828 deps = SPARSE_DEPS, 3829 ) 3830 3831 tf_kernel_library( 3832 name = "sparse_cross_op", 3833 prefix = "sparse_cross_op", 3834 deps = SPARSE_DEPS, 3835 ) 3836 3837 tf_kernel_library( 3838 name = "sparse_reduce_op", 3839 prefix = "sparse_reduce_op", 3840 deps = SPARSE_DEPS, 3841 ) 3842 3843 tf_kernel_library( 3844 name = "sparse_dense_binary_op_shared", 3845 prefix = "sparse_dense_binary_op_shared", 3846 deps = SPARSE_DEPS, 3847 ) 3848 3849 tf_kernel_library( 3850 name = "sparse_sparse_binary_op_shared", 3851 prefix = "sparse_sparse_binary_op_shared", 3852 deps = SPARSE_DEPS, 3853 ) 3854 3855 tf_kernel_library( 3856 name = "sparse_reorder_op", 3857 prefix = "sparse_reorder_op", 3858 deps = SPARSE_DEPS, 3859 ) 3860 3861 tf_kernel_library( 3862 name = "sparse_reshape_op", 3863 prefix = "sparse_reshape_op", 3864 deps = SPARSE_DEPS + [ 3865 ":reshape_util", 3866 ], 3867 ) 3868 3869 tf_kernel_library( 3870 name = "sparse_slice_op", 3871 prefix = "sparse_slice_op", 3872 deps = SPARSE_DEPS, 3873 ) 3874 3875 tf_kernel_library( 3876 name = "sparse_softmax", 3877 prefix = "sparse_softmax", 3878 deps = SPARSE_DEPS, 3879 ) 3880 3881 tf_kernel_library( 3882 name = "sparse_split_op", 3883 prefix = "sparse_split_op", 3884 deps = SPARSE_DEPS, 3885 ) 3886 3887 tf_kernel_library( 3888 name = "sparse_tensor_dense_add_op", 3889 prefix = "sparse_tensor_dense_add_op", 3890 deps = SPARSE_DEPS, 3891 ) 3892 3893 tf_kernel_library( 3894 name = "sparse_tensor_dense_matmul_op", 3895 prefix = "sparse_tensor_dense_matmul_op", 3896 deps = SPARSE_DEPS, 3897 ) 3898 3899 tf_kernel_library( 3900 name = "sparse_to_dense_op", 3901 prefix = "sparse_to_dense_op", 3902 deps = SPARSE_DEPS, 3903 ) 3904 3905 tf_kernel_library( 3906 name = "sparse_xent_op", 3907 prefix = "sparse_xent_op", 3908 deps = SPARSE_DEPS, 3909 ) 3910 3911 tf_kernel_library( 3912 name = "serialize_sparse_op", 3913 prefix = "serialize_sparse_op", 3914 deps = SPARSE_DEPS + [ 3915 ":reshape_util", 3916 "//tensorflow/core:protos_all_cc", 3917 ], 3918 ) 3919 3920 tf_kernel_library( 3921 name = "sparse_tensors_map_ops", 3922 prefix = "sparse_tensors_map_ops", 3923 deps = SPARSE_DEPS, 3924 ) 3925 3926 tf_cuda_cc_tests( 3927 name = "sparse2_tests", 3928 size = "small", 3929 srcs = [ 3930 "sparse_tensor_dense_matmul_op_test.cc", 3931 "sparse_to_dense_op_test.cc", 3932 "sparse_xent_op_test.cc", 3933 ], 3934 deps = [ 3935 ":ops_testutil", 3936 ":ops_util", 3937 ":sparse", 3938 ":xent_op", 3939 "//tensorflow/core:core_cpu", 3940 "//tensorflow/core:core_cpu_internal", 3941 "//tensorflow/core:framework", 3942 "//tensorflow/core:protos_all_cc", 3943 "//tensorflow/core:test", 3944 "//tensorflow/core:test_main", 3945 "//tensorflow/core:testlib", 3946 ], 3947 ) 3948 3949 cc_library( 3950 name = "loss_updaters", 3951 hdrs = [ 3952 "hinge-loss.h", 3953 "logistic-loss.h", 3954 "loss.h", 3955 "smooth-hinge-loss.h", 3956 "squared-loss.h", 3957 ], 3958 deps = [ 3959 "//tensorflow/core:framework_headers_lib", 3960 "//tensorflow/core:lib", 3961 ], 3962 ) 3963 3964 tf_cc_test( 3965 name = "loss_test", 3966 size = "small", 3967 srcs = ["loss_test.cc"], 3968 deps = [ 3969 ":loss_updaters", 3970 "//tensorflow/core:lib", 3971 "//tensorflow/core:test", 3972 "//tensorflow/core:test_main", 3973 ], 3974 ) 3975 3976 tf_cc_test( 3977 name = "sdca_ops_test", 3978 size = "small", 3979 srcs = ["sdca_ops_test.cc"], 3980 linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking 3981 deps = [ 3982 ":ops_util", 3983 "//tensorflow/core:all_kernels", 3984 "//tensorflow/core:core_cpu", 3985 "//tensorflow/core:framework", 3986 "//tensorflow/core:lib_internal", 3987 "//tensorflow/core:test", 3988 "//tensorflow/core:test_main", 3989 "//tensorflow/core:testlib", 3990 ], 3991 ) 3992 3993 tf_kernel_library( 3994 name = "sdca_ops", 3995 prefix = "sdca_ops", 3996 deps = [ 3997 ":loss_updaters", 3998 ":sdca_internal", 3999 "//tensorflow/core:framework", 4000 "//tensorflow/core:lib", 4001 "//tensorflow/core:lib_internal", 4002 "//tensorflow/core:sdca_ops_op_lib", 4003 "//third_party/eigen3", 4004 "@farmhash_archive//:farmhash", 4005 ], 4006 alwayslink = 1, 4007 ) 4008 4009 cc_library( 4010 name = "sdca_internal", 4011 srcs = ["sdca_internal.cc"], 4012 hdrs = ["sdca_internal.h"], 4013 deps = [ 4014 ":loss_updaters", 4015 "//tensorflow/core:framework", 4016 "//tensorflow/core:lib", 4017 "//tensorflow/core:lib_internal", 4018 "//third_party/eigen3", 4019 ], 4020 ) 4021 4022 cc_library( 4023 name = "state", 4024 deps = [ 4025 ":count_up_to_op", 4026 ":dense_update_ops", 4027 ":scatter_nd_op", 4028 ":scatter_op", 4029 ":variable_ops", 4030 ], 4031 ) 4032 4033 STATE_DEPS = [ 4034 ":assign_op", 4035 ":bounds_check", 4036 ":fill_functor", 4037 ":scatter_functor", 4038 "//third_party/eigen3", 4039 "//tensorflow/core:framework", 4040 "//tensorflow/core:lib", 4041 "//tensorflow/core:state_ops_op_lib", 4042 ] + if_sycl(["//tensorflow/core:sycl_runtime"]) 4043 4044 tf_kernel_library( 4045 name = "count_up_to_op", 4046 prefix = "count_up_to_op", 4047 deps = STATE_DEPS + [":variable_ops"], 4048 ) 4049 4050 tf_kernel_library( 4051 name = "dense_update_ops", 4052 prefix = "dense_update_ops", 4053 deps = STATE_DEPS + [":dense_update_functor"], 4054 ) 4055 4056 tf_kernel_library( 4057 name = "scatter_op", 4058 prefix = "scatter_op", 4059 deps = STATE_DEPS, 4060 ) 4061 4062 tf_kernel_library( 4063 name = "scatter_nd_op", 4064 srcs = [ 4065 "scatter_nd_op.cc", 4066 "scatter_nd_op_cpu_impl_0.cc", 4067 "scatter_nd_op_cpu_impl_1.cc", 4068 "scatter_nd_op_cpu_impl_2.cc", 4069 "scatter_nd_op_cpu_impl_3.cc", 4070 "scatter_nd_op_cpu_impl_4.cc", 4071 "scatter_nd_op_cpu_impl_5.cc", 4072 "scatter_nd_op_cpu_impl_6.cc", 4073 "scatter_nd_op_cpu_impl_7.cc", 4074 ], 4075 hdrs = [ 4076 "scatter_nd_op.h", 4077 "scatter_nd_op_cpu_impl.h", 4078 ], 4079 gpu_srcs = [ 4080 "scatter_nd_op.h", 4081 "scatter_nd_op_gpu.cu.cc", 4082 ], 4083 deps = STATE_DEPS + [ 4084 ":dense_update_functor", 4085 ":training_op_helpers", 4086 ":variable_ops", 4087 ], 4088 ) 4089 4090 tf_kernel_library( 4091 name = "variable_ops", 4092 prefix = "variable_ops", 4093 deps = STATE_DEPS, 4094 ) 4095 4096 tf_kernel_library( 4097 name = "critical_section", 4098 prefix = "critical_section", 4099 deps = STATE_DEPS + [":captured_function"], 4100 ) 4101 4102 tf_cc_test( 4103 name = "scatter_op_test", 4104 size = "small", 4105 srcs = ["scatter_op_test.cc"], 4106 deps = [ 4107 ":fill_functor", 4108 ":ops_testutil", 4109 ":ops_util", 4110 ":scatter_op", 4111 "//tensorflow/core:framework", 4112 "//tensorflow/core:lib", 4113 "//tensorflow/core:protos_all_cc", 4114 "//tensorflow/core:test", 4115 "//tensorflow/core:test_main", 4116 "//tensorflow/core:testlib", 4117 ], 4118 ) 4119 4120 tf_cuda_cc_test( 4121 name = "scatter_nd_op_test", 4122 size = "small", 4123 srcs = ["scatter_nd_op_test.cc"], 4124 tags = ["noasan"], # http://b/32635055 4125 deps = [ 4126 ":ops_testutil", 4127 ":ops_util", 4128 ":scatter_nd_op", 4129 "//tensorflow/core:core_cpu", 4130 "//tensorflow/core:framework", 4131 "//tensorflow/core:lib", 4132 "//tensorflow/core:protos_all_cc", 4133 "//tensorflow/core:test", 4134 "//tensorflow/core:test_main", 4135 "//tensorflow/core:testlib", 4136 ], 4137 ) 4138 4139 cc_library( 4140 name = "string", 4141 deps = [ 4142 ":as_string_op", 4143 ":base64_ops", 4144 ":reduce_join_op", 4145 ":string_join_op", 4146 ":string_split_op", 4147 ":string_to_hash_bucket_op", 4148 ":substr_op", 4149 ], 4150 ) 4151 4152 STRING_DEPS = [ 4153 ":bounds_check", 4154 "//third_party/eigen3", 4155 "//tensorflow/core:framework", 4156 "//tensorflow/core:lib", 4157 "//tensorflow/core:lib_internal", 4158 "//tensorflow/core:string_ops_op_lib", 4159 ] 4160 4161 tf_kernel_library( 4162 name = "string_to_hash_bucket_op", 4163 prefix = "string_to_hash_bucket_op", 4164 deps = STRING_DEPS, 4165 ) 4166 4167 tf_kernel_library( 4168 name = "reduce_join_op", 4169 prefix = "reduce_join_op", 4170 deps = STRING_DEPS, 4171 ) 4172 4173 tf_kernel_library( 4174 name = "string_join_op", 4175 prefix = "string_join_op", 4176 deps = STRING_DEPS, 4177 ) 4178 4179 tf_kernel_library( 4180 name = "string_split_op", 4181 prefix = "string_split_op", 4182 deps = STRING_DEPS, 4183 ) 4184 4185 tf_kernel_library( 4186 name = "substr_op", 4187 prefix = "substr_op", 4188 deps = STRING_DEPS, 4189 ) 4190 4191 tf_kernel_library( 4192 name = "as_string_op", 4193 prefix = "as_string_op", 4194 deps = STRING_DEPS, 4195 ) 4196 4197 tf_kernel_library( 4198 name = "base64_ops", 4199 prefix = "base64_ops", 4200 deps = STRING_DEPS, 4201 ) 4202 4203 tf_kernel_library( 4204 name = "training_ops", 4205 prefix = "training_ops", 4206 deps = [ 4207 ":bounds_check", 4208 ":training_op_helpers", 4209 ":variable_ops", 4210 "//tensorflow/core:framework", 4211 "//tensorflow/core:lib", 4212 "//tensorflow/core:training_ops_op_lib", 4213 "//third_party/eigen3", 4214 ], 4215 ) 4216 4217 tf_cc_test( 4218 name = "training_ops_test", 4219 size = "small", 4220 srcs = ["training_ops_test.cc"], 4221 deps = [ 4222 ":dense_update_ops", 4223 ":ops_util", 4224 ":training_ops", 4225 "//tensorflow/core:core_cpu", 4226 "//tensorflow/core:framework", 4227 "//tensorflow/core:test", 4228 "//tensorflow/core:test_main", 4229 "//tensorflow/core:testlib", 4230 ], 4231 ) 4232 4233 tf_kernel_library( 4234 name = "multinomial_op", 4235 prefix = "multinomial_op", 4236 deps = [ 4237 ":random_op", 4238 ":random_ops", 4239 "//tensorflow/core:framework", 4240 "//tensorflow/core:lib", 4241 "//tensorflow/core:lib_internal", 4242 "//third_party/eigen3", 4243 ], 4244 ) 4245 4246 tf_cuda_cc_test( 4247 name = "multinomial_op_test", 4248 size = "small", 4249 srcs = ["multinomial_op_test.cc"], 4250 deps = [ 4251 ":multinomial_op", 4252 ":ops_util", 4253 "//tensorflow/core:core_cpu", 4254 "//tensorflow/core:framework", 4255 "//tensorflow/core:test", 4256 "//tensorflow/core:test_main", 4257 "//tensorflow/core:testlib", 4258 ], 4259 ) 4260 4261 tf_kernel_library( 4262 name = "parameterized_truncated_normal_op", 4263 prefix = "parameterized_truncated_normal_op", 4264 deps = [ 4265 "//tensorflow/core:core_cpu", 4266 "//tensorflow/core:framework", 4267 "//tensorflow/core:lib", 4268 "//tensorflow/core:lib_internal", 4269 "//tensorflow/core:random_ops_op_lib", 4270 ], 4271 ) 4272 4273 tf_cuda_cc_test( 4274 name = "parameterized_truncated_normal_op_test", 4275 size = "small", 4276 srcs = ["parameterized_truncated_normal_op_test.cc"], 4277 deps = [ 4278 ":ops_util", 4279 ":parameterized_truncated_normal_op", 4280 "//tensorflow/core:core_cpu", 4281 "//tensorflow/core:framework", 4282 "//tensorflow/core:test", 4283 "//tensorflow/core:test_main", 4284 "//tensorflow/core:testlib", 4285 ], 4286 ) 4287 4288 tf_kernel_library( 4289 name = "random_poisson_op", 4290 prefix = "random_poisson_op", 4291 deps = [ 4292 ":random_ops", 4293 "//tensorflow/core:framework", 4294 "//tensorflow/core:lib", 4295 "//tensorflow/core:lib_internal", 4296 "//tensorflow/core:random_ops_op_lib", 4297 ], 4298 ) 4299 4300 tf_cuda_cc_test( 4301 name = "random_poisson_op_test", 4302 size = "small", 4303 srcs = ["random_poisson_op_test.cc"], 4304 deps = [ 4305 ":ops_util", 4306 ":random_poisson_op", 4307 "//tensorflow/core:core_cpu", 4308 "//tensorflow/core:framework", 4309 "//tensorflow/core:test", 4310 "//tensorflow/core:test_main", 4311 "//tensorflow/core:testlib", 4312 ], 4313 ) 4314 4315 tf_kernel_library( 4316 name = "word2vec_kernels", 4317 prefix = "word2vec_kernels", 4318 deps = [ 4319 "//tensorflow/core:framework", 4320 "//tensorflow/core:lib", 4321 "//tensorflow/core:lib_internal", 4322 "//tensorflow/core:word2vec_ops", 4323 ], 4324 ) 4325 4326 filegroup( 4327 name = "spectrogram_test_data", 4328 srcs = [ 4329 "spectrogram_test_data/short_test_segment.wav", 4330 "spectrogram_test_data/short_test_segment_spectrogram.csv.bin", 4331 "spectrogram_test_data/short_test_segment_spectrogram_400_200.csv.bin", 4332 ], 4333 visibility = ["//visibility:public"], 4334 ) 4335 4336 cc_library( 4337 name = "spectrogram", 4338 srcs = ["spectrogram.cc"], 4339 hdrs = ["spectrogram.h"], 4340 copts = tf_copts(), 4341 deps = [ 4342 "//tensorflow/core:framework", 4343 "//tensorflow/core:lib", 4344 "//third_party/fft2d:fft2d_headers", 4345 "@fft2d", 4346 ], 4347 ) 4348 4349 cc_library( 4350 name = "spectrogram_test_utils", 4351 testonly = 1, 4352 srcs = ["spectrogram_test_utils.cc"], 4353 hdrs = ["spectrogram_test_utils.h"], 4354 copts = tf_copts(), 4355 deps = [ 4356 "//tensorflow/core:framework", 4357 "//tensorflow/core:lib", 4358 "//tensorflow/core:lib_internal", 4359 "//tensorflow/core:protos_all_cc", 4360 "//tensorflow/core:test", 4361 ], 4362 ) 4363 4364 tf_cc_binary( 4365 name = "spectrogram_convert_test_data", 4366 testonly = 1, 4367 srcs = ["spectrogram_convert_test_data.cc"], 4368 deps = [ 4369 ":spectrogram_test_utils", 4370 "//tensorflow/core:lib", 4371 "//tensorflow/core:lib_internal", 4372 ], 4373 ) 4374 4375 tf_cc_test( 4376 name = "spectrogram_test", 4377 size = "medium", 4378 srcs = ["spectrogram_test.cc"], 4379 data = [":spectrogram_test_data"], 4380 deps = [ 4381 ":spectrogram", 4382 ":spectrogram_test_utils", 4383 "//tensorflow/core:lib", 4384 "//tensorflow/core:lib_internal", 4385 "//tensorflow/core:lib_test_internal", 4386 "//tensorflow/core:protos_all_cc", 4387 "//tensorflow/core:test", 4388 "//tensorflow/core:test_main", 4389 "//third_party/eigen3", 4390 ], 4391 ) 4392 4393 tf_kernel_library( 4394 name = "spectrogram_op", 4395 prefix = "spectrogram_op", 4396 deps = [ 4397 ":spectrogram", 4398 "//tensorflow/core:audio_ops_op_lib", 4399 "//tensorflow/core:core_cpu", 4400 "//tensorflow/core:framework", 4401 "//tensorflow/core:lib", 4402 "//tensorflow/core:lib_internal", 4403 ], 4404 alwayslink = 1, 4405 ) 4406 4407 tf_cuda_cc_test( 4408 name = "spectrogram_op_test", 4409 size = "small", 4410 srcs = ["spectrogram_op_test.cc"], 4411 deps = [ 4412 ":ops_util", 4413 ":spectrogram_op", 4414 "//tensorflow/cc:cc_ops", 4415 "//tensorflow/cc:client_session", 4416 "//tensorflow/core:core_cpu", 4417 "//tensorflow/core:framework", 4418 "//tensorflow/core:framework_internal", 4419 "//tensorflow/core:lib", 4420 "//tensorflow/core:protos_all_cc", 4421 "//tensorflow/core:tensorflow", 4422 "//tensorflow/core:test", 4423 "//tensorflow/core:test_main", 4424 "//tensorflow/core:testlib", 4425 ], 4426 ) 4427 4428 cc_library( 4429 name = "mfcc_dct", 4430 srcs = ["mfcc_dct.cc"], 4431 hdrs = ["mfcc_dct.h"], 4432 copts = tf_copts(), 4433 deps = [ 4434 "//tensorflow/core:framework", 4435 "//tensorflow/core:lib", 4436 ], 4437 ) 4438 4439 tf_cc_test( 4440 name = "mfcc_dct_test", 4441 size = "small", 4442 srcs = ["mfcc_dct_test.cc"], 4443 deps = [ 4444 ":mfcc_dct", 4445 "//tensorflow/core:lib", 4446 "//tensorflow/core:lib_internal", 4447 "//tensorflow/core:lib_test_internal", 4448 "//tensorflow/core:protos_all_cc", 4449 "//tensorflow/core:test", 4450 "//tensorflow/core:test_main", 4451 "//third_party/eigen3", 4452 ], 4453 ) 4454 4455 cc_library( 4456 name = "mfcc_mel_filterbank", 4457 srcs = ["mfcc_mel_filterbank.cc"], 4458 hdrs = ["mfcc_mel_filterbank.h"], 4459 copts = tf_copts(), 4460 deps = [ 4461 "//tensorflow/core:framework", 4462 "//tensorflow/core:lib", 4463 ], 4464 ) 4465 4466 tf_cc_test( 4467 name = "mfcc_mel_filterbank_test", 4468 size = "small", 4469 srcs = ["mfcc_mel_filterbank_test.cc"], 4470 deps = [ 4471 ":mfcc_mel_filterbank", 4472 "//tensorflow/core:lib", 4473 "//tensorflow/core:lib_internal", 4474 "//tensorflow/core:lib_test_internal", 4475 "//tensorflow/core:protos_all_cc", 4476 "//tensorflow/core:test", 4477 "//tensorflow/core:test_main", 4478 "//third_party/eigen3", 4479 ], 4480 ) 4481 4482 cc_library( 4483 name = "mfcc", 4484 srcs = ["mfcc.cc"], 4485 hdrs = ["mfcc.h"], 4486 copts = tf_copts(), 4487 deps = [ 4488 ":mfcc_dct", 4489 ":mfcc_mel_filterbank", 4490 "//tensorflow/core:framework", 4491 "//tensorflow/core:lib", 4492 ], 4493 ) 4494 4495 tf_cc_test( 4496 name = "mfcc_test", 4497 size = "small", 4498 srcs = ["mfcc_test.cc"], 4499 deps = [ 4500 ":mfcc", 4501 "//tensorflow/core:lib", 4502 "//tensorflow/core:lib_internal", 4503 "//tensorflow/core:lib_test_internal", 4504 "//tensorflow/core:protos_all_cc", 4505 "//tensorflow/core:test", 4506 "//tensorflow/core:test_main", 4507 "//third_party/eigen3", 4508 ], 4509 ) 4510 4511 tf_kernel_library( 4512 name = "mfcc_op", 4513 prefix = "mfcc_op", 4514 deps = [ 4515 ":mfcc", 4516 "//tensorflow/core:audio_ops_op_lib", 4517 "//tensorflow/core:core_cpu", 4518 "//tensorflow/core:framework", 4519 "//tensorflow/core:lib", 4520 "//tensorflow/core:lib_internal", 4521 ], 4522 alwayslink = 1, 4523 ) 4524 4525 tf_cuda_cc_test( 4526 name = "mfcc_op_test", 4527 size = "small", 4528 srcs = ["mfcc_op_test.cc"], 4529 deps = [ 4530 ":mfcc_op", 4531 ":ops_util", 4532 "//tensorflow/cc:cc_ops", 4533 "//tensorflow/cc:client_session", 4534 "//tensorflow/core:core_cpu", 4535 "//tensorflow/core:framework", 4536 "//tensorflow/core:framework_internal", 4537 "//tensorflow/core:lib", 4538 "//tensorflow/core:protos_all_cc", 4539 "//tensorflow/core:tensorflow", 4540 "//tensorflow/core:test", 4541 "//tensorflow/core:test_main", 4542 "//tensorflow/core:testlib", 4543 ], 4544 ) 4545 4546 cc_library( 4547 name = "audio", 4548 deps = [ 4549 ":decode_wav_op", 4550 ":encode_wav_op", 4551 ":mfcc_op", 4552 ":spectrogram_op", 4553 ], 4554 ) 4555 4556 # Android libraries ----------------------------------------------------------- 4557 4558 # Changes to the Android srcs here should be replicated in 4559 # tensorflow/contrib/makefile/tf_op_files.txt 4560 # LINT.IfChange 4561 filegroup( 4562 name = "mobile_srcs", 4563 srcs = [ 4564 "avgpooling_op.h", 4565 "batch_util.h", 4566 "bounds_check.h", 4567 "cwise_ops.h", 4568 "cwise_ops_common.h", 4569 "cwise_ops_gradients.h", 4570 "eigen_activations.h", 4571 "eigen_attention.h", 4572 "eigen_backward_cuboid_convolutions.h", 4573 "eigen_backward_spatial_convolutions.h", 4574 "eigen_cuboid_convolution.h", 4575 "eigen_pooling.h", 4576 "eigen_softmax.h", 4577 "eigen_spatial_convolutions.h", 4578 "eigen_volume_patch.h", 4579 "fifo_queue.h", 4580 "maxpooling_op.h", 4581 "ops_util.cc", 4582 "ops_util.h", 4583 "padding_fifo_queue.h", 4584 "pooling_ops_common.cc", 4585 "pooling_ops_common.h", 4586 "queue_base.h", 4587 "queue_op.h", 4588 "typed_queue.h", 4589 ], 4590 ) 4591 4592 alias( 4593 name = "android_srcs", 4594 actual = ":mobile_srcs", 4595 ) 4596 4597 # Core kernels we want on Android. Only a subset of kernels to keep 4598 # base library small. 4599 filegroup( 4600 name = "android_core_ops", 4601 srcs = [ 4602 "aggregate_ops.cc", 4603 "aggregate_ops.h", 4604 "aggregate_ops_cpu.h", 4605 "assign_op.h", 4606 "bias_op.cc", 4607 "bias_op.h", 4608 "bounds_check.h", 4609 "cast_op.cc", 4610 "cast_op.h", 4611 "cast_op_impl.h", 4612 "cast_op_impl_bfloat.cc", 4613 "cast_op_impl_bool.cc", 4614 "cast_op_impl_complex128.cc", 4615 "cast_op_impl_complex64.cc", 4616 "cast_op_impl_double.cc", 4617 "cast_op_impl_float.cc", 4618 "cast_op_impl_half.cc", 4619 "cast_op_impl_int16.cc", 4620 "cast_op_impl_int32.cc", 4621 "cast_op_impl_int64.cc", 4622 "cast_op_impl_int8.cc", 4623 "cast_op_impl_uint16.cc", 4624 "cast_op_impl_uint8.cc", 4625 "concat_lib.h", 4626 "concat_lib_cpu.cc", 4627 "concat_lib_cpu.h", 4628 "concat_op.cc", 4629 "constant_op.cc", 4630 "constant_op.h", 4631 "cwise_ops.h", 4632 "cwise_ops_common.cc", 4633 "cwise_ops_common.h", 4634 "cwise_ops_gradients.h", 4635 "dense_update_functor.cc", 4636 "dense_update_functor.h", 4637 "dense_update_ops.cc", 4638 "example_parsing_ops.cc", 4639 "fill_functor.cc", 4640 "fill_functor.h", 4641 "function_ops.cc", 4642 "gather_functor.h", 4643 "gather_nd_op.cc", 4644 "gather_nd_op.h", 4645 "gather_nd_op_cpu_impl.h", 4646 "gather_nd_op_cpu_impl_0.cc", 4647 "gather_nd_op_cpu_impl_1.cc", 4648 "gather_nd_op_cpu_impl_2.cc", 4649 "gather_nd_op_cpu_impl_3.cc", 4650 "gather_nd_op_cpu_impl_4.cc", 4651 "gather_nd_op_cpu_impl_5.cc", 4652 "gather_nd_op_cpu_impl_6.cc", 4653 "gather_nd_op_cpu_impl_7.cc", 4654 "gather_op.cc", 4655 "identity_n_op.cc", 4656 "identity_n_op.h", 4657 "identity_op.cc", 4658 "identity_op.h", 4659 "immutable_constant_op.cc", 4660 "immutable_constant_op.h", 4661 "matmul_op.cc", 4662 "matmul_op.h", 4663 "no_op.cc", 4664 "no_op.h", 4665 "non_max_suppression_op.cc", 4666 "non_max_suppression_op.h", 4667 "one_hot_op.cc", 4668 "one_hot_op.h", 4669 "ops_util.h", 4670 "pack_op.cc", 4671 "pooling_ops_common.h", 4672 "reshape_op.cc", 4673 "reshape_op.h", 4674 "reverse_sequence_op.cc", 4675 "reverse_sequence_op.h", 4676 "sendrecv_ops.cc", 4677 "sendrecv_ops.h", 4678 "sequence_ops.cc", 4679 "shape_ops.cc", 4680 "shape_ops.h", 4681 "slice_op.cc", 4682 "slice_op.h", 4683 "slice_op_cpu_impl.h", 4684 "slice_op_cpu_impl_1.cc", 4685 "slice_op_cpu_impl_2.cc", 4686 "slice_op_cpu_impl_3.cc", 4687 "slice_op_cpu_impl_4.cc", 4688 "slice_op_cpu_impl_5.cc", 4689 "slice_op_cpu_impl_6.cc", 4690 "slice_op_cpu_impl_7.cc", 4691 "softmax_op.cc", 4692 "softmax_op_functor.h", 4693 "split_lib.h", 4694 "split_lib_cpu.cc", 4695 "split_op.cc", 4696 "split_v_op.cc", 4697 "strided_slice_op.cc", 4698 "strided_slice_op.h", 4699 "strided_slice_op_impl.h", 4700 "strided_slice_op_inst_0.cc", 4701 "strided_slice_op_inst_1.cc", 4702 "strided_slice_op_inst_2.cc", 4703 "strided_slice_op_inst_3.cc", 4704 "strided_slice_op_inst_4.cc", 4705 "strided_slice_op_inst_5.cc", 4706 "strided_slice_op_inst_6.cc", 4707 "strided_slice_op_inst_7.cc", 4708 "unpack_op.cc", 4709 "variable_ops.cc", 4710 "variable_ops.h", 4711 ], 4712 ) 4713 4714 # Other kernels we may want on Android. 4715 # 4716 # The kernels can be consumed as a whole or in two groups for 4717 # supporting separate compilation. Note that the split into groups 4718 # is entirely for improving compilation time, and not for 4719 # organizational reasons; you should not depend on any 4720 # of those groups independently. 4721 filegroup( 4722 name = "android_extended_ops", 4723 srcs = [ 4724 ":android_extended_ops_group1", 4725 ":android_extended_ops_group2", 4726 ":android_quantized_ops", 4727 ], 4728 visibility = ["//visibility:public"], 4729 ) 4730 4731 filegroup( 4732 name = "android_extended_ops_headers", 4733 srcs = [ 4734 "argmax_op.h", 4735 "avgpooling_op.h", 4736 "batch_matmul_op_impl.h", 4737 "batch_norm_op.h", 4738 "control_flow_ops.h", 4739 "conv_2d.h", 4740 "conv_ops.h", 4741 "data_format_ops.h", 4742 "depthtospace_op.h", 4743 "depthwise_conv_op.h", 4744 "fake_quant_ops_functor.h", 4745 "fused_batch_norm_op.h", 4746 "gemm_functors.h", 4747 "image_resizer_state.h", 4748 "initializable_lookup_table.h", 4749 "lookup_table_init_op.h", 4750 "lookup_table_op.h", 4751 "lookup_util.h", 4752 "maxpooling_op.h", 4753 "mfcc.h", 4754 "mfcc_dct.h", 4755 "mfcc_mel_filterbank.h", 4756 "mirror_pad_op.h", 4757 "mirror_pad_op_cpu_impl.h", 4758 "pad_op.h", 4759 "random_op.h", 4760 "reduction_ops.h", 4761 "reduction_ops_common.h", 4762 "relu_op.h", 4763 "relu_op_functor.h", 4764 "reshape_util.h", 4765 "resize_bilinear_op.h", 4766 "resize_nearest_neighbor_op.h", 4767 "reverse_op.h", 4768 "save_restore_tensor.h", 4769 "segment_reduction_ops.h", 4770 "softplus_op.h", 4771 "softsign_op.h", 4772 "spacetobatch_functor.h", 4773 "spacetodepth_op.h", 4774 "spectrogram.h", 4775 "tensor_array.h", 4776 "tile_functor.h", 4777 "tile_ops_cpu_impl.h", 4778 "tile_ops_impl.h", 4779 "topk_op.h", 4780 "training_op_helpers.h", 4781 "training_ops.h", 4782 "transpose_functor.h", 4783 "transpose_op.h", 4784 "warn_about_ints.h", 4785 "where_op.h", 4786 "xent_op.h", 4787 ], 4788 ) 4789 4790 filegroup( 4791 name = "android_extended_ops_group1", 4792 srcs = [ 4793 "argmax_op.cc", 4794 "avgpooling_op.cc", 4795 "batch_matmul_op_real.cc", 4796 "batch_norm_op.cc", 4797 "bcast_ops.cc", 4798 "check_numerics_op.cc", 4799 "control_flow_ops.cc", 4800 "conv_2d.h", 4801 "conv_grad_filter_ops.cc", 4802 "conv_grad_input_ops.cc", 4803 "conv_grad_ops.cc", 4804 "conv_grad_ops.h", 4805 "conv_ops.cc", 4806 "conv_ops_fused.cc", 4807 "conv_ops_using_gemm.cc", 4808 "crop_and_resize_op.cc", 4809 "crop_and_resize_op.h", 4810 "cwise_op_abs.cc", 4811 "cwise_op_add_1.cc", 4812 "cwise_op_add_2.cc", 4813 "cwise_op_bitwise_and.cc", 4814 "cwise_op_bitwise_or.cc", 4815 "cwise_op_bitwise_xor.cc", 4816 "cwise_op_div.cc", 4817 "cwise_op_equal_to_1.cc", 4818 "cwise_op_equal_to_2.cc", 4819 "cwise_op_not_equal_to_1.cc", 4820 "cwise_op_not_equal_to_2.cc", 4821 "cwise_op_exp.cc", 4822 "cwise_op_floor.cc", 4823 "cwise_op_floor_div.cc", 4824 "cwise_op_floor_mod.cc", 4825 "cwise_op_greater.cc", 4826 "cwise_op_greater_equal.cc", 4827 "cwise_op_invert.cc", 4828 "cwise_op_isfinite.cc", 4829 "cwise_op_isnan.cc", 4830 "cwise_op_left_shift.cc", 4831 "cwise_op_less.cc", 4832 "cwise_op_less_equal.cc", 4833 "cwise_op_log.cc", 4834 "cwise_op_logical_and.cc", 4835 "cwise_op_logical_not.cc", 4836 "cwise_op_logical_or.cc", 4837 "cwise_op_maximum.cc", 4838 "cwise_op_minimum.cc", 4839 "cwise_op_mul_1.cc", 4840 "cwise_op_mul_2.cc", 4841 "cwise_op_neg.cc", 4842 "cwise_op_pow.cc", 4843 "cwise_op_reciprocal.cc", 4844 "cwise_op_right_shift.cc", 4845 "cwise_op_round.cc", 4846 "cwise_op_rsqrt.cc", 4847 "cwise_op_select.cc", 4848 "cwise_op_sigmoid.cc", 4849 "cwise_op_sign.cc", 4850 "cwise_op_sqrt.cc", 4851 "cwise_op_square.cc", 4852 "cwise_op_squared_difference.cc", 4853 "cwise_op_sub.cc", 4854 "cwise_op_tanh.cc", 4855 "data_format_ops.cc", 4856 "decode_wav_op.cc", 4857 "deep_conv2d.cc", 4858 "deep_conv2d.h", 4859 "depthwise_conv_op.cc", 4860 "dynamic_partition_op.cc", 4861 "encode_wav_op.cc", 4862 "fake_quant_ops.cc", 4863 "fifo_queue.cc", 4864 "fifo_queue_op.cc", 4865 "fused_batch_norm_op.cc", 4866 "population_count_op.cc", 4867 "population_count_op.h", 4868 "winograd_transform.h", 4869 ":android_extended_ops_headers", 4870 ] + select({ 4871 ":xsmm": [ 4872 "xsmm_conv2d.h", 4873 "xsmm_conv2d.cc", 4874 ], 4875 "//conditions:default": [], 4876 }), 4877 ) 4878 4879 filegroup( 4880 name = "android_extended_ops_group2", 4881 srcs = [ 4882 "batch_util.cc", 4883 "batchtospace_op.cc", 4884 "ctc_decoder_ops.cc", 4885 "decode_bmp_op.cc", 4886 "depthtospace_op.cc", 4887 "dynamic_stitch_op.cc", 4888 "in_topk_op.cc", 4889 "initializable_lookup_table.cc", 4890 "logging_ops.cc", 4891 "lookup_table_init_op.cc", 4892 "lookup_table_op.cc", 4893 "lookup_util.cc", 4894 "lrn_op.cc", 4895 "maxpooling_op.cc", 4896 "mfcc.cc", 4897 "mfcc_dct.cc", 4898 "mfcc_mel_filterbank.cc", 4899 "mfcc_op.cc", 4900 "mirror_pad_op.cc", 4901 "mirror_pad_op_cpu_impl_1.cc", 4902 "mirror_pad_op_cpu_impl_2.cc", 4903 "mirror_pad_op_cpu_impl_3.cc", 4904 "mirror_pad_op_cpu_impl_4.cc", 4905 "mirror_pad_op_cpu_impl_5.cc", 4906 "pad_op.cc", 4907 "padding_fifo_queue.cc", 4908 "padding_fifo_queue_op.cc", 4909 "queue_base.cc", 4910 "queue_ops.cc", 4911 "random_op.cc", 4912 "reduction_ops_all.cc", 4913 "reduction_ops_any.cc", 4914 "reduction_ops_common.cc", 4915 "reduction_ops_max.cc", 4916 "reduction_ops_mean.cc", 4917 "reduction_ops_min.cc", 4918 "reduction_ops_prod.cc", 4919 "reduction_ops_sum.cc", 4920 "relu_op.cc", 4921 "reshape_util.cc", 4922 "resize_bilinear_op.cc", 4923 "resize_nearest_neighbor_op.cc", 4924 "restore_op.cc", 4925 "reverse_op.cc", 4926 "save_op.cc", 4927 "save_restore_tensor.cc", 4928 "save_restore_v2_ops.cc", 4929 "segment_reduction_ops.cc", 4930 "session_ops.cc", 4931 "softplus_op.cc", 4932 "softsign_op.cc", 4933 "spacetobatch_functor.cc", 4934 "spacetobatch_op.cc", 4935 "spacetodepth_op.cc", 4936 "sparse_fill_empty_rows_op.cc", 4937 "sparse_reshape_op.cc", 4938 "sparse_to_dense_op.cc", 4939 "spectrogram.cc", 4940 "spectrogram_op.cc", 4941 "stack_ops.cc", 4942 "string_join_op.cc", 4943 "summary_op.cc", 4944 "tensor_array.cc", 4945 "tensor_array_ops.cc", 4946 "tile_functor_cpu.cc", 4947 "tile_ops.cc", 4948 "tile_ops_cpu_impl_1.cc", 4949 "tile_ops_cpu_impl_2.cc", 4950 "tile_ops_cpu_impl_3.cc", 4951 "tile_ops_cpu_impl_4.cc", 4952 "tile_ops_cpu_impl_5.cc", 4953 "tile_ops_cpu_impl_6.cc", 4954 "tile_ops_cpu_impl_7.cc", 4955 "topk_op.cc", 4956 "training_op_helpers.cc", 4957 "training_ops.cc", 4958 "transpose_functor_cpu.cc", 4959 "transpose_op.cc", 4960 "unique_op.cc", 4961 "warn_about_ints.cc", 4962 "where_op.cc", 4963 "xent_op.cc", 4964 ":android_extended_ops_headers", 4965 ], 4966 ) 4967 4968 filegroup( 4969 name = "android_quantized_ops", 4970 srcs = [ 4971 "dequantize_op.cc", 4972 "meta_support.cc", 4973 "meta_support.h", 4974 "quantization_utils.cc", 4975 "quantization_utils.h", 4976 "quantize_down_and_shrink_range.cc", 4977 "quantize_op.cc", 4978 "quantized_activation_ops.cc", 4979 "quantized_add_op.cc", 4980 "quantized_batch_norm_op.cc", 4981 "quantized_bias_add_op.cc", 4982 "quantized_concat_op.cc", 4983 "quantized_conv_ops.cc", 4984 "quantized_instance_norm.cc", 4985 "quantized_matmul_op.cc", 4986 "quantized_mul_op.cc", 4987 "quantized_pooling_ops.cc", 4988 "quantized_reshape_op.cc", 4989 "quantized_resize_bilinear_op.cc", 4990 "reference_gemm.h", 4991 "requantization_range_op.cc", 4992 "requantize.cc", 4993 "reshape_op.h", 4994 ], 4995 visibility = ["//visibility:public"], 4996 ) 4997 4998 # A file group which contains nearly all available operators which 4999 # may work on Android. This is intended to be used with selective 5000 # registration. 5001 filegroup( 5002 name = "android_all_ops", 5003 srcs = glob( 5004 [ 5005 "*.cc", 5006 "*.h", 5007 ], 5008 exclude = [ 5009 "*test.cc", 5010 "*test_util*", 5011 "*testutil*", 5012 "*testlib*", 5013 "*main.cc", 5014 "*_gpu*", 5015 "*_3d*", 5016 "*.cu.*", 5017 # Ops already in android_srcs 5018 "ops_util.cc", 5019 "pooling_ops_common.cc", 5020 # Ops which we are currently excluding because they are likely 5021 # not used on Android. Those ops also do not compile if included, 5022 # unless we add the additional deps they need. 5023 "tf_record_reader_op.*", 5024 "lmdb_reader_op.*", 5025 "string_to_hash_bucket_op.*", 5026 "sdca_ops.*", 5027 "sdca_internal.*", 5028 "sparse_cross_op.*", 5029 "text_line_reader_op.*", 5030 "summary_image_op.*", 5031 "decode_image_op.*", 5032 "encode_png_op.*", 5033 "encode_jpeg_op.*", 5034 "extract_jpeg_shape_op.*", 5035 "decode_jpeg_op.*", 5036 "decode_and_crop_jpeg_op.*", 5037 "decode_gif_op.*", 5038 "identity_reader_op.*", 5039 "remote_fused_graph_execute_op.*", 5040 "remote_fused_graph_rewriter_transform.*", 5041 "fixed_length_record_reader_op.*", 5042 "whole_file_read_ops.*", 5043 "sample_distorted_bounding_box_op.*", 5044 "ctc_loss_op.*", 5045 "summary_interface.*", 5046 "summary_kernels.*", 5047 "spectrogram_convert_test_data.cc", 5048 # Excluded due to experimental status: 5049 "debug_ops.*", 5050 "scatter_nd_op*", 5051 "critical_section.*", 5052 "batch_kernels.*", 5053 ], 5054 ), 5055 visibility = ["//visibility:public"], 5056 ) 5057 # LINT.ThenChange(//tensorflow/contrib/makefile/tf_op_files.txt) 5058 5059 cc_library( 5060 name = "android_tensorflow_kernels", 5061 srcs = select({ 5062 "//tensorflow:android": [ 5063 "//tensorflow/core/kernels:android_core_ops", 5064 "//tensorflow/core/kernels:android_extended_ops", 5065 ], 5066 "//conditions:default": [], 5067 }), 5068 copts = tf_copts(), 5069 linkopts = select({ 5070 "//tensorflow:android": [ 5071 "-ldl", 5072 ], 5073 "//conditions:default": [], 5074 }), 5075 tags = [ 5076 "manual", 5077 "notap", 5078 ], 5079 visibility = ["//visibility:public"], 5080 deps = [ 5081 "//tensorflow/core:android_tensorflow_lib_lite", 5082 "//tensorflow/core:protos_all_cc_impl", 5083 "//third_party/eigen3", 5084 "//third_party/fft2d:fft2d_headers", 5085 "@fft2d", 5086 "@gemmlowp", 5087 "@protobuf_archive//:protobuf", 5088 ], 5089 alwayslink = 1, 5090 ) 5091 5092 cc_library( 5093 name = "android_tensorflow_image_op", 5094 srcs = if_android(["decode_image_op.cc"]), 5095 copts = tf_copts(), 5096 linkopts = ["-ldl"], 5097 tags = [ 5098 "manual", 5099 "notap", 5100 ], 5101 visibility = ["//visibility:public"], 5102 deps = [ 5103 "//tensorflow/core:android_gif_internal", 5104 "//tensorflow/core:android_jpeg_internal", 5105 "//tensorflow/core:android_png_internal", 5106 "//tensorflow/core:android_tensorflow_lib_lite", 5107 ], 5108 alwayslink = 1, 5109 ) 5110 5111 # Quantization-specific OpKernels 5112 5113 tf_kernel_library( 5114 name = "quantized_ops", 5115 srcs = [ 5116 "dequantize_op.cc", 5117 "meta_support.cc", 5118 "quantization_utils.cc", 5119 "quantize_down_and_shrink_range.cc", 5120 "quantize_op.cc", 5121 "quantized_activation_ops.cc", 5122 "quantized_add_op.cc", 5123 "quantized_batch_norm_op.cc", 5124 "quantized_bias_add_op.cc", 5125 "quantized_concat_op.cc", 5126 "quantized_conv_ops.cc", 5127 "quantized_instance_norm.cc", 5128 "quantized_matmul_op.cc", 5129 "quantized_mul_op.cc", 5130 "quantized_pooling_ops.cc", 5131 "quantized_reshape_op.cc", 5132 "quantized_resize_bilinear_op.cc", 5133 "requantization_range_op.cc", 5134 "requantize.cc", 5135 "reshape_op.h", 5136 ], 5137 hdrs = [ 5138 "meta_support.h", 5139 "quantization_utils.h", 5140 "reference_gemm.h", 5141 ], 5142 deps = [ 5143 ":concat_lib_hdrs", 5144 ":conv_ops", 5145 ":cwise_op", 5146 ":eigen_helpers", 5147 ":image_resizer_state", 5148 ":ops_util", 5149 ":pooling_ops", 5150 "//tensorflow/core:array_ops_op_lib", 5151 "//tensorflow/core:core_cpu", 5152 "//tensorflow/core:framework", 5153 "//tensorflow/core:lib", 5154 "//tensorflow/core:math_ops_op_lib", 5155 "//tensorflow/core:nn_ops_op_lib", 5156 "//third_party/eigen3", 5157 "@gemmlowp", 5158 ], 5159 ) 5160 5161 tf_cc_test( 5162 name = "requantization_range_op_test", 5163 size = "small", 5164 srcs = ["requantization_range_op_test.cc"], 5165 deps = [ 5166 ":ops_testutil", 5167 ":ops_util", 5168 ":quantized_ops", 5169 "//tensorflow/core:framework", 5170 "//tensorflow/core:protos_all_cc", 5171 "//tensorflow/core:test", 5172 "//tensorflow/core:test_main", 5173 "//tensorflow/core:testlib", 5174 ], 5175 ) 5176 5177 tf_cc_test( 5178 name = "quantize_down_and_shrink_range_op_test", 5179 size = "small", 5180 srcs = ["quantize_down_and_shrink_range_op_test.cc"], 5181 deps = [ 5182 ":ops_testutil", 5183 ":ops_util", 5184 ":quantized_ops", 5185 "//tensorflow/core:framework", 5186 "//tensorflow/core:protos_all_cc", 5187 "//tensorflow/core:test", 5188 "//tensorflow/core:test_main", 5189 "//tensorflow/core:testlib", 5190 ], 5191 ) 5192 5193 tf_cc_test( 5194 name = "requantize_op_test", 5195 size = "small", 5196 srcs = ["requantize_op_test.cc"], 5197 deps = [ 5198 ":ops_testutil", 5199 ":ops_util", 5200 ":quantized_ops", 5201 "//tensorflow/core:framework", 5202 "//tensorflow/core:protos_all_cc", 5203 "//tensorflow/core:test", 5204 "//tensorflow/core:test_main", 5205 "//tensorflow/core:testlib", 5206 ], 5207 ) 5208 5209 tf_cc_test( 5210 name = "quantization_utils_test", 5211 srcs = ["quantization_utils_test.cc"], 5212 deps = [ 5213 ":quantized_ops", 5214 "//tensorflow/core:array_ops_op_lib", 5215 "//tensorflow/core:core_cpu", 5216 "//tensorflow/core:core_cpu_internal", 5217 "//tensorflow/core:framework", 5218 "//tensorflow/core:lib", 5219 "//tensorflow/core:math_ops_op_lib", 5220 "//tensorflow/core:nn_ops_op_lib", 5221 "//tensorflow/core:protos_all_cc", 5222 "//tensorflow/core:test", 5223 "//tensorflow/core:testlib", 5224 "//third_party/eigen3", 5225 ], 5226 ) 5227 5228 # Android-only test for quantization utilities. 5229 tf_cc_binary( 5230 name = "quantization_utils_test_android_only", 5231 testonly = 1, 5232 srcs = ["quantization_utils_test.cc"], 5233 copts = tf_copts(), 5234 linkopts = select({ 5235 "//tensorflow:android": [ 5236 "-lm", 5237 "-llog", 5238 "-pie", 5239 "-std=c++11", 5240 ], 5241 "//conditions:default": [], 5242 }), 5243 linkstatic = 1, 5244 tags = [ 5245 "manual", 5246 "notap", 5247 ], 5248 deps = [ 5249 ] + select({ 5250 "//tensorflow:android": [ 5251 ":android_tensorflow_kernels", 5252 "//tensorflow/core:android_tensorflow_lib", 5253 "//tensorflow/core:android_tensorflow_test_lib", 5254 ], 5255 "//conditions:default": [ 5256 ":quantized_ops", 5257 "//third_party/eigen3", 5258 "//tensorflow/core:core_cpu_internal", 5259 "//tensorflow/core:lib", 5260 "//tensorflow/core:test", 5261 "//tensorflow/cc:cc_ops", 5262 "//tensorflow/cc:client_session", 5263 "//tensorflow/core:framework", 5264 "//tensorflow/core:tensor_testutil", 5265 ], 5266 }), 5267 ) 5268 5269 tf_cc_test( 5270 name = "quantized_activation_ops_test", 5271 srcs = ["quantized_activation_ops_test.cc"], 5272 deps = [ 5273 ":ops_testutil", 5274 ":ops_util", 5275 ":quantized_ops", 5276 "//tensorflow/core:array_ops_op_lib", 5277 "//tensorflow/core:framework", 5278 "//tensorflow/core:math_ops_op_lib", 5279 "//tensorflow/core:nn_ops_op_lib", 5280 "//tensorflow/core:protos_all_cc", 5281 "//tensorflow/core:test", 5282 "//tensorflow/core:test_main", 5283 "//tensorflow/core:testlib", 5284 ], 5285 ) 5286 5287 # Android-only test for quantized addition. 5288 cc_binary( 5289 name = "quantized_add_op_test_android_only", 5290 testonly = 1, 5291 srcs = ["quantized_add_op_test.cc"], 5292 copts = tf_copts(), 5293 linkopts = select({ 5294 "//tensorflow:android": [ 5295 "-lm", 5296 "-llog", 5297 "-pie", 5298 "-std=c++11", 5299 ], 5300 "//conditions:default": [], 5301 }), 5302 linkstatic = 1, 5303 tags = [ 5304 "manual", 5305 "notap", 5306 ], 5307 deps = [ 5308 "//tensorflow/cc:cc_ops", 5309 "//tensorflow/cc:client_session", 5310 ] + select({ 5311 "//tensorflow:android": [ 5312 ":android_tensorflow_kernels", 5313 "//tensorflow/core:android_tensorflow_lib", 5314 "//tensorflow/core:android_tensorflow_test_lib", 5315 ], 5316 "//conditions:default": [ 5317 ":ops_util", 5318 ":quantized_ops", 5319 "//tensorflow/core:framework", 5320 "//tensorflow/core:protos_all_cc", 5321 "//tensorflow/core:tensor_testutil", 5322 "//tensorflow/core:tensorflow", 5323 "//tensorflow/core:test", 5324 ], 5325 }), 5326 ) 5327 5328 tf_cc_test( 5329 name = "quantized_add_op_test", 5330 size = "small", 5331 srcs = ["quantized_add_op_test.cc"], 5332 deps = [ 5333 ":math", 5334 ":ops_testutil", 5335 ":ops_util", 5336 ":quantized_ops", 5337 "//tensorflow/cc:cc_ops", 5338 "//tensorflow/cc:client_session", 5339 "//tensorflow/core:array_ops_op_lib", 5340 "//tensorflow/core:core_cpu", 5341 "//tensorflow/core:direct_session", 5342 "//tensorflow/core:framework", 5343 "//tensorflow/core:math_ops_op_lib", 5344 "//tensorflow/core:nn_ops_op_lib", 5345 "//tensorflow/core:protos_all_cc", 5346 "//tensorflow/core:test", 5347 "//tensorflow/core:testlib", 5348 ], 5349 ) 5350 5351 tf_cc_test( 5352 name = "quantized_resize_bilinear_op_test", 5353 size = "small", 5354 srcs = ["quantized_resize_bilinear_op_test.cc"], 5355 deps = [ 5356 ":ops_testutil", 5357 ":ops_util", 5358 ":quantized_ops", 5359 "//tensorflow/cc:cc_ops", 5360 "//tensorflow/cc:client_session", 5361 "//tensorflow/core:core_cpu", 5362 "//tensorflow/core:direct_session", 5363 "//tensorflow/core:framework", 5364 "//tensorflow/core:image_ops_op_lib", 5365 "//tensorflow/core:protos_all_cc", 5366 "//tensorflow/core:test", 5367 "//tensorflow/core:testlib", 5368 ], 5369 ) 5370 5371 # Android-only test for quantized resize bilinear. 5372 cc_binary( 5373 name = "quantized_resize_bilinear_op_test_android_only", 5374 testonly = 1, 5375 srcs = ["quantized_resize_bilinear_op_test.cc"], 5376 copts = tf_copts(), 5377 linkopts = select({ 5378 "//tensorflow:android": [ 5379 "-lm", 5380 "-llog", 5381 "-pie", 5382 "-std=c++11", 5383 ], 5384 "//conditions:default": [], 5385 }), 5386 linkstatic = 1, 5387 tags = [ 5388 "manual", 5389 "notap", 5390 ], 5391 deps = [ 5392 "//tensorflow/cc:cc_ops", 5393 "//tensorflow/cc:client_session", 5394 ] + select({ 5395 "//tensorflow:android": [ 5396 ":android_tensorflow_kernels", 5397 "//tensorflow/core:android_tensorflow_lib", 5398 "//tensorflow/core:android_tensorflow_test_lib", 5399 ], 5400 "//conditions:default": [ 5401 ":ops_testutil", 5402 ":ops_util", 5403 ":quantized_ops", 5404 "//tensorflow/core:core_cpu", 5405 "//tensorflow/core:direct_session", 5406 "//tensorflow/core:framework", 5407 "//tensorflow/core:image_ops_op_lib", 5408 "//tensorflow/core:protos_all_cc", 5409 "//tensorflow/core:test", 5410 "//tensorflow/core:testlib", 5411 ], 5412 }), 5413 ) 5414 5415 tf_cc_test( 5416 name = "quantized_bias_add_op_test", 5417 size = "small", 5418 srcs = ["quantized_bias_add_op_test.cc"], 5419 deps = [ 5420 ":ops_testutil", 5421 ":ops_util", 5422 ":quantized_ops", 5423 "//tensorflow/core:array_ops_op_lib", 5424 "//tensorflow/core:framework", 5425 "//tensorflow/core:math_ops_op_lib", 5426 "//tensorflow/core:nn_ops_op_lib", 5427 "//tensorflow/core:protos_all_cc", 5428 "//tensorflow/core:test", 5429 "//tensorflow/core:test_main", 5430 "//tensorflow/core:testlib", 5431 ], 5432 ) 5433 5434 tf_cc_test( 5435 name = "quantized_conv_ops_test", 5436 size = "small", 5437 srcs = ["quantized_conv_ops_test.cc"], 5438 tags = ["nomsan"], # http://b/32242946 5439 deps = [ 5440 ":ops_testutil", 5441 ":ops_util", 5442 ":quantized_ops", 5443 "//tensorflow/core:array_ops_op_lib", 5444 "//tensorflow/core:framework", 5445 "//tensorflow/core:math_ops_op_lib", 5446 "//tensorflow/core:nn_ops_op_lib", 5447 "//tensorflow/core:protos_all_cc", 5448 "//tensorflow/core:test", 5449 "//tensorflow/core:test_main", 5450 "//tensorflow/core:testlib", 5451 ], 5452 ) 5453 5454 tf_cc_test( 5455 name = "quantize_op_test", 5456 size = "small", 5457 srcs = ["quantize_op_test.cc"], 5458 deps = [ 5459 ":ops_testutil", 5460 ":ops_util", 5461 ":quantized_ops", 5462 "//tensorflow/core:array_ops_op_lib", 5463 "//tensorflow/core:framework", 5464 "//tensorflow/core:math_ops_op_lib", 5465 "//tensorflow/core:nn_ops_op_lib", 5466 "//tensorflow/core:protos_all_cc", 5467 "//tensorflow/core:test", 5468 "//tensorflow/core:test_main", 5469 "//tensorflow/core:testlib", 5470 ], 5471 ) 5472 5473 tf_cc_test( 5474 name = "quantized_matmul_op_test", 5475 size = "small", 5476 srcs = ["quantized_matmul_op_test.cc"], 5477 tags = ["nomsan"], # http://b/32242946 5478 deps = [ 5479 ":ops_testutil", 5480 ":ops_util", 5481 ":quantized_ops", 5482 "//tensorflow/core:array_ops_op_lib", 5483 "//tensorflow/core:framework", 5484 "//tensorflow/core:math_ops_op_lib", 5485 "//tensorflow/core:nn_ops_op_lib", 5486 "//tensorflow/core:protos_all_cc", 5487 "//tensorflow/core:test", 5488 "//tensorflow/core:test_main", 5489 "//tensorflow/core:testlib", 5490 ], 5491 ) 5492 5493 # Android-only test for quantized multiply. 5494 cc_binary( 5495 name = "quantized_mul_op_test_android_only", 5496 testonly = 1, 5497 srcs = ["quantized_mul_op_test.cc"], 5498 linkopts = select({ 5499 "//tensorflow:android": [ 5500 "-pie", 5501 ], 5502 "//conditions:default": [], 5503 }), 5504 linkstatic = 1, 5505 tags = [ 5506 "manual", 5507 "notap", 5508 ], 5509 deps = [ 5510 "//tensorflow/cc:cc_ops", 5511 "//tensorflow/cc:client_session", 5512 ] + select({ 5513 "//tensorflow:android": [ 5514 ":android_tensorflow_kernels", 5515 "//tensorflow/core:android_tensorflow_lib", 5516 "//tensorflow/core:android_tensorflow_test_lib", 5517 ], 5518 "//conditions:default": [ 5519 ":ops_util", 5520 ":quantized_ops", 5521 "//tensorflow/core:framework", 5522 "//tensorflow/core:tensor_testutil", 5523 "//tensorflow/core:protos_all_cc", 5524 "//tensorflow/core:test", 5525 ], 5526 }), 5527 ) 5528 5529 tf_cc_test( 5530 name = "quantized_mul_op_test", 5531 size = "small", 5532 srcs = ["quantized_mul_op_test.cc"], 5533 deps = [ 5534 ":math", 5535 ":ops_testutil", 5536 ":ops_util", 5537 ":quantized_ops", 5538 "//tensorflow/cc:cc_ops", 5539 "//tensorflow/cc:client_session", 5540 "//tensorflow/core:array_ops_op_lib", 5541 "//tensorflow/core:core_cpu", 5542 "//tensorflow/core:direct_session", 5543 "//tensorflow/core:framework", 5544 "//tensorflow/core:math_ops_op_lib", 5545 "//tensorflow/core:nn_ops_op_lib", 5546 "//tensorflow/core:protos_all_cc", 5547 "//tensorflow/core:test", 5548 "//tensorflow/core:testlib", 5549 ], 5550 ) 5551 5552 tf_cc_test( 5553 name = "quantized_pooling_ops_test", 5554 size = "small", 5555 srcs = ["quantized_pooling_ops_test.cc"], 5556 deps = [ 5557 ":ops_testutil", 5558 ":ops_util", 5559 ":quantized_ops", 5560 "//tensorflow/core:array_ops_op_lib", 5561 "//tensorflow/core:framework", 5562 "//tensorflow/core:math_ops_op_lib", 5563 "//tensorflow/core:nn_ops_op_lib", 5564 "//tensorflow/core:protos_all_cc", 5565 "//tensorflow/core:test", 5566 "//tensorflow/core:test_main", 5567 "//tensorflow/core:testlib", 5568 ], 5569 ) 5570 5571 tf_cc_test( 5572 name = "quantized_reshape_op_test", 5573 size = "small", 5574 srcs = ["quantized_reshape_op_test.cc"], 5575 deps = [ 5576 ":ops_testutil", 5577 ":ops_util", 5578 ":quantized_ops", 5579 "//tensorflow/core:framework", 5580 "//tensorflow/core:lib", 5581 "//tensorflow/core:protos_all_cc", 5582 "//tensorflow/core:test", 5583 "//tensorflow/core:test_main", 5584 "//tensorflow/core:testlib", 5585 ], 5586 ) 5587 5588 tf_cc_test( 5589 name = "quantized_concat_op_test", 5590 size = "small", 5591 srcs = ["quantized_concat_op_test.cc"], 5592 deps = [ 5593 ":ops_testutil", 5594 ":ops_util", 5595 ":quantized_ops", 5596 "//tensorflow/core:array_ops_op_lib", 5597 "//tensorflow/core:core_cpu", 5598 "//tensorflow/core:framework", 5599 "//tensorflow/core:lib", 5600 "//tensorflow/core:math_ops_op_lib", 5601 "//tensorflow/core:nn_ops_op_lib", 5602 "//tensorflow/core:protos_all_cc", 5603 "//tensorflow/core:test", 5604 "//tensorflow/core:test_main", 5605 "//tensorflow/core:testlib", 5606 ], 5607 ) 5608 5609 tf_cc_test( 5610 name = "quantized_batch_norm_op_test", 5611 size = "small", 5612 srcs = ["quantized_batch_norm_op_test.cc"], 5613 deps = [ 5614 ":batch_norm_op", 5615 ":ops_testutil", 5616 ":quantized_ops", 5617 "//tensorflow/core:array_ops_op_lib", 5618 "//tensorflow/core:core_cpu_internal", 5619 "//tensorflow/core:framework", 5620 "//tensorflow/core:lib", 5621 "//tensorflow/core:math_ops_op_lib", 5622 "//tensorflow/core:nn_ops_op_lib", 5623 "//tensorflow/core:protos_all_cc", 5624 "//tensorflow/core:test", 5625 "//tensorflow/core:test_main", 5626 "//tensorflow/core:testlib", 5627 "//third_party/eigen3", 5628 ], 5629 ) 5630 5631 # Android-only test for quantized instance norm. 5632 cc_binary( 5633 name = "quantized_instance_norm_test_android_only", 5634 testonly = 1, 5635 srcs = ["quantized_instance_norm_test.cc"], 5636 linkopts = select({ 5637 "//tensorflow:android": [ 5638 "-pie", 5639 ], 5640 "//conditions:default": [], 5641 }), 5642 linkstatic = 1, 5643 tags = [ 5644 "manual", 5645 "notap", 5646 ], 5647 deps = [ 5648 "//tensorflow/cc:cc_ops", 5649 "//tensorflow/cc:client_session", 5650 ] + select({ 5651 "//tensorflow:android": [ 5652 ":android_tensorflow_kernels", 5653 "//tensorflow/core:android_tensorflow_lib", 5654 "//tensorflow/core:android_tensorflow_test_lib", 5655 ], 5656 "//conditions:default": [ 5657 "//tensorflow/core:framework", 5658 "//tensorflow/core:tensor_testutil", 5659 ], 5660 }), 5661 ) 5662 5663 tf_cc_test( 5664 name = "quantized_instance_norm_test", 5665 size = "small", 5666 srcs = ["quantized_instance_norm_test.cc"], 5667 deps = [ 5668 ":ops_testutil", 5669 ":ops_util", 5670 ":quantized_ops", 5671 "//tensorflow/cc:cc_ops", 5672 "//tensorflow/cc:client_session", 5673 "//tensorflow/core:core_cpu", 5674 "//tensorflow/core:direct_session", 5675 "//tensorflow/core:framework", 5676 "//tensorflow/core:lib", 5677 "//tensorflow/core:protos_all_cc", 5678 "//tensorflow/core:test", 5679 "//tensorflow/core:testlib", 5680 ], 5681 ) 5682 5683 tf_kernel_library( 5684 name = "remote_fused_graph_ops", 5685 prefix = "remote_fused_graph_execute_op", 5686 deps = [ 5687 ":remote_fused_graph_execute_utils", 5688 "//tensorflow/core:framework", 5689 "//tensorflow/core:lib", 5690 "//tensorflow/core:lib_internal", 5691 "//tensorflow/core:protos_all_cc", 5692 "//tensorflow/core:remote_fused_graph_ops_op_lib", 5693 ], 5694 ) 5695 5696 cc_library( 5697 name = "remote_fused_graph_execute_utils", 5698 srcs = [ 5699 "i_remote_fused_graph_ops_definitions.cc", 5700 "remote_fused_graph_execute_utils.cc", 5701 ], 5702 hdrs = [ 5703 "i_remote_fused_graph_executor.h", 5704 "i_remote_fused_graph_ops_definitions.h", 5705 "remote_fused_graph_execute_utils.h", 5706 ], 5707 deps = [ 5708 "//tensorflow/core:core_cpu", 5709 "//tensorflow/core:framework", 5710 "//tensorflow/core:lib", 5711 "//tensorflow/core:lib_internal", 5712 "//tensorflow/core:protos_all_cc", 5713 ], 5714 ) 5715 5716 cc_library( 5717 name = "remote_fused_graph_execute_op_test_utils", 5718 testonly = 1, 5719 srcs = ["remote_fused_graph_execute_op_test_utils.cc"], 5720 hdrs = ["remote_fused_graph_execute_op_test_utils.h"], 5721 deps = [ 5722 ":remote_fused_graph_execute_utils", 5723 "//tensorflow/cc:cc_ops", 5724 "//tensorflow/cc:ops", 5725 "//tensorflow/cc:scope", 5726 "//tensorflow/core:framework", 5727 "//tensorflow/core:lib", 5728 "//tensorflow/core:testlib", 5729 "//tensorflow/core/kernels:cwise_op", 5730 ], 5731 ) 5732 5733 tf_cc_test( 5734 name = "remote_fused_graph_execute_utils_test", 5735 size = "small", 5736 srcs = [ 5737 "remote_fused_graph_execute_utils_test.cc", 5738 ], 5739 deps = [ 5740 ":remote_fused_graph_execute_op_test_utils", 5741 ":remote_fused_graph_execute_utils", 5742 "//tensorflow/cc:cc_ops", 5743 "//tensorflow/cc:scope", 5744 "//tensorflow/core:core_cpu", 5745 "//tensorflow/core:direct_session", 5746 "//tensorflow/core:framework", 5747 "//tensorflow/core:lib", 5748 "//tensorflow/core:lib_internal", 5749 "//tensorflow/core:ops", 5750 "//tensorflow/core:protos_all_cc", 5751 "//tensorflow/core:remote_fused_graph_ops_op_lib", 5752 "//tensorflow/core:test", 5753 "//tensorflow/core:test_main", 5754 "//tensorflow/core:testlib", 5755 "//tensorflow/core/kernels:cwise_op", 5756 ], 5757 ) 5758 5759 tf_cc_test( 5760 name = "remote_fused_graph_ops_test", 5761 size = "small", 5762 srcs = [ 5763 "remote_fused_graph_execute_op_test.cc", 5764 ], 5765 deps = [ 5766 ":ops_testutil", 5767 ":ops_util", 5768 ":remote_fused_graph_execute_op_test_utils", 5769 ":remote_fused_graph_execute_utils", 5770 ":remote_fused_graph_ops", 5771 "//tensorflow/cc:cc_ops", 5772 "//tensorflow/cc:ops", 5773 "//tensorflow/cc:scope", 5774 "//tensorflow/core:core_cpu", 5775 "//tensorflow/core:direct_session", 5776 "//tensorflow/core:framework", 5777 "//tensorflow/core:lib", 5778 "//tensorflow/core:protos_all_cc", 5779 "//tensorflow/core:remote_fused_graph_ops_op_lib", 5780 "//tensorflow/core:test", 5781 "//tensorflow/core:test_main", 5782 "//tensorflow/core:testlib", 5783 ], 5784 ) 5785 5786 cc_library( 5787 name = "remote_fused_graph_rewriter_transform", 5788 srcs = [ 5789 "remote_fused_graph_rewriter_transform.cc", 5790 ], 5791 deps = [ 5792 ":remote_fused_graph_execute_utils", 5793 "//tensorflow/cc:cc_ops", 5794 "//tensorflow/cc:remote_fused_graph_ops", 5795 "//tensorflow/tools/graph_transforms:transform_utils", 5796 ], 5797 alwayslink = 1, 5798 ) 5799 5800 tf_cc_test( 5801 name = "remote_fused_graph_rewriter_transform_test", 5802 size = "small", 5803 srcs = ["remote_fused_graph_rewriter_transform_test.cc"], 5804 deps = [ 5805 ":remote_fused_graph_execute_op_test_utils", 5806 ":remote_fused_graph_execute_utils", 5807 ":remote_fused_graph_rewriter_transform", 5808 "//tensorflow/cc:cc_ops", 5809 "//tensorflow/core:core_cpu", 5810 "//tensorflow/core:core_cpu_internal", 5811 "//tensorflow/core:framework", 5812 "//tensorflow/core:tensorflow", 5813 "//tensorflow/core:test", 5814 "//tensorflow/core:test_main", 5815 "//tensorflow/core:testlib", 5816 "//tensorflow/tools/graph_transforms:transform_utils", 5817 ], 5818 ) 5819 5820 tf_mkl_kernel_library( 5821 name = "mkl_conv_op", 5822 prefix = "mkl_conv", 5823 deps = [ 5824 ":bounds_check", 5825 ":conv_ops", 5826 ":ops_util", 5827 "//tensorflow/core:core_cpu", 5828 "//tensorflow/core:framework", 5829 "//tensorflow/core:lib", 5830 "//tensorflow/core:lib_internal", 5831 "//tensorflow/core:nn_ops_op_lib", 5832 ] + if_mkl([ 5833 "//third_party/mkl:intel_binary_blob", 5834 "@mkl_dnn//:mkl_dnn", 5835 ]), 5836 ) 5837 5838 tf_mkl_kernel_library( 5839 name = "mkl_tfconv_op", 5840 prefix = "mkl_tfconv", 5841 deps = [ 5842 ":bounds_check", 5843 ":ops_util", 5844 "//tensorflow/core:core_cpu", 5845 "//tensorflow/core:framework", 5846 "//tensorflow/core:lib", 5847 "//tensorflow/core:lib_internal", 5848 "//tensorflow/core:nn_ops_op_lib", 5849 ] + if_mkl([ 5850 "//third_party/mkl:intel_binary_blob", 5851 "@mkl_dnn//:mkl_dnn", 5852 ]), 5853 ) 5854 5855 tf_mkl_kernel_library( 5856 name = "mkl_input_conversion_op", 5857 hdrs = ["mkl_tfconv_op.h"], 5858 prefix = "mkl_input_conversion", 5859 deps = [ 5860 ":bounds_check", 5861 ":ops_util", 5862 "//tensorflow/core:core_cpu", 5863 "//tensorflow/core:framework", 5864 "//tensorflow/core:lib", 5865 "//tensorflow/core:lib_internal", 5866 "//tensorflow/core:nn_ops_op_lib", 5867 "//third_party/mkl:intel_binary_blob", 5868 ], 5869 ) 5870 5871 tf_mkl_kernel_library( 5872 name = "mkl_pooling_ops", 5873 srcs = [ 5874 "mkl_avgpooling_op.cc", 5875 "mkl_maxpooling_op.cc", 5876 "mkl_pooling_ops_common.cc", 5877 ], 5878 hdrs = ["mkl_pooling_ops_common.h"], 5879 deps = [ 5880 ":ops_util", 5881 "//tensorflow/core:core_cpu", 5882 "//tensorflow/core:framework", 5883 "//tensorflow/core:lib", 5884 "//tensorflow/core:lib_internal", 5885 "//tensorflow/core:nn_ops_op_lib", 5886 "//third_party/mkl:intel_binary_blob", 5887 ], 5888 ) 5889 5890 tf_mkl_kernel_library( 5891 name = "mkl_relu_op", 5892 prefix = "mkl_relu", 5893 deps = [ 5894 ":bounds_check", 5895 ":ops_util", 5896 "//tensorflow/core:core_cpu", 5897 "//tensorflow/core:framework", 5898 "//tensorflow/core:lib", 5899 "//tensorflow/core:lib_internal", 5900 "//tensorflow/core:nn_ops_op_lib", 5901 ] + if_mkl([ 5902 "//third_party/mkl:intel_binary_blob", 5903 "@mkl_dnn//:mkl_dnn", 5904 ]), 5905 ) 5906 5907 tf_mkl_kernel_library( 5908 name = "mkl_softmax_op", 5909 prefix = "mkl_softmax", 5910 deps = [ 5911 ":bounds_check", 5912 ":ops_util", 5913 "//tensorflow/core:core_cpu", 5914 "//tensorflow/core:framework", 5915 "//tensorflow/core:lib", 5916 "//tensorflow/core:lib_internal", 5917 "//tensorflow/core:nn_ops_op_lib", 5918 ] + if_mkl([ 5919 "//third_party/mkl:intel_binary_blob", 5920 "@mkl_dnn//:mkl_dnn", 5921 ]), 5922 ) 5923 5924 tf_mkl_kernel_library( 5925 name = "mkl_fused_batch_norm_op", 5926 srcs = ["mkl_fused_batch_norm_op.cc"], 5927 deps = NN_DEPS + if_mkl([ 5928 "//third_party/mkl:intel_binary_blob", 5929 "@mkl_dnn//:mkl_dnn", 5930 ]), 5931 ) 5932 5933 tf_mkl_kernel_library( 5934 name = "mkl_aggregate_ops", 5935 prefix = "mkl_aggregate_ops", 5936 deps = MATH_DEPS + [ 5937 "//third_party/mkl:intel_binary_blob", 5938 ], 5939 ) 5940 5941 tf_mkl_kernel_library( 5942 name = "mkl_concat_op", 5943 prefix = "mkl_concat_op", 5944 deps = ARRAY_DEPS + if_mkl([ 5945 "//third_party/mkl:intel_binary_blob", 5946 "@mkl_dnn//:mkl_dnn", 5947 ]), 5948 ) 5949 5950 tf_mkl_kernel_library( 5951 name = "mkl_reshape_op", 5952 prefix = "mkl_reshape_op", 5953 deps = ARRAY_DEPS + [ 5954 "//third_party/mkl:intel_binary_blob", 5955 ], 5956 ) 5957 5958 tf_mkl_kernel_library( 5959 name = "mkl_identity_op", 5960 prefix = "mkl_identity_op", 5961 deps = ARRAY_DEPS + if_mkl([ 5962 "//third_party/mkl:intel_binary_blob", 5963 "@mkl_dnn//:mkl_dnn", 5964 ]), 5965 ) 5966 5967 tf_mkl_kernel_library( 5968 name = "mkl_lrn_op", 5969 prefix = "mkl_lrn_op", 5970 deps = NN_DEPS + if_mkl([ 5971 "//third_party/mkl:intel_binary_blob", 5972 "@mkl_dnn//:mkl_dnn", 5973 ]), 5974 ) 5975 5976 tf_mkl_kernel_library( 5977 name = "mkl_cwise_ops_common", 5978 hdrs = [ 5979 "cwise_ops.h", 5980 "cwise_ops_common.h", 5981 "cwise_ops_gradients.h", 5982 ], 5983 prefix = "mkl_cwise_ops_common", 5984 deps = NN_DEPS + [ 5985 "cwise_op", 5986 "//third_party/mkl:intel_binary_blob", 5987 ], 5988 ) 5989 5990 cc_library( 5991 name = "batch_util", 5992 srcs = ["batch_util.cc"], 5993 hdrs = ["batch_util.h"], 5994 deps = [ 5995 "//tensorflow/core:framework", 5996 "//tensorflow/core:lib", 5997 ], 5998 ) 5999 6000 cc_library( 6001 name = "captured_function", 6002 hdrs = ["captured_function.h"], 6003 deps = [ 6004 "//tensorflow/core/kernels/data:captured_function", 6005 ], 6006 ) 6007 6008 cc_library( 6009 name = "dataset", 6010 hdrs = ["dataset.h"], 6011 deps = [ 6012 "//tensorflow/core/kernels/data:dataset", 6013 ], 6014 ) 6015 6016 tf_kernel_library( 6017 name = "dataset_ops", 6018 deps = [ 6019 "//tensorflow/core/kernels/data:dataset_ops", 6020 ], 6021 ) 6022 6023 cc_library( 6024 name = "summary_interface", 6025 hdrs = ["summary_interface.h"], 6026 deps = [ 6027 "//tensorflow/core:framework", 6028 "//tensorflow/core:lib", 6029 "//tensorflow/core:protos_all_cc", 6030 ], 6031 ) 6032 6033 tf_kernel_library( 6034 name = "summary_kernels", 6035 srcs = ["summary_kernels.cc"], 6036 deps = [ 6037 "//tensorflow/contrib/tensorboard/db:schema", 6038 "//tensorflow/contrib/tensorboard/db:summary_db_writer", 6039 "//tensorflow/contrib/tensorboard/db:summary_file_writer", 6040 "//tensorflow/core:framework", 6041 "//tensorflow/core:lib", 6042 "//tensorflow/core:protos_all_cc", 6043 "//tensorflow/core:summary_ops_op_lib", 6044 "//tensorflow/core/lib/db:sqlite", 6045 ], 6046 ) 6047 6048 # ----------------------------------------------------------------------------- 6049 # Google-internal targets. These must be at the end for syncrepo. 6050 6051 filegroup( 6052 name = "all_files", 6053 srcs = glob( 6054 ["**/*"], 6055 exclude = [ 6056 "**/METADATA", 6057 "**/OWNERS", 6058 ], 6059 ), 6060 visibility = ["//tensorflow:__subpackages__"], 6061 ) 6062 6063 # Library to link with when compiling the cwise_op kernels directly, 6064 # e.g. for selective registration. 6065 # should not be linked by projects that also link the cwise_op library. 6066 cc_library( 6067 name = "cwise_lib", 6068 srcs = [ 6069 "cwise_ops_common.cc", 6070 "meta_support.cc", 6071 "quantization_utils.cc", 6072 ], 6073 hdrs = [ 6074 "cwise_ops.h", 6075 "cwise_ops_common.h", 6076 "cwise_ops_gpu_common.cu.h", 6077 "cwise_ops_gpu_gradients.cu.h", 6078 "cwise_ops_gradients.h", 6079 "meta_support.h", 6080 "quantization_utils.h", 6081 ], 6082 deps = [ 6083 ":bounds_check", 6084 "//tensorflow/core:framework", 6085 "//tensorflow/core:lib", 6086 "//third_party/eigen3", 6087 "@gemmlowp", 6088 ], 6089 ) 6090