1 # Description: 2 # XLA service implementation. 3 4 licenses(["notice"]) # Apache 2.0 5 6 package(default_visibility = [":friends"]) 7 8 package_group( 9 name = "friends", 10 includes = [ 11 "//tensorflow/compiler/xla:friends", 12 ], 13 ) 14 15 load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library") 16 load("//tensorflow:tensorflow.bzl", "tf_cc_test") 17 load("//tensorflow:tensorflow.bzl", "tf_cc_binary") 18 19 xla_proto_library( 20 name = "session_proto", 21 srcs = ["session.proto"], 22 visibility = ["//visibility:public"], 23 deps = ["//tensorflow/compiler/xla:xla_data_proto"], 24 ) 25 26 xla_proto_library( 27 name = "hlo_proto", 28 srcs = ["hlo.proto"], 29 deps = ["//tensorflow/compiler/xla:xla_data_proto"], 30 ) 31 32 xla_proto_library( 33 name = "hlo_profile_printer_data", 34 srcs = ["hlo_profile_printer_data.proto"], 35 ) 36 37 # Filegroup used to collect source files for dependency checking. 38 filegroup( 39 name = "c_srcs", 40 data = glob([ 41 "**/*.cc", 42 "**/*.h", 43 ]), 44 ) 45 46 cc_library( 47 name = "bfloat16_support", 48 srcs = ["bfloat16_support.cc"], 49 hdrs = ["bfloat16_support.h"], 50 deps = [ 51 ":hlo", 52 ], 53 ) 54 55 cc_library( 56 name = "bfloat16_conversion_folding", 57 srcs = ["bfloat16_conversion_folding.cc"], 58 hdrs = ["bfloat16_conversion_folding.h"], 59 deps = [ 60 ":bfloat16_support", 61 ":hlo", 62 ":hlo_pass", 63 "//tensorflow/compiler/xla:status_macros", 64 "//tensorflow/compiler/xla:xla_data_proto", 65 "//tensorflow/core:lib", 66 ], 67 ) 68 69 tf_cc_test( 70 name = "bfloat16_conversion_folding_test", 71 srcs = ["bfloat16_conversion_folding_test.cc"], 72 deps = [ 73 ":bfloat16_conversion_folding", 74 ":bfloat16_support", 75 ":hlo", 76 "//tensorflow/compiler/xla:shape_util", 77 "//tensorflow/compiler/xla:status_macros", 78 "//tensorflow/compiler/xla:test", 79 "//tensorflow/compiler/xla:test_helpers", 80 "//tensorflow/compiler/xla:types", 81 "//tensorflow/compiler/xla:xla_data_proto", 82 "//tensorflow/compiler/xla/tests:hlo_test_base", 83 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 84 "//tensorflow/core:lib", 85 ], 86 ) 87 88 cc_library( 89 name = "bfloat16_normalization", 90 srcs = ["bfloat16_normalization.cc"], 91 hdrs = ["bfloat16_normalization.h"], 92 deps = [ 93 ":bfloat16_support", 94 ":hlo", 95 ":hlo_pass", 96 "//tensorflow/compiler/xla:status_macros", 97 "//tensorflow/compiler/xla:xla_data_proto", 98 "//tensorflow/core:lib", 99 ], 100 ) 101 102 tf_cc_test( 103 name = "bfloat16_normalization_test", 104 srcs = ["bfloat16_normalization_test.cc"], 105 deps = [ 106 ":bfloat16_normalization", 107 ":bfloat16_support", 108 ":hlo", 109 "//tensorflow/compiler/xla:shape_util", 110 "//tensorflow/compiler/xla:status_macros", 111 "//tensorflow/compiler/xla:test", 112 "//tensorflow/compiler/xla:test_helpers", 113 "//tensorflow/compiler/xla:types", 114 "//tensorflow/compiler/xla:xla_data_proto", 115 "//tensorflow/compiler/xla/tests:hlo_test_base", 116 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 117 "//tensorflow/core:lib", 118 ], 119 ) 120 121 cc_library( 122 name = "shape_inference", 123 srcs = ["shape_inference.cc"], 124 hdrs = ["shape_inference.h"], 125 deps = [ 126 ":hlo", 127 "//tensorflow/compiler/xla:shape_util", 128 "//tensorflow/compiler/xla:status_macros", 129 "//tensorflow/compiler/xla:statusor", 130 "//tensorflow/compiler/xla:types", 131 "//tensorflow/compiler/xla:util", 132 "//tensorflow/compiler/xla:window_util", 133 "//tensorflow/compiler/xla:xla_data_proto", 134 "//tensorflow/core:lib", 135 ], 136 ) 137 138 tf_cc_test( 139 name = "shape_inference_test", 140 srcs = ["shape_inference_test.cc"], 141 deps = [ 142 ":shape_inference", 143 "//tensorflow/compiler/xla:shape_util", 144 "//tensorflow/compiler/xla:test", 145 "//tensorflow/compiler/xla:test_helpers", 146 "//tensorflow/compiler/xla:types", 147 "//tensorflow/compiler/xla:xla_data_proto", 148 "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep 149 "//tensorflow/core:lib", 150 ], 151 ) 152 153 tf_cc_test( 154 name = "hlo_opcode_test", 155 srcs = ["hlo_opcode_test.cc"], 156 deps = [ 157 ":hlo", 158 "//tensorflow/compiler/xla:test", 159 "//tensorflow/compiler/xla:types", 160 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 161 ], 162 ) 163 164 cc_library( 165 name = "hlo_evaluator", 166 srcs = ["hlo_evaluator.cc"], 167 hdrs = ["hlo_evaluator.h"], 168 deps = [ 169 ":hlo", 170 ":hlo_query", 171 ":shape_inference", 172 "//tensorflow/compiler/xla:literal_util", 173 "//tensorflow/compiler/xla:shape_util", 174 "//tensorflow/compiler/xla:statusor", 175 "//tensorflow/compiler/xla:types", 176 "//tensorflow/compiler/xla:util", 177 "//tensorflow/compiler/xla:window_util", 178 "//tensorflow/compiler/xla:xla_data_proto", 179 "//tensorflow/core:lib", 180 ], 181 ) 182 183 tf_cc_test( 184 name = "hlo_evaluator_test", 185 srcs = ["hlo_evaluator_test.cc"], 186 deps = [ 187 ":hlo", 188 ":hlo_evaluator", 189 "//tensorflow/compiler/xla:literal_util", 190 "//tensorflow/compiler/xla:reference_util", 191 "//tensorflow/compiler/xla:shape_util", 192 "//tensorflow/compiler/xla:status", 193 "//tensorflow/compiler/xla:status_macros", 194 "//tensorflow/compiler/xla:statusor", 195 "//tensorflow/compiler/xla:test", 196 "//tensorflow/compiler/xla:types", 197 "//tensorflow/compiler/xla:util", 198 "//tensorflow/compiler/xla:xla_data_proto", 199 "//tensorflow/compiler/xla/client:computation_builder", 200 "//tensorflow/compiler/xla/service:hlo_element_type_converter", 201 "//tensorflow/compiler/xla/tests:hlo_verified_test_base", 202 "//tensorflow/compiler/xla/tests:literal_test_util", 203 "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep 204 "//tensorflow/core:lib", 205 "//tensorflow/core:test", 206 ], 207 ) 208 209 cc_library( 210 name = "hlo", 211 srcs = [ 212 "dfs_hlo_visitor.cc", 213 "hlo_computation.cc", 214 "hlo_instruction.cc", 215 "hlo_module.cc", 216 "hlo_opcode.cc", 217 "hlo_sharding.cc", 218 ], 219 hdrs = [ 220 "dfs_hlo_visitor.h", 221 "dfs_hlo_visitor_with_default.h", 222 "hlo_computation.h", 223 "hlo_instruction.h", 224 "hlo_module.h", 225 "hlo_opcode.h", 226 "hlo_sharding.h", 227 ], 228 deps = [ 229 ":hlo_module_config", 230 ":hlo_proto", 231 ":hlo_reachability", 232 ":name_uniquer", 233 ":versioned_computation_handle", 234 "//tensorflow/compiler/xla:array", 235 "//tensorflow/compiler/xla:literal_util", 236 "//tensorflow/compiler/xla:protobuf_util", 237 "//tensorflow/compiler/xla:shape_tree", 238 "//tensorflow/compiler/xla:shape_util", 239 "//tensorflow/compiler/xla:status", 240 "//tensorflow/compiler/xla:status_macros", 241 "//tensorflow/compiler/xla:statusor", 242 "//tensorflow/compiler/xla:types", 243 "//tensorflow/compiler/xla:util", 244 "//tensorflow/compiler/xla:window_util", 245 "//tensorflow/compiler/xla:xla_data_proto", 246 "//tensorflow/core:lib", 247 "//tensorflow/core:lib_internal", 248 ], 249 ) 250 251 cc_library( 252 name = "hlo_reachability", 253 srcs = ["hlo_reachability.cc"], 254 hdrs = ["hlo_reachability.h"], 255 deps = [ 256 "//tensorflow/compiler/xla:types", 257 "//tensorflow/compiler/xla:util", 258 "//tensorflow/core:lib", 259 "//tensorflow/core:lib_internal", 260 ], 261 ) 262 263 tf_cc_test( 264 name = "hlo_reachability_test", 265 srcs = ["hlo_reachability_test.cc"], 266 deps = [ 267 ":hlo", 268 ":hlo_reachability", 269 "//tensorflow/compiler/xla:test", 270 "//tensorflow/compiler/xla:test_helpers", 271 "//tensorflow/compiler/xla/tests:hlo_test_base", 272 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 273 ], 274 ) 275 276 cc_library( 277 name = "hlo_matchers", 278 testonly = 1, 279 srcs = ["hlo_matchers.cc"], 280 hdrs = ["hlo_matchers.h"], 281 deps = [ 282 ":hlo", 283 "//tensorflow/compiler/xla:test", 284 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 285 ], 286 ) 287 288 tf_cc_test( 289 name = "hlo_matchers_test", 290 srcs = ["hlo_matchers_test.cc"], 291 deps = [ 292 ":hlo_matchers", 293 "//tensorflow/compiler/xla:shape_util", 294 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 295 ], 296 ) 297 298 cc_library( 299 name = "versioned_computation_handle", 300 srcs = ["versioned_computation_handle.cc"], 301 hdrs = ["versioned_computation_handle.h"], 302 deps = [ 303 "//tensorflow/compiler/xla:types", 304 "//tensorflow/compiler/xla:xla_data_proto", 305 "//tensorflow/core:lib", 306 ], 307 ) 308 309 tf_cc_test( 310 name = "hlo_instruction_test", 311 srcs = ["hlo_instruction_test.cc"], 312 deps = [ 313 ":hlo", 314 "//tensorflow/compiler/xla:literal_util", 315 "//tensorflow/compiler/xla:protobuf_util", 316 "//tensorflow/compiler/xla:shape_util", 317 "//tensorflow/compiler/xla:test", 318 "//tensorflow/compiler/xla:test_helpers", 319 "//tensorflow/compiler/xla:util", 320 "//tensorflow/compiler/xla/tests:hlo_test_base", 321 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 322 ], 323 ) 324 325 tf_cc_test( 326 name = "hlo_sharding_test", 327 srcs = ["hlo_sharding_test.cc"], 328 deps = [ 329 ":hlo", 330 "//tensorflow/compiler/xla:literal_util", 331 "//tensorflow/compiler/xla:protobuf_util", 332 "//tensorflow/compiler/xla:shape_util", 333 "//tensorflow/compiler/xla:test", 334 "//tensorflow/compiler/xla:test_helpers", 335 "//tensorflow/compiler/xla:util", 336 "//tensorflow/compiler/xla/tests:hlo_test_base", 337 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 338 ], 339 ) 340 341 cc_library( 342 name = "call_graph", 343 srcs = ["call_graph.cc"], 344 hdrs = ["call_graph.h"], 345 deps = [ 346 ":hlo", 347 "//tensorflow/compiler/xla:status_macros", 348 "//tensorflow/compiler/xla:util", 349 "//tensorflow/core:lib", 350 ], 351 ) 352 353 tf_cc_test( 354 name = "call_graph_test", 355 srcs = ["call_graph_test.cc"], 356 deps = [ 357 ":call_graph", 358 "//tensorflow/compiler/xla:literal_util", 359 "//tensorflow/compiler/xla:shape_util", 360 "//tensorflow/compiler/xla:status_macros", 361 "//tensorflow/compiler/xla:test", 362 "//tensorflow/compiler/xla:test_helpers", 363 "//tensorflow/compiler/xla:util", 364 "//tensorflow/compiler/xla:xla_data_proto", 365 "//tensorflow/compiler/xla/service:hlo", 366 "//tensorflow/compiler/xla/tests:hlo_test_base", 367 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 368 "//tensorflow/core:test", 369 ], 370 ) 371 372 cc_library( 373 name = "flatten_call_graph", 374 srcs = ["flatten_call_graph.cc"], 375 hdrs = ["flatten_call_graph.h"], 376 deps = [ 377 ":call_graph", 378 ":hlo", 379 ":hlo_pass", 380 "//tensorflow/compiler/xla:statusor", 381 "//tensorflow/compiler/xla:util", 382 "//tensorflow/core:lib", 383 ], 384 ) 385 386 cc_library( 387 name = "call_inliner", 388 srcs = ["call_inliner.cc"], 389 hdrs = ["call_inliner.h"], 390 deps = [ 391 ":call_graph", 392 ":hlo_pass", 393 "//tensorflow/compiler/xla:statusor", 394 "//tensorflow/core:lib", 395 ], 396 ) 397 398 tf_cc_test( 399 name = "call_inliner_test", 400 size = "small", 401 srcs = ["call_inliner_test.cc"], 402 deps = [ 403 ":call_inliner", 404 ":hlo", 405 ":hlo_matchers", 406 ":hlo_pass", 407 "//tensorflow/compiler/xla:literal_util", 408 "//tensorflow/compiler/xla:shape_util", 409 "//tensorflow/compiler/xla:test", 410 "//tensorflow/compiler/xla:types", 411 "//tensorflow/compiler/xla:util", 412 "//tensorflow/compiler/xla:xla_data_proto", 413 "//tensorflow/compiler/xla/tests:hlo_test_base", 414 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 415 "//tensorflow/core:lib", 416 "//tensorflow/core:test", 417 ], 418 ) 419 420 tf_cc_test( 421 name = "flatten_call_graph_test", 422 srcs = ["flatten_call_graph_test.cc"], 423 deps = [ 424 ":call_graph", 425 ":flatten_call_graph", 426 "//tensorflow/compiler/xla:literal_util", 427 "//tensorflow/compiler/xla:shape_util", 428 "//tensorflow/compiler/xla:status_macros", 429 "//tensorflow/compiler/xla:test", 430 "//tensorflow/compiler/xla:test_helpers", 431 "//tensorflow/compiler/xla:util", 432 "//tensorflow/compiler/xla:xla_data_proto", 433 "//tensorflow/compiler/xla/service:hlo", 434 "//tensorflow/compiler/xla/tests:hlo_test_base", 435 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 436 "//tensorflow/core:test", 437 ], 438 ) 439 440 cc_library( 441 name = "user_computation", 442 srcs = ["user_computation.cc"], 443 hdrs = ["user_computation.h"], 444 deps = [ 445 ":hlo", 446 ":session_proto", 447 ":shape_inference", 448 ":versioned_computation_handle", 449 "//tensorflow/compiler/xla:literal_util", 450 "//tensorflow/compiler/xla:shape_util", 451 "//tensorflow/compiler/xla:status_macros", 452 "//tensorflow/compiler/xla:statusor", 453 "//tensorflow/compiler/xla:types", 454 "//tensorflow/compiler/xla:util", 455 "//tensorflow/compiler/xla:xla_data_proto", 456 "//tensorflow/compiler/xla:xla_proto", 457 "//tensorflow/core:lib", 458 ], 459 ) 460 461 tf_cc_test( 462 name = "user_computation_test", 463 srcs = ["user_computation_test.cc"], 464 deps = [ 465 ":hlo_matchers", 466 ":user_computation", 467 "//tensorflow/compiler/xla:literal_util", 468 "//tensorflow/compiler/xla:shape_util", 469 "//tensorflow/compiler/xla:status_macros", 470 "//tensorflow/compiler/xla:test", 471 "//tensorflow/compiler/xla:test_helpers", 472 "//tensorflow/compiler/xla:xla_data_proto", 473 "//tensorflow/compiler/xla/service:hlo", 474 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 475 "//tensorflow/core:test", 476 ], 477 ) 478 479 cc_library( 480 name = "platform_util", 481 srcs = ["platform_util.cc"], 482 hdrs = ["platform_util.h"], 483 deps = [ 484 ":compiler", 485 "//tensorflow/compiler/xla:status_macros", 486 "//tensorflow/compiler/xla:statusor", 487 "//tensorflow/compiler/xla:types", 488 "//tensorflow/compiler/xla:util", 489 "//tensorflow/core:lib", 490 "//tensorflow/core:stream_executor_no_cuda", 491 ], 492 ) 493 494 cc_library( 495 name = "backend", 496 srcs = ["backend.cc"], 497 hdrs = ["backend.h"], 498 deps = [ 499 ":compiler", 500 ":computation_placer", 501 ":device_memory_allocator", 502 ":platform_util", 503 ":pool", 504 ":transfer_manager", 505 "//tensorflow/compiler/xla:status_macros", 506 "//tensorflow/compiler/xla:statusor", 507 "//tensorflow/compiler/xla:types", 508 "//tensorflow/compiler/xla:util", 509 "//tensorflow/core:core_cpu_internal", 510 "//tensorflow/core:lib", 511 "//tensorflow/core:stream_executor_no_cuda", 512 "//third_party/eigen3", 513 ], 514 ) 515 516 cc_library( 517 name = "service", 518 srcs = ["service.cc"], 519 hdrs = ["service.h"], 520 deps = [ 521 ":allocation_tracker", 522 ":backend", 523 ":channel_tracker", 524 ":compilation_cache", 525 ":compiler", 526 ":computation_layout", 527 ":computation_tracker", 528 ":device_memory_allocator", 529 ":executable", 530 ":execution_tracker", 531 ":hlo", 532 ":hlo_cost_analysis", 533 ":hlo_evaluator", 534 ":hlo_execution_profile", 535 ":hlo_module_config", 536 ":hlo_proto_util", 537 ":platform_util", 538 ":session_proto", 539 ":source_map_util", 540 ":transfer_manager", 541 ":user_computation", 542 ":versioned_computation_handle", 543 "//tensorflow/compiler/xla:executable_run_options", 544 "//tensorflow/compiler/xla:execution_options_util", 545 "//tensorflow/compiler/xla:service_interface", 546 "//tensorflow/compiler/xla:shape_layout", 547 "//tensorflow/compiler/xla:shape_util", 548 "//tensorflow/compiler/xla:status_macros", 549 "//tensorflow/compiler/xla:statusor", 550 "//tensorflow/compiler/xla:types", 551 "//tensorflow/compiler/xla:util", 552 "//tensorflow/compiler/xla:xla_data_proto", 553 "//tensorflow/compiler/xla:xla_proto", 554 "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", 555 "//tensorflow/core:lib", 556 "//tensorflow/core:stream_executor_no_cuda", 557 ], 558 alwayslink = 1, 559 ) 560 561 cc_library( 562 name = "local_service", 563 srcs = ["local_service.cc"], 564 hdrs = ["local_service.h"], 565 deps = [ 566 ":backend", 567 ":compiler", 568 ":computation_layout", 569 ":computation_tracker", 570 ":device_memory_allocator", 571 ":executable", 572 ":hlo", 573 ":hlo_execution_profile", 574 ":hlo_module_config", 575 ":platform_util", 576 ":service", 577 ":shaped_buffer", 578 ":user_computation", 579 ":versioned_computation_handle", 580 "//tensorflow/compiler/xla:execution_options_util", 581 "//tensorflow/compiler/xla:shape_layout", 582 "//tensorflow/compiler/xla:shape_util", 583 "//tensorflow/compiler/xla:status_macros", 584 "//tensorflow/compiler/xla:statusor", 585 "//tensorflow/compiler/xla:types", 586 "//tensorflow/compiler/xla:util", 587 "//tensorflow/compiler/xla:xla_data_proto", 588 "//tensorflow/compiler/xla/client:executable_build_options", 589 "//tensorflow/core:lib", 590 "//tensorflow/core:stream_executor_no_cuda", 591 ], 592 ) 593 594 cc_library( 595 name = "compile_only_service", 596 srcs = ["compile_only_service.cc"], 597 hdrs = ["compile_only_service.h"], 598 deps = [ 599 ":backend", 600 ":compiler", 601 ":computation_layout", 602 ":computation_tracker", 603 ":platform_util", 604 ":service", 605 "//tensorflow/compiler/xla:status_macros", 606 "//tensorflow/compiler/xla:statusor", 607 "//tensorflow/compiler/xla:types", 608 "//tensorflow/compiler/xla:util", 609 "//tensorflow/compiler/xla:xla_data_proto", 610 "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", 611 "//tensorflow/core:lib", 612 "//tensorflow/core:lib_internal", 613 "//tensorflow/core:stream_executor_no_cuda", 614 ], 615 ) 616 617 cc_library( 618 name = "cpu_plugin", 619 deps = [ 620 ":service", 621 "//tensorflow/compiler/xla/service/cpu:cpu_compiler", 622 "//tensorflow/compiler/xla/service/cpu:cpu_transfer_manager", 623 "//tensorflow/core:stream_executor_no_cuda", 624 ], 625 ) 626 627 cc_library( 628 name = "gpu_plugin", 629 deps = [ 630 ":service", 631 "//tensorflow/compiler/xla/service/gpu:gpu_compiler", 632 "//tensorflow/compiler/xla/service/gpu:gpu_transfer_manager", 633 "//tensorflow/core:stream_executor_no_cuda", 634 "//tensorflow/core/platform/default/build_config:stream_executor_cuda", 635 ], 636 ) 637 638 cc_library( 639 name = "interpreter_plugin", 640 deps = [ 641 ":service", 642 "//tensorflow/compiler/xla/service/interpreter:compiler", 643 "//tensorflow/compiler/xla/service/interpreter:interpreter_transfer_manager", 644 "//tensorflow/compiler/xla/service/interpreter:platform", 645 "//tensorflow/core:stream_executor_no_cuda", 646 ], 647 ) 648 649 cc_library( 650 name = "shaped_buffer", 651 srcs = ["shaped_buffer.cc"], 652 hdrs = ["shaped_buffer.h"], 653 deps = [ 654 ":device_memory_allocator", 655 "//tensorflow/compiler/xla:shape_tree", 656 "//tensorflow/compiler/xla:shape_util", 657 "//tensorflow/compiler/xla:status_macros", 658 "//tensorflow/compiler/xla:statusor", 659 "//tensorflow/compiler/xla:types", 660 "//tensorflow/compiler/xla:util", 661 "//tensorflow/compiler/xla:xla_data_proto", 662 "//tensorflow/core:lib", 663 "//tensorflow/core:stream_executor_no_cuda", 664 ], 665 ) 666 667 cc_library( 668 name = "executable", 669 srcs = ["executable.cc"], 670 hdrs = [ 671 "executable.h", 672 "service_executable_run_options.h", 673 ], 674 deps = [ 675 ":computation_layout", 676 ":device_memory_allocator", 677 ":hlo", 678 ":hlo_cost_analysis", 679 ":hlo_execution_profile", 680 ":hlo_graph_dumper", 681 ":pool", 682 ":session_proto", 683 ":shaped_buffer", 684 ":versioned_computation_handle", 685 "//tensorflow/compiler/xla:executable_run_options", 686 "//tensorflow/compiler/xla:status", 687 "//tensorflow/compiler/xla:status_macros", 688 "//tensorflow/compiler/xla:statusor", 689 "//tensorflow/compiler/xla:util", 690 "//tensorflow/compiler/xla:xla_data_proto", 691 "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", 692 "//tensorflow/core:lib", 693 "//tensorflow/core:lib_internal", 694 "//tensorflow/core:stream_executor_no_cuda", 695 "//tensorflow/stream_executor", 696 ], 697 ) 698 699 cc_library( 700 name = "compiler", 701 srcs = ["compiler.cc"], 702 hdrs = ["compiler.h"], 703 deps = [ 704 ":executable", 705 ":hlo", 706 ":hlo_module_config", 707 ":logical_buffer", 708 "//tensorflow/compiler/xla:statusor", 709 "//tensorflow/compiler/xla:types", 710 "//tensorflow/compiler/xla:util", 711 "//tensorflow/core:lib", 712 "//tensorflow/core:stream_executor_no_cuda", 713 ], 714 ) 715 716 cc_library( 717 name = "llvm_compiler", 718 srcs = ["llvm_compiler.cc"], 719 hdrs = ["llvm_compiler.h"], 720 deps = [ 721 ":compiler", 722 "//tensorflow/core:lib_internal", 723 "@llvm//:core", 724 ], 725 ) 726 727 cc_library( 728 name = "transfer_manager", 729 srcs = ["transfer_manager.cc"], 730 hdrs = ["transfer_manager.h"], 731 deps = [ 732 ":shaped_buffer", 733 "//tensorflow/compiler/xla:literal_util", 734 "//tensorflow/compiler/xla:shape_util", 735 "//tensorflow/compiler/xla:status_macros", 736 "//tensorflow/compiler/xla:statusor", 737 "//tensorflow/compiler/xla:types", 738 "//tensorflow/compiler/xla:util", 739 "//tensorflow/compiler/xla:xla_data_proto", 740 "//tensorflow/core:lib", 741 "//tensorflow/core:stream_executor_no_cuda", 742 ], 743 ) 744 745 cc_library( 746 name = "allocation_tracker", 747 srcs = ["allocation_tracker.cc"], 748 hdrs = ["allocation_tracker.h"], 749 deps = [ 750 ":backend", 751 ":device_memory_allocator", 752 ":transfer_manager", 753 "//tensorflow/compiler/xla:shape_util", 754 "//tensorflow/compiler/xla:status_macros", 755 "//tensorflow/compiler/xla:statusor", 756 "//tensorflow/compiler/xla:types", 757 "//tensorflow/compiler/xla:util", 758 "//tensorflow/compiler/xla:xla_data_proto", 759 "//tensorflow/core:lib", 760 "//tensorflow/core:stream_executor_no_cuda", 761 ], 762 ) 763 764 cc_library( 765 name = "execution_tracker", 766 srcs = ["execution_tracker.cc"], 767 hdrs = ["execution_tracker.h"], 768 deps = [ 769 ":backend", 770 ":pool", 771 "//tensorflow/compiler/xla:executable_run_options", 772 "//tensorflow/compiler/xla:statusor", 773 "//tensorflow/compiler/xla:util", 774 "//tensorflow/compiler/xla:xla_data_proto", 775 "//tensorflow/core:lib", 776 "//tensorflow/core:stream_executor_no_cuda", 777 ], 778 ) 779 780 cc_library( 781 name = "computation_tracker", 782 srcs = ["computation_tracker.cc"], 783 hdrs = ["computation_tracker.h"], 784 deps = [ 785 ":hlo", 786 ":hlo_module_config", 787 ":session_proto", 788 ":user_computation", 789 ":versioned_computation_handle", 790 "//tensorflow/compiler/xla:status_macros", 791 "//tensorflow/compiler/xla:statusor", 792 "//tensorflow/compiler/xla:types", 793 "//tensorflow/compiler/xla:util", 794 "//tensorflow/compiler/xla:xla_data_proto", 795 "//tensorflow/core:lib", 796 ], 797 ) 798 799 cc_library( 800 name = "channel_tracker", 801 srcs = ["channel_tracker.cc"], 802 hdrs = ["channel_tracker.h"], 803 deps = [ 804 ":hlo", 805 ":session_proto", 806 ":user_computation", 807 ":versioned_computation_handle", 808 "//tensorflow/compiler/xla:status", 809 "//tensorflow/compiler/xla:status_macros", 810 "//tensorflow/compiler/xla:statusor", 811 "//tensorflow/compiler/xla:types", 812 "//tensorflow/compiler/xla:util", 813 "//tensorflow/compiler/xla:xla_data_proto", 814 "//tensorflow/core:lib", 815 "//tensorflow/core:lib_internal", 816 ], 817 ) 818 819 cc_library( 820 name = "name_uniquer", 821 srcs = ["name_uniquer.cc"], 822 hdrs = ["name_uniquer.h"], 823 deps = [ 824 "//tensorflow/compiler/xla:types", 825 "//tensorflow/core:lib", 826 ], 827 ) 828 829 tf_cc_test( 830 name = "name_uniquer_test", 831 srcs = ["name_uniquer_test.cc"], 832 deps = [ 833 ":name_uniquer", 834 "//tensorflow/compiler/xla:test", 835 "//tensorflow/compiler/xla:test_helpers", 836 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 837 "//tensorflow/core:test", 838 ], 839 ) 840 841 cc_library( 842 name = "liveness_util", 843 srcs = ["liveness_util.cc"], 844 hdrs = ["liveness_util.h"], 845 deps = [ 846 ":hlo", 847 ":hlo_dataflow_analysis", 848 ":logical_buffer", 849 ":tuple_points_to_analysis", 850 "//tensorflow/compiler/xla:shape_util", 851 "//tensorflow/compiler/xla:types", 852 "//tensorflow/compiler/xla:util", 853 ], 854 ) 855 856 tf_cc_test( 857 name = "liveness_util_test", 858 srcs = ["liveness_util_test.cc"], 859 deps = [ 860 ":hlo", 861 ":liveness_util", 862 ":tuple_points_to_analysis", 863 "//tensorflow/compiler/xla/tests:hlo_test_base", 864 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 865 ], 866 ) 867 868 cc_library( 869 name = "buffer_liveness", 870 srcs = [ 871 "buffer_liveness.cc", 872 ], 873 hdrs = [ 874 "buffer_liveness.h", 875 ], 876 deps = [ 877 ":hlo", 878 ":hlo_ordering", 879 ":liveness_util", 880 ":logical_buffer", 881 ":tuple_points_to_analysis", 882 "//tensorflow/compiler/xla:shape_util", 883 "//tensorflow/compiler/xla:status_macros", 884 "//tensorflow/compiler/xla:statusor", 885 "//tensorflow/compiler/xla:types", 886 "//tensorflow/compiler/xla:util", 887 "//tensorflow/core:lib", 888 ], 889 ) 890 891 tf_cc_test( 892 name = "buffer_liveness_test", 893 srcs = ["buffer_liveness_test.cc"], 894 deps = [ 895 ":buffer_liveness", 896 ":hlo", 897 "//tensorflow/compiler/xla:shape_util", 898 "//tensorflow/compiler/xla:types", 899 "//tensorflow/compiler/xla:util", 900 "//tensorflow/compiler/xla:xla_data_proto", 901 "//tensorflow/compiler/xla/tests:hlo_test_base", 902 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 903 ], 904 ) 905 906 cc_library( 907 name = "buffer_assignment", 908 srcs = [ 909 "buffer_assignment.cc", 910 ], 911 hdrs = [ 912 "buffer_assignment.h", 913 ], 914 deps = [ 915 ":buffer_liveness", 916 ":heap_simulator", 917 ":hlo", 918 ":hlo_proto", 919 ":hlo_scheduling", 920 ":logical_buffer", 921 ":tuple_points_to_analysis", 922 "//tensorflow/compiler/xla:shape_util", 923 "//tensorflow/compiler/xla:status_macros", 924 "//tensorflow/compiler/xla:statusor", 925 "//tensorflow/compiler/xla:types", 926 "//tensorflow/compiler/xla:util", 927 "//tensorflow/compiler/xla:xla_data_proto", 928 "//tensorflow/core:lib", 929 "//tensorflow/core:lib_internal", 930 ], 931 ) 932 933 tf_cc_test( 934 name = "buffer_assignment_test", 935 srcs = ["buffer_assignment_test.cc"], 936 deps = [ 937 ":buffer_assignment", 938 ":call_graph", 939 ":computation_tracker", 940 ":copy_insertion", 941 ":cpu_plugin", 942 ":flatten_call_graph", 943 ":hlo", 944 ":hlo_ordering", 945 ":hlo_scheduling", 946 "//tensorflow/compiler/xla:literal_util", 947 "//tensorflow/compiler/xla:shape_util", 948 "//tensorflow/compiler/xla:test", 949 "//tensorflow/compiler/xla:test_helpers", 950 "//tensorflow/compiler/xla:types", 951 "//tensorflow/compiler/xla:util", 952 "//tensorflow/compiler/xla:xla_data_proto", 953 "//tensorflow/compiler/xla/tests:hlo_test_base", 954 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 955 "//tensorflow/core:lib", 956 ], 957 ) 958 959 cc_library( 960 name = "hlo_ordering", 961 srcs = ["hlo_ordering.cc"], 962 hdrs = ["hlo_ordering.h"], 963 deps = [ 964 ":call_graph", 965 ":hlo", 966 ":hlo_dataflow_analysis", 967 ":hlo_proto", 968 ":hlo_value", 969 ":liveness_util", 970 "//tensorflow/compiler/xla:shape_util", 971 "//tensorflow/compiler/xla:status_macros", 972 "//tensorflow/compiler/xla:statusor", 973 "//tensorflow/compiler/xla:types", 974 "//tensorflow/compiler/xla:util", 975 "//tensorflow/core:lib", 976 ], 977 ) 978 979 tf_cc_test( 980 name = "hlo_ordering_test", 981 size = "small", 982 srcs = ["hlo_ordering_test.cc"], 983 deps = [ 984 ":hlo", 985 ":hlo_dataflow_analysis", 986 ":hlo_ordering", 987 ":hlo_scheduling", 988 "//tensorflow/compiler/xla:shape_util", 989 "//tensorflow/compiler/xla:types", 990 "//tensorflow/compiler/xla:xla_data_proto", 991 "//tensorflow/compiler/xla/tests:hlo_test_base", 992 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 993 "//tensorflow/compiler/xla/tools/parser:hlo_parser", 994 ], 995 ) 996 997 cc_library( 998 name = "heap_simulator", 999 srcs = ["heap_simulator.cc"], 1000 hdrs = ["heap_simulator.h"], 1001 deps = [ 1002 ":hlo", 1003 ":hlo_ordering", 1004 ":hlo_proto", 1005 ":liveness_util", 1006 ":logical_buffer", 1007 ":tuple_points_to_analysis", 1008 "//tensorflow/compiler/xla:statusor", 1009 "//tensorflow/compiler/xla:util", 1010 "//tensorflow/core:lib", 1011 ], 1012 ) 1013 1014 tf_cc_test( 1015 name = "heap_simulator_test", 1016 srcs = ["heap_simulator_test.cc"], 1017 deps = [ 1018 ":heap_simulator", 1019 ":hlo", 1020 ":hlo_ordering", 1021 ":logical_buffer", 1022 ":tuple_points_to_analysis", 1023 "//tensorflow/compiler/xla:literal_util", 1024 "//tensorflow/compiler/xla:status_macros", 1025 "//tensorflow/compiler/xla/tests:hlo_test_base", 1026 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1027 "//tensorflow/core:lib", 1028 ], 1029 ) 1030 1031 cc_library( 1032 name = "hlo_scheduling", 1033 srcs = ["hlo_scheduling.cc"], 1034 hdrs = ["hlo_scheduling.h"], 1035 deps = [ 1036 ":heap_simulator", 1037 ":hlo", 1038 ":hlo_ordering", 1039 ":logical_buffer", 1040 ":tuple_points_to_analysis", 1041 "//tensorflow/compiler/xla:shape_util", 1042 "//tensorflow/compiler/xla:status_macros", 1043 "//tensorflow/compiler/xla:statusor", 1044 "//tensorflow/compiler/xla:types", 1045 "//tensorflow/compiler/xla:util", 1046 "//tensorflow/core:lib", 1047 ], 1048 ) 1049 1050 tf_cc_test( 1051 name = "hlo_scheduling_test", 1052 srcs = ["hlo_scheduling_test.cc"], 1053 deps = [ 1054 ":hlo", 1055 ":hlo_ordering", 1056 ":hlo_scheduling", 1057 "//tensorflow/compiler/xla:shape_util", 1058 "//tensorflow/compiler/xla:types", 1059 "//tensorflow/compiler/xla:xla_data_proto", 1060 "//tensorflow/compiler/xla/tests:hlo_test_base", 1061 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1062 ], 1063 ) 1064 1065 cc_library( 1066 name = "hlo_query", 1067 srcs = ["hlo_query.cc"], 1068 hdrs = ["hlo_query.h"], 1069 deps = [ 1070 ":hlo", 1071 "//tensorflow/compiler/xla:literal_util", 1072 "//tensorflow/compiler/xla:shape_util", 1073 ], 1074 ) 1075 1076 cc_library( 1077 name = "instruction_fusion", 1078 srcs = ["instruction_fusion.cc"], 1079 hdrs = ["instruction_fusion.h"], 1080 deps = [ 1081 ":hlo", 1082 ":hlo_pass", 1083 "//tensorflow/compiler/xla:util", 1084 "//tensorflow/core:lib", 1085 ], 1086 ) 1087 1088 tf_cc_test( 1089 name = "instruction_fusion_test", 1090 srcs = ["instruction_fusion_test.cc"], 1091 deps = [ 1092 ":hlo_matchers", 1093 ":instruction_fusion", 1094 "//tensorflow/compiler/xla/tests:hlo_test_base", 1095 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1096 ], 1097 ) 1098 1099 cc_library( 1100 name = "batchnorm_expander", 1101 srcs = ["batchnorm_expander.cc"], 1102 hdrs = ["batchnorm_expander.h"], 1103 deps = [ 1104 ":hlo", 1105 ":hlo_pass", 1106 ":hlo_query", 1107 ":shape_inference", 1108 "//tensorflow/compiler/xla:literal_util", 1109 "//tensorflow/compiler/xla:shape_util", 1110 "//tensorflow/compiler/xla:status_macros", 1111 "//tensorflow/compiler/xla:types", 1112 "//tensorflow/compiler/xla:util", 1113 "//tensorflow/compiler/xla:window_util", 1114 "//tensorflow/compiler/xla:xla_data_proto", 1115 "//tensorflow/core:lib", 1116 ], 1117 ) 1118 1119 tf_cc_test( 1120 name = "batchnorm_expander_test", 1121 size = "small", 1122 srcs = ["batchnorm_expander_test.cc"], 1123 deps = [ 1124 ":batchnorm_expander", 1125 ":hlo", 1126 ":hlo_matchers", 1127 ":hlo_pass", 1128 "//tensorflow/compiler/xla:literal_util", 1129 "//tensorflow/compiler/xla:shape_util", 1130 "//tensorflow/compiler/xla:test", 1131 "//tensorflow/compiler/xla:types", 1132 "//tensorflow/compiler/xla:util", 1133 "//tensorflow/compiler/xla:xla_data_proto", 1134 "//tensorflow/compiler/xla/tests:hlo_test_base", 1135 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1136 "//tensorflow/core:lib", 1137 ], 1138 ) 1139 1140 cc_library( 1141 name = "algebraic_simplifier", 1142 srcs = ["algebraic_simplifier.cc"], 1143 hdrs = ["algebraic_simplifier.h"], 1144 deps = [ 1145 ":hlo", 1146 ":hlo_pass", 1147 ":hlo_query", 1148 ":shape_inference", 1149 "//tensorflow/compiler/xla:literal_util", 1150 "//tensorflow/compiler/xla:shape_util", 1151 "//tensorflow/compiler/xla:status_macros", 1152 "//tensorflow/compiler/xla:types", 1153 "//tensorflow/compiler/xla:util", 1154 "//tensorflow/compiler/xla:window_util", 1155 "//tensorflow/compiler/xla:xla_data_proto", 1156 "//tensorflow/core:lib", 1157 ], 1158 ) 1159 1160 tf_cc_test( 1161 name = "algebraic_simplifier_test", 1162 srcs = ["algebraic_simplifier_test.cc"], 1163 deps = [ 1164 ":algebraic_simplifier", 1165 ":hlo", 1166 ":hlo_matchers", 1167 ":hlo_pass", 1168 "//tensorflow/compiler/xla:literal_util", 1169 "//tensorflow/compiler/xla:shape_util", 1170 "//tensorflow/compiler/xla:test", 1171 "//tensorflow/compiler/xla:types", 1172 "//tensorflow/compiler/xla:util", 1173 "//tensorflow/compiler/xla:window_util", 1174 "//tensorflow/compiler/xla:xla_data_proto", 1175 "//tensorflow/compiler/xla/tests:hlo_verified_test_base", 1176 "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep 1177 "//tensorflow/core:lib", 1178 "//tensorflow/core:test", 1179 ], 1180 ) 1181 1182 cc_library( 1183 name = "while_loop_simplifier", 1184 srcs = ["while_loop_simplifier.cc"], 1185 hdrs = ["while_loop_simplifier.h"], 1186 deps = [ 1187 ":call_inliner", 1188 ":hlo", 1189 ":hlo_evaluator", 1190 ":hlo_pass", 1191 "//tensorflow/compiler/xla:statusor", 1192 "//tensorflow/core:lib", 1193 ], 1194 ) 1195 1196 tf_cc_test( 1197 name = "while_loop_simplifier_test", 1198 srcs = ["while_loop_simplifier_test.cc"], 1199 deps = [ 1200 ":hlo_matchers", 1201 ":while_loop_simplifier", 1202 "//tensorflow/compiler/xla:test", 1203 "//tensorflow/compiler/xla/tests:hlo_verified_test_base", 1204 "//tensorflow/core:test", 1205 ], 1206 ) 1207 1208 cc_library( 1209 name = "defuser", 1210 srcs = ["defuser.cc"], 1211 hdrs = ["defuser.h"], 1212 deps = [ 1213 ":call_graph", 1214 ":hlo", 1215 ":hlo_pass", 1216 "//tensorflow/compiler/xla:status_macros", 1217 "//tensorflow/compiler/xla:types", 1218 "//tensorflow/compiler/xla:util", 1219 "//tensorflow/core:lib", 1220 ], 1221 ) 1222 1223 tf_cc_test( 1224 name = "defuser_test", 1225 srcs = ["defuser_test.cc"], 1226 deps = [ 1227 ":defuser", 1228 ":hlo_matchers", 1229 "//tensorflow/compiler/xla:literal_util", 1230 "//tensorflow/compiler/xla:shape_util", 1231 "//tensorflow/compiler/xla/tests:hlo_verified_test_base", 1232 ], 1233 ) 1234 1235 cc_library( 1236 name = "implicit_broadcast_remover", 1237 srcs = ["implicit_broadcast_remover.cc"], 1238 hdrs = ["implicit_broadcast_remover.h"], 1239 deps = [ 1240 ":hlo", 1241 ":hlo_dce", 1242 ":hlo_pass", 1243 "//tensorflow/compiler/xla:shape_util", 1244 "//tensorflow/compiler/xla:status_macros", 1245 "//tensorflow/compiler/xla:types", 1246 "//tensorflow/compiler/xla:util", 1247 "//tensorflow/core:lib", 1248 ], 1249 ) 1250 1251 tf_cc_test( 1252 name = "implicit_broadcast_remover_test", 1253 srcs = ["implicit_broadcast_remover_test.cc"], 1254 deps = [ 1255 ":hlo_matchers", 1256 ":implicit_broadcast_remover", 1257 "//tensorflow/compiler/xla:literal_util", 1258 "//tensorflow/compiler/xla:shape_util", 1259 "//tensorflow/compiler/xla/tests:hlo_verified_test_base", 1260 ], 1261 ) 1262 1263 cc_library( 1264 name = "dot_decomposer", 1265 srcs = ["dot_decomposer.cc"], 1266 hdrs = ["dot_decomposer.h"], 1267 deps = [ 1268 ":hlo", 1269 ":hlo_pass", 1270 "//tensorflow/compiler/xla:shape_util", 1271 "//tensorflow/compiler/xla:status_macros", 1272 "//tensorflow/compiler/xla:types", 1273 "//tensorflow/compiler/xla:xla_data_proto", 1274 "//tensorflow/core:lib", 1275 ], 1276 ) 1277 1278 cc_library( 1279 name = "tuple_simplifier", 1280 srcs = ["tuple_simplifier.cc"], 1281 hdrs = ["tuple_simplifier.h"], 1282 deps = [ 1283 ":hlo", 1284 ":hlo_pass", 1285 "//tensorflow/compiler/xla:status_macros", 1286 "//tensorflow/compiler/xla:types", 1287 "//tensorflow/compiler/xla:util", 1288 "//tensorflow/core:lib", 1289 ], 1290 ) 1291 1292 tf_cc_test( 1293 name = "tuple_simplifier_test", 1294 srcs = ["tuple_simplifier_test.cc"], 1295 deps = [ 1296 ":hlo", 1297 ":hlo_matchers", 1298 ":tuple_simplifier", 1299 "//tensorflow/compiler/xla:literal_util", 1300 "//tensorflow/compiler/xla:shape_util", 1301 "//tensorflow/compiler/xla:test", 1302 "//tensorflow/compiler/xla:types", 1303 "//tensorflow/compiler/xla/tests:hlo_test_base", 1304 "//tensorflow/core:test", 1305 ], 1306 ) 1307 1308 cc_library( 1309 name = "reshape_mover", 1310 srcs = ["reshape_mover.cc"], 1311 hdrs = ["reshape_mover.h"], 1312 deps = [ 1313 ":hlo_pass", 1314 "//tensorflow/compiler/xla:literal_util", 1315 "//tensorflow/compiler/xla:shape_util", 1316 "//tensorflow/compiler/xla:status_macros", 1317 "//tensorflow/compiler/xla:util", 1318 "//tensorflow/core:lib", 1319 ], 1320 ) 1321 1322 tf_cc_test( 1323 name = "reshape_mover_test", 1324 srcs = ["reshape_mover_test.cc"], 1325 deps = [ 1326 ":hlo", 1327 ":hlo_matchers", 1328 ":reshape_mover", 1329 "//tensorflow/compiler/xla:literal_util", 1330 "//tensorflow/compiler/xla:shape_util", 1331 "//tensorflow/compiler/xla:test", 1332 "//tensorflow/compiler/xla:test_helpers", 1333 "//tensorflow/compiler/xla:types", 1334 "//tensorflow/compiler/xla:util", 1335 "//tensorflow/compiler/xla:xla_data_proto", 1336 "//tensorflow/compiler/xla/tests:hlo_verified_test_base", 1337 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1338 "//tensorflow/core:lib", 1339 ], 1340 ) 1341 1342 cc_library( 1343 name = "inliner", 1344 srcs = ["inliner.cc"], 1345 hdrs = ["inliner.h"], 1346 deps = [ 1347 ":hlo", 1348 ":hlo_pass", 1349 ":hlo_query", 1350 "//tensorflow/compiler/xla:status_macros", 1351 "//tensorflow/compiler/xla:types", 1352 "//tensorflow/core:lib", 1353 ], 1354 ) 1355 1356 tf_cc_test( 1357 name = "inliner_test", 1358 srcs = ["inliner_test.cc"], 1359 deps = [ 1360 ":cpu_plugin", 1361 ":hlo", 1362 ":hlo_matchers", 1363 ":inliner", 1364 "//tensorflow/compiler/xla:literal_util", 1365 "//tensorflow/compiler/xla:shape_util", 1366 "//tensorflow/compiler/xla:test", 1367 "//tensorflow/compiler/xla:util", 1368 "//tensorflow/compiler/xla:xla_data_proto", 1369 "//tensorflow/compiler/xla/tests:hlo_test_base", 1370 "//tensorflow/compiler/xla/tests:literal_test_util", 1371 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1372 ], 1373 ) 1374 1375 cc_library( 1376 name = "computation_placer", 1377 srcs = ["computation_placer.cc"], 1378 hdrs = ["computation_placer.h"], 1379 deps = [ 1380 "//tensorflow/compiler/xla:array2d", 1381 "//tensorflow/compiler/xla:literal_util", 1382 "//tensorflow/compiler/xla:shape_util", 1383 "//tensorflow/compiler/xla:status", 1384 "//tensorflow/compiler/xla:status_macros", 1385 "//tensorflow/compiler/xla:statusor", 1386 "//tensorflow/compiler/xla:types", 1387 "//tensorflow/compiler/xla:util", 1388 "//tensorflow/compiler/xla:xla_data_proto", 1389 "//tensorflow/core:lib", 1390 "//tensorflow/core:stream_executor_no_cuda", 1391 ], 1392 alwayslink = True, # Contains per-platform computation placer registration 1393 ) 1394 1395 cc_library( 1396 name = "human_readable_profile_builder", 1397 srcs = ["human_readable_profile_builder.cc"], 1398 hdrs = ["human_readable_profile_builder.h"], 1399 deps = [ 1400 "//tensorflow/compiler/xla:metric_table_report", 1401 "//tensorflow/compiler/xla:types", 1402 "//tensorflow/compiler/xla:util", 1403 "//tensorflow/core:lib", 1404 ], 1405 ) 1406 1407 cc_library( 1408 name = "generic_transfer_manager", 1409 srcs = ["generic_transfer_manager.cc"], 1410 hdrs = ["generic_transfer_manager.h"], 1411 deps = [ 1412 ":transfer_manager", 1413 "//tensorflow/compiler/xla:literal_util", 1414 "//tensorflow/compiler/xla:shape_util", 1415 "//tensorflow/compiler/xla:status_macros", 1416 "//tensorflow/compiler/xla:statusor", 1417 "//tensorflow/compiler/xla:types", 1418 "//tensorflow/compiler/xla:util", 1419 "//tensorflow/compiler/xla:xla_data_proto", 1420 "//tensorflow/compiler/xla/service/interpreter:platform_id", 1421 "//tensorflow/core:lib", 1422 "//tensorflow/core:stream_executor_no_cuda", 1423 ], 1424 alwayslink = True, # Contains per-platform transfer manager registration 1425 ) 1426 1427 cc_library( 1428 name = "hlo_cost_analysis", 1429 srcs = ["hlo_cost_analysis.cc"], 1430 hdrs = ["hlo_cost_analysis.h"], 1431 deps = [ 1432 ":hlo", 1433 "//tensorflow/compiler/xla:shape_util", 1434 "//tensorflow/compiler/xla:status_macros", 1435 "//tensorflow/compiler/xla:statusor", 1436 "//tensorflow/compiler/xla:util", 1437 "//tensorflow/compiler/xla:xla_data_proto", 1438 "//tensorflow/core:lib", 1439 "//tensorflow/core:lib_internal", 1440 ], 1441 ) 1442 1443 tf_cc_test( 1444 name = "hlo_cost_analysis_test", 1445 srcs = ["hlo_cost_analysis_test.cc"], 1446 deps = [ 1447 ":computation_tracker", 1448 ":cpu_plugin", 1449 ":hlo", 1450 ":hlo_cost_analysis", 1451 ":local_service", 1452 ":service", 1453 ":user_computation", 1454 ":versioned_computation_handle", 1455 "//tensorflow/compiler/xla:shape_util", 1456 "//tensorflow/compiler/xla:statusor", 1457 "//tensorflow/compiler/xla:test_helpers", 1458 "//tensorflow/compiler/xla/client", 1459 "//tensorflow/compiler/xla/client:client_library", 1460 "//tensorflow/compiler/xla/client:computation", 1461 "//tensorflow/compiler/xla/client:computation_builder", 1462 "//tensorflow/compiler/xla/client:local_client", 1463 "//tensorflow/compiler/xla/client:padding", 1464 "//tensorflow/compiler/xla/tests:hlo_test_base", 1465 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1466 "//tensorflow/core:lib", 1467 ], 1468 ) 1469 1470 cc_library( 1471 name = "hlo_execution_profile", 1472 srcs = ["hlo_execution_profile.cc"], 1473 hdrs = ["hlo_execution_profile.h"], 1474 deps = [ 1475 ":hlo", 1476 ":hlo_cost_analysis", 1477 ":hlo_profile_printer", 1478 ":human_readable_profile_builder", 1479 "//tensorflow/compiler/xla:types", 1480 "//tensorflow/compiler/xla:util", 1481 "//tensorflow/core:lib", 1482 "//tensorflow/core:stream_executor_no_cuda", 1483 ], 1484 ) 1485 1486 tf_cc_test( 1487 name = "hlo_execution_profile_test", 1488 srcs = ["hlo_execution_profile_test.cc"], 1489 deps = [ 1490 ":cpu_plugin", 1491 ":hlo_cost_analysis", 1492 ":hlo_execution_profile", 1493 "//tensorflow/compiler/xla/tests:hlo_test_base", 1494 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1495 ], 1496 ) 1497 1498 tf_cc_test( 1499 name = "hlo_computation_test", 1500 srcs = ["hlo_computation_test.cc"], 1501 deps = [ 1502 ":hlo", 1503 ":hlo_matchers", 1504 "//tensorflow/compiler/xla:literal_util", 1505 "//tensorflow/compiler/xla:shape_util", 1506 "//tensorflow/compiler/xla:test", 1507 "//tensorflow/compiler/xla:test_helpers", 1508 "//tensorflow/compiler/xla/tests:hlo_test_base", 1509 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1510 ], 1511 ) 1512 1513 tf_cc_binary( 1514 name = "graphviz_example", 1515 srcs = ["graphviz_example.cc"], 1516 deps = [ 1517 ":hlo", 1518 ":hlo_graph_dumper", 1519 "//tensorflow/compiler/xla:literal_util", 1520 "//tensorflow/compiler/xla:shape_util", 1521 "//tensorflow/compiler/xla:types", 1522 "//tensorflow/compiler/xla:util", 1523 "//tensorflow/compiler/xla:xla_data_proto", 1524 "//tensorflow/core:lib", 1525 ], 1526 ) 1527 1528 tf_cc_test( 1529 name = "hlo_module_test", 1530 srcs = ["hlo_module_test.cc"], 1531 deps = [ 1532 ":hlo", 1533 "//tensorflow/compiler/xla:literal_util", 1534 "//tensorflow/compiler/xla:shape_util", 1535 "//tensorflow/compiler/xla:test", 1536 "//tensorflow/compiler/xla:util", 1537 "//tensorflow/compiler/xla:xla_data_proto", 1538 "//tensorflow/compiler/xla/tests:hlo_test_base", 1539 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1540 "//tensorflow/core:lib", 1541 ], 1542 ) 1543 1544 cc_library( 1545 name = "logical_buffer", 1546 srcs = ["logical_buffer.cc"], 1547 hdrs = ["logical_buffer.h"], 1548 deps = [ 1549 ":hlo", 1550 ":hlo_proto", 1551 "//tensorflow/compiler/xla:shape_util", 1552 "//tensorflow/compiler/xla:types", 1553 "//tensorflow/compiler/xla:xla_data_proto", 1554 "//tensorflow/core:lib", 1555 "//tensorflow/core:lib_internal", 1556 ], 1557 ) 1558 1559 cc_library( 1560 name = "hlo_value", 1561 srcs = ["hlo_value.cc"], 1562 hdrs = ["hlo_value.h"], 1563 deps = [ 1564 ":hlo", 1565 "//tensorflow/compiler/xla:shape_tree", 1566 "//tensorflow/compiler/xla:shape_util", 1567 "//tensorflow/compiler/xla:status", 1568 "//tensorflow/compiler/xla:types", 1569 "//tensorflow/compiler/xla:util", 1570 "//tensorflow/compiler/xla:xla_data_proto", 1571 "//tensorflow/core:lib", 1572 ], 1573 ) 1574 1575 cc_library( 1576 name = "hlo_dataflow_analysis", 1577 srcs = ["hlo_dataflow_analysis.cc"], 1578 hdrs = ["hlo_dataflow_analysis.h"], 1579 deps = [ 1580 ":call_graph", 1581 ":hlo", 1582 ":hlo_value", 1583 "//tensorflow/compiler/xla:shape_util", 1584 "//tensorflow/compiler/xla:status", 1585 "//tensorflow/compiler/xla:statusor", 1586 "//tensorflow/compiler/xla:types", 1587 "//tensorflow/compiler/xla:util", 1588 "//tensorflow/compiler/xla:xla_data_proto", 1589 "//tensorflow/core:lib", 1590 ], 1591 ) 1592 1593 tf_cc_test( 1594 name = "hlo_dataflow_analysis_test", 1595 srcs = ["hlo_dataflow_analysis_test.cc"], 1596 deps = [ 1597 ":hlo", 1598 ":hlo_dataflow_analysis", 1599 ":hlo_graph_dumper", 1600 ":hlo_matchers", 1601 ":hlo_ordering", 1602 ":instruction_fusion", 1603 "//tensorflow/compiler/xla:literal_util", 1604 "//tensorflow/compiler/xla:shape_util", 1605 "//tensorflow/compiler/xla:status_macros", 1606 "//tensorflow/compiler/xla:test", 1607 "//tensorflow/compiler/xla:test_helpers", 1608 "//tensorflow/compiler/xla:xla_data_proto", 1609 "//tensorflow/compiler/xla/tests:hlo_test_base", 1610 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1611 "//tensorflow/core:lib", 1612 "//tensorflow/core:test", 1613 ], 1614 ) 1615 1616 cc_library( 1617 name = "hlo_buffer", 1618 srcs = ["hlo_buffer.cc"], 1619 hdrs = ["hlo_buffer.h"], 1620 deps = [ 1621 ":hlo", 1622 ":hlo_value", 1623 "//tensorflow/compiler/xla:shape_tree", 1624 "//tensorflow/compiler/xla:shape_util", 1625 "//tensorflow/compiler/xla:types", 1626 "//tensorflow/compiler/xla:util", 1627 "//tensorflow/compiler/xla:xla_data_proto", 1628 "//tensorflow/core:lib", 1629 ], 1630 ) 1631 1632 cc_library( 1633 name = "hlo_alias_analysis", 1634 srcs = ["hlo_alias_analysis.cc"], 1635 hdrs = ["hlo_alias_analysis.h"], 1636 deps = [ 1637 ":hlo", 1638 ":hlo_buffer", 1639 ":hlo_dataflow_analysis", 1640 ":hlo_ordering", 1641 ":hlo_value", 1642 "//tensorflow/compiler/xla:shape_util", 1643 "//tensorflow/compiler/xla:status", 1644 "//tensorflow/compiler/xla:statusor", 1645 "//tensorflow/compiler/xla:types", 1646 "//tensorflow/compiler/xla:util", 1647 "//tensorflow/compiler/xla:xla_data_proto", 1648 "//tensorflow/core:lib", 1649 ], 1650 ) 1651 1652 tf_cc_test( 1653 name = "hlo_alias_analysis_test", 1654 srcs = ["hlo_alias_analysis_test.cc"], 1655 deps = [ 1656 ":flatten_call_graph", 1657 ":hlo", 1658 ":hlo_alias_analysis", 1659 ":hlo_graph_dumper", 1660 ":hlo_matchers", 1661 ":hlo_ordering", 1662 ":instruction_fusion", 1663 "//tensorflow/compiler/xla:literal_util", 1664 "//tensorflow/compiler/xla:shape_util", 1665 "//tensorflow/compiler/xla:test", 1666 "//tensorflow/compiler/xla:test_helpers", 1667 "//tensorflow/compiler/xla:xla_data_proto", 1668 "//tensorflow/compiler/xla/tests:hlo_test_base", 1669 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1670 "//tensorflow/core:lib", 1671 "//tensorflow/core:test", 1672 ], 1673 ) 1674 1675 cc_library( 1676 name = "logical_buffer_analysis", 1677 srcs = ["logical_buffer_analysis.cc"], 1678 hdrs = ["logical_buffer_analysis.h"], 1679 deps = [ 1680 ":hlo", 1681 ":logical_buffer", 1682 "//tensorflow/compiler/xla:shape_util", 1683 "//tensorflow/compiler/xla:statusor", 1684 "//tensorflow/core:lib", 1685 "//tensorflow/core:lib_internal", 1686 ], 1687 ) 1688 1689 cc_library( 1690 name = "tuple_points_to_analysis", 1691 srcs = ["tuple_points_to_analysis.cc"], 1692 hdrs = ["tuple_points_to_analysis.h"], 1693 deps = [ 1694 ":hlo", 1695 ":logical_buffer", 1696 ":logical_buffer_analysis", 1697 "//tensorflow/compiler/xla:shape_tree", 1698 "//tensorflow/compiler/xla:shape_util", 1699 "//tensorflow/compiler/xla:statusor", 1700 "//tensorflow/compiler/xla:types", 1701 "//tensorflow/compiler/xla:util", 1702 "//tensorflow/compiler/xla:xla_data_proto", 1703 "//tensorflow/core:lib", 1704 ], 1705 ) 1706 1707 tf_cc_test( 1708 name = "tuple_points_to_analysis_test", 1709 srcs = ["tuple_points_to_analysis_test.cc"], 1710 deps = [ 1711 ":hlo", 1712 ":hlo_matchers", 1713 ":instruction_fusion", 1714 ":tuple_points_to_analysis", 1715 "//tensorflow/compiler/xla:literal_util", 1716 "//tensorflow/compiler/xla:shape_util", 1717 "//tensorflow/compiler/xla:test", 1718 "//tensorflow/compiler/xla:test_helpers", 1719 "//tensorflow/compiler/xla:xla_data_proto", 1720 "//tensorflow/compiler/xla/tests:hlo_test_base", 1721 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1722 "//tensorflow/core:lib", 1723 "//tensorflow/core:test", 1724 ], 1725 ) 1726 1727 cc_library( 1728 name = "compilation_cache", 1729 srcs = ["compilation_cache.cc"], 1730 hdrs = ["compilation_cache.h"], 1731 deps = [ 1732 ":executable", 1733 ":hlo_module_config", 1734 ":versioned_computation_handle", 1735 "//tensorflow/compiler/xla:types", 1736 "//tensorflow/compiler/xla:xla_data_proto", 1737 "//tensorflow/core:lib", 1738 ], 1739 ) 1740 1741 cc_library( 1742 name = "layout_assignment", 1743 srcs = [ 1744 "layout_assignment.cc", 1745 ], 1746 hdrs = [ 1747 "layout_assignment.h", 1748 ], 1749 deps = [ 1750 ":computation_layout", 1751 ":hlo", 1752 ":hlo_graph_dumper", 1753 ":hlo_pass", 1754 ":logical_buffer", 1755 ":tuple_points_to_analysis", 1756 "//tensorflow/compiler/xla:shape_layout", 1757 "//tensorflow/compiler/xla:shape_util", 1758 "//tensorflow/compiler/xla:status_macros", 1759 "//tensorflow/compiler/xla:statusor", 1760 "//tensorflow/compiler/xla:types", 1761 "//tensorflow/compiler/xla:util", 1762 "//tensorflow/compiler/xla:xla_data_proto", 1763 "//tensorflow/core:lib", 1764 ], 1765 ) 1766 1767 cc_library( 1768 name = "copy_insertion", 1769 srcs = ["copy_insertion.cc"], 1770 hdrs = ["copy_insertion.h"], 1771 deps = [ 1772 ":buffer_liveness", 1773 ":hlo", 1774 ":hlo_alias_analysis", 1775 ":hlo_dce", 1776 ":hlo_graph_dumper", 1777 ":hlo_ordering", 1778 ":hlo_pass", 1779 ":liveness_util", 1780 ":logical_buffer", 1781 ":tuple_simplifier", 1782 "//tensorflow/compiler/xla:status_macros", 1783 "//tensorflow/compiler/xla:statusor", 1784 "//tensorflow/compiler/xla:types", 1785 "//tensorflow/compiler/xla:util", 1786 "//tensorflow/core:lib", 1787 ], 1788 ) 1789 1790 tf_cc_test( 1791 name = "copy_insertion_test", 1792 srcs = ["copy_insertion_test.cc"], 1793 deps = [ 1794 ":copy_insertion", 1795 ":hlo", 1796 ":hlo_graph_dumper", 1797 ":hlo_matchers", 1798 ":hlo_runner", 1799 "//tensorflow/compiler/xla:literal_util", 1800 "//tensorflow/compiler/xla:shape_util", 1801 "//tensorflow/compiler/xla:test", 1802 "//tensorflow/compiler/xla:test_helpers", 1803 "//tensorflow/compiler/xla:xla_data_proto", 1804 "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", 1805 "//tensorflow/compiler/xla/tests:hlo_test_base", 1806 "//tensorflow/core:test", 1807 ], 1808 ) 1809 1810 cc_library( 1811 name = "hlo_dce", 1812 srcs = ["hlo_dce.cc"], 1813 hdrs = ["hlo_dce.h"], 1814 deps = [ 1815 ":hlo", 1816 ":hlo_pass", 1817 "//tensorflow/compiler/xla:status", 1818 "//tensorflow/compiler/xla:status_macros", 1819 "//tensorflow/compiler/xla:statusor", 1820 "//tensorflow/compiler/xla:types", 1821 "//tensorflow/compiler/xla:util", 1822 "//tensorflow/core:lib", 1823 ], 1824 ) 1825 1826 cc_library( 1827 name = "hlo_verifier", 1828 srcs = ["hlo_verifier.cc"], 1829 hdrs = ["hlo_verifier.h"], 1830 deps = [ 1831 ":hlo_pass", 1832 ":shape_inference", 1833 "//tensorflow/compiler/xla:status_macros", 1834 "//tensorflow/core:lib", 1835 ], 1836 ) 1837 1838 tf_cc_test( 1839 name = "hlo_verifier_test", 1840 srcs = ["hlo_verifier_test.cc"], 1841 deps = [ 1842 ":hlo", 1843 ":hlo_verifier", 1844 "//tensorflow/compiler/xla:shape_util", 1845 "//tensorflow/compiler/xla:test", 1846 "//tensorflow/compiler/xla:types", 1847 "//tensorflow/compiler/xla:xla_data_proto", 1848 "//tensorflow/compiler/xla/tests:hlo_test_base", 1849 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1850 "//tensorflow/core:test", 1851 ], 1852 ) 1853 1854 cc_library( 1855 name = "hlo_rematerialization", 1856 srcs = ["hlo_rematerialization.cc"], 1857 hdrs = ["hlo_rematerialization.h"], 1858 deps = [ 1859 ":buffer_liveness", 1860 ":call_graph", 1861 ":flatten_call_graph", 1862 ":hlo", 1863 ":hlo_dce", 1864 ":hlo_ordering", 1865 ":hlo_scheduling", 1866 ":liveness_util", 1867 ":logical_buffer", 1868 ":tuple_points_to_analysis", 1869 "//tensorflow/compiler/xla:shape_util", 1870 "//tensorflow/compiler/xla:status_macros", 1871 "//tensorflow/compiler/xla:statusor", 1872 "//tensorflow/compiler/xla:types", 1873 "//tensorflow/compiler/xla:util", 1874 "//tensorflow/core:lib", 1875 ], 1876 ) 1877 1878 tf_cc_test( 1879 name = "hlo_rematerialization_test", 1880 srcs = ["hlo_rematerialization_test.cc"], 1881 deps = [ 1882 ":hlo", 1883 ":hlo_matchers", 1884 ":hlo_ordering", 1885 ":hlo_rematerialization", 1886 "//tensorflow/compiler/xla:shape_util", 1887 "//tensorflow/compiler/xla:types", 1888 "//tensorflow/compiler/xla:xla_data_proto", 1889 "//tensorflow/compiler/xla/tests:hlo_test_base", 1890 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1891 ], 1892 ) 1893 1894 tf_cc_test( 1895 name = "hlo_dce_test", 1896 srcs = ["hlo_dce_test.cc"], 1897 deps = [ 1898 ":hlo", 1899 ":hlo_dce", 1900 "//tensorflow/compiler/xla:literal_util", 1901 "//tensorflow/compiler/xla:shape_util", 1902 "//tensorflow/compiler/xla:types", 1903 "//tensorflow/compiler/xla:util", 1904 "//tensorflow/compiler/xla:xla_data_proto", 1905 "//tensorflow/compiler/xla/tests:hlo_test_base", 1906 "//tensorflow/compiler/xla/tests:literal_test_util", 1907 "//tensorflow/compiler/xla/tests:test_utils", 1908 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 1909 "//tensorflow/core:lib", 1910 "//tensorflow/core:test", 1911 ], 1912 ) 1913 1914 tf_cc_test( 1915 name = "layout_assignment_test", 1916 srcs = ["layout_assignment_test.cc"], 1917 deps = [ 1918 ":algebraic_simplifier", 1919 ":computation_layout", 1920 ":hlo", 1921 ":hlo_matchers", 1922 ":layout_assignment", 1923 "//tensorflow/compiler/xla:literal_util", 1924 "//tensorflow/compiler/xla:shape_layout", 1925 "//tensorflow/compiler/xla:shape_util", 1926 "//tensorflow/compiler/xla:test", 1927 "//tensorflow/compiler/xla:test_helpers", 1928 "//tensorflow/compiler/xla:util", 1929 "//tensorflow/compiler/xla:xla_data_proto", 1930 "//tensorflow/compiler/xla/tests:hlo_test_base", 1931 "//tensorflow/compiler/xla/tests:test_utils", 1932 "//tensorflow/compiler/xla/tools/parser:hlo_parser", 1933 "//tensorflow/core:lib", 1934 "//tensorflow/core:test", 1935 ], 1936 ) 1937 1938 cc_library( 1939 name = "hlo_pass", 1940 hdrs = [ 1941 "hlo_pass_fix.h", 1942 "hlo_pass_interface.h", 1943 ], 1944 deps = [ 1945 ":hlo", 1946 "//tensorflow/compiler/xla:status_macros", 1947 "//tensorflow/compiler/xla:statusor", 1948 "//tensorflow/compiler/xla:types", 1949 "//tensorflow/core:lib", 1950 ], 1951 ) 1952 1953 cc_library( 1954 name = "hlo_pass_pipeline", 1955 srcs = [ 1956 "hlo_pass_pipeline.cc", 1957 ], 1958 hdrs = [ 1959 "hlo_pass_pipeline.h", 1960 ], 1961 deps = [ 1962 ":hlo", 1963 ":hlo_graph_dumper", 1964 ":hlo_pass", 1965 ":hlo_proto_util", 1966 "//tensorflow/compiler/xla:status_macros", 1967 "//tensorflow/compiler/xla:statusor", 1968 "//tensorflow/compiler/xla:types", 1969 "//tensorflow/compiler/xla:util", 1970 "//tensorflow/core:lib", 1971 ], 1972 ) 1973 1974 cc_library( 1975 name = "hlo_cse", 1976 srcs = ["hlo_cse.cc"], 1977 hdrs = ["hlo_cse.h"], 1978 deps = [ 1979 ":hlo", 1980 ":hlo_pass", 1981 "//tensorflow/compiler/xla:literal_util", 1982 "//tensorflow/compiler/xla:shape_util", 1983 "//tensorflow/compiler/xla:types", 1984 "//tensorflow/compiler/xla:xla_data_proto", 1985 "//tensorflow/core:lib", 1986 ], 1987 ) 1988 1989 tf_cc_test( 1990 name = "hlo_cse_test", 1991 srcs = ["hlo_cse_test.cc"], 1992 deps = [ 1993 ":cpu_plugin", 1994 ":hlo", 1995 ":hlo_cse", 1996 ":hlo_matchers", 1997 "//tensorflow/compiler/xla:literal_util", 1998 "//tensorflow/compiler/xla:shape_util", 1999 "//tensorflow/compiler/xla:types", 2000 "//tensorflow/compiler/xla:util", 2001 "//tensorflow/compiler/xla:xla_data_proto", 2002 "//tensorflow/compiler/xla/tests:hlo_test_base", 2003 "//tensorflow/compiler/xla/tests:literal_test_util", 2004 "//tensorflow/compiler/xla/tests:test_utils", 2005 "//tensorflow/core:lib", 2006 ], 2007 ) 2008 2009 cc_library( 2010 name = "hlo_constant_folding", 2011 srcs = ["hlo_constant_folding.cc"], 2012 hdrs = ["hlo_constant_folding.h"], 2013 deps = [ 2014 ":hlo", 2015 ":hlo_evaluator", 2016 ":hlo_pass", 2017 ":hlo_query", 2018 "//tensorflow/compiler/xla:literal_util", 2019 "//tensorflow/compiler/xla:shape_util", 2020 "//tensorflow/compiler/xla:types", 2021 "//tensorflow/core:lib", 2022 ], 2023 ) 2024 2025 tf_cc_test( 2026 name = "hlo_constant_folding_test", 2027 srcs = ["hlo_constant_folding_test.cc"], 2028 deps = [ 2029 ":hlo", 2030 ":hlo_constant_folding", 2031 ":hlo_matchers", 2032 ":hlo_pass", 2033 "//tensorflow/compiler/xla:literal_util", 2034 "//tensorflow/compiler/xla:shape_util", 2035 "//tensorflow/compiler/xla:test", 2036 "//tensorflow/compiler/xla:types", 2037 "//tensorflow/compiler/xla/tests:hlo_test_base", 2038 "//tensorflow/compiler/xla/tests:literal_test_util", 2039 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 2040 ], 2041 ) 2042 2043 cc_library( 2044 name = "hlo_element_type_converter", 2045 srcs = ["hlo_element_type_converter.cc"], 2046 hdrs = ["hlo_element_type_converter.h"], 2047 deps = [ 2048 ":hlo", 2049 ":hlo_evaluator", 2050 ":hlo_pass", 2051 ":hlo_query", 2052 "//tensorflow/compiler/xla:literal_util", 2053 "//tensorflow/compiler/xla:shape_util", 2054 "//tensorflow/compiler/xla:types", 2055 "//tensorflow/core:lib", 2056 ], 2057 ) 2058 2059 tf_cc_test( 2060 name = "hlo_element_type_converter_test", 2061 srcs = ["hlo_element_type_converter_test.cc"], 2062 deps = [ 2063 ":hlo_element_type_converter", 2064 ":hlo_matchers", 2065 "//tensorflow/compiler/xla/tests:hlo_test_base", 2066 ], 2067 ) 2068 2069 cc_library( 2070 name = "device_memory_allocator", 2071 srcs = ["device_memory_allocator.cc"], 2072 hdrs = ["device_memory_allocator.h"], 2073 deps = [ 2074 "//tensorflow/compiler/xla:status_macros", 2075 "//tensorflow/compiler/xla:statusor", 2076 "//tensorflow/compiler/xla:types", 2077 "//tensorflow/compiler/xla:util", 2078 "//tensorflow/core:lib", 2079 "//tensorflow/core:stream_executor_no_cuda", 2080 ], 2081 ) 2082 2083 cc_library( 2084 name = "elemental_ir_emitter", 2085 srcs = ["elemental_ir_emitter.cc"], 2086 hdrs = ["elemental_ir_emitter.h"], 2087 deps = [ 2088 ":hlo", 2089 ":hlo_module_config", 2090 "//tensorflow/compiler/xla:shape_util", 2091 "//tensorflow/compiler/xla:status_macros", 2092 "//tensorflow/compiler/xla:statusor", 2093 "//tensorflow/compiler/xla:types", 2094 "//tensorflow/compiler/xla:util", 2095 "//tensorflow/compiler/xla:xla_data_proto", 2096 "//tensorflow/compiler/xla/service/llvm_ir:ir_array", 2097 "//tensorflow/compiler/xla/service/llvm_ir:llvm_loop", 2098 "//tensorflow/compiler/xla/service/llvm_ir:llvm_util", 2099 "//tensorflow/compiler/xla/service/llvm_ir:loop_emitter", 2100 "//tensorflow/core:lib", 2101 "//tensorflow/core:lib_internal", 2102 "@llvm//:core", 2103 "@llvm//:transform_utils", 2104 ], 2105 ) 2106 2107 cc_library( 2108 name = "hlo_module_config", 2109 srcs = ["hlo_module_config.cc"], 2110 hdrs = ["hlo_module_config.h"], 2111 deps = [ 2112 ":computation_layout", 2113 "//tensorflow/compiler/xla:shape_layout", 2114 "//tensorflow/compiler/xla:types", 2115 "//tensorflow/compiler/xla:util", 2116 "//tensorflow/compiler/xla:xla_data_proto", 2117 "//tensorflow/compiler/xla:xla_proto", 2118 "//tensorflow/core:lib", 2119 ], 2120 ) 2121 2122 cc_library( 2123 name = "computation_layout", 2124 srcs = ["computation_layout.cc"], 2125 hdrs = ["computation_layout.h"], 2126 deps = [ 2127 "//tensorflow/compiler/xla:shape_layout", 2128 "//tensorflow/compiler/xla:types", 2129 "//tensorflow/compiler/xla:xla_data_proto", 2130 "//tensorflow/core:lib", 2131 ], 2132 ) 2133 2134 cc_library( 2135 name = "hlo_subcomputation_unification", 2136 srcs = ["hlo_subcomputation_unification.cc"], 2137 hdrs = ["hlo_subcomputation_unification.h"], 2138 deps = [ 2139 ":hlo_pass", 2140 ], 2141 ) 2142 2143 tf_cc_test( 2144 name = "hlo_subcomputation_unification_test", 2145 srcs = ["hlo_subcomputation_unification_test.cc"], 2146 deps = [ 2147 ":hlo", 2148 ":hlo_graph_dumper", 2149 ":hlo_subcomputation_unification", 2150 "//tensorflow/compiler/xla:shape_util", 2151 "//tensorflow/compiler/xla/tests:hlo_test_base", 2152 "//tensorflow/compiler/xla/tests:test_utils", 2153 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 2154 ], 2155 ) 2156 2157 cc_library( 2158 name = "hlo_tfgraph_builder", 2159 srcs = ["hlo_tfgraph_builder.cc"], 2160 hdrs = ["hlo_tfgraph_builder.h"], 2161 visibility = ["//tensorflow/compiler/xla/tools:__pkg__"], 2162 deps = [ 2163 ":hlo", 2164 "//tensorflow/compiler/xla:literal_util", 2165 "//tensorflow/compiler/xla:shape_util", 2166 "//tensorflow/compiler/xla:xla_proto", 2167 "//tensorflow/core:framework", 2168 "//tensorflow/core:lib", 2169 "//tensorflow/core:protos_all_cc", 2170 ], 2171 ) 2172 2173 tf_cc_test( 2174 name = "hlo_tfgraph_builder_test", 2175 srcs = ["hlo_tfgraph_builder_test.cc"], 2176 deps = [ 2177 ":hlo_tfgraph_builder", 2178 "//tensorflow/compiler/xla/client:computation_builder", 2179 "//tensorflow/compiler/xla/tests:hlo_test_base", 2180 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 2181 "//tensorflow/core:protos_all_cc", 2182 ], 2183 ) 2184 2185 cc_library( 2186 name = "hlo_graph_dumper", 2187 srcs = [ 2188 "hlo_graph_dumper.cc", 2189 ], 2190 hdrs = ["hlo_graph_dumper.h"], 2191 deps = [ 2192 ":hlo", 2193 ":hlo_execution_profile", 2194 ":hlo_tfgraph_builder", 2195 "//tensorflow/compiler/xla:literal_util", 2196 "//tensorflow/compiler/xla:shape_util", 2197 "//tensorflow/compiler/xla:types", 2198 "//tensorflow/compiler/xla:window_util", 2199 "//tensorflow/compiler/xla:xla_proto", 2200 "//tensorflow/core:lib", 2201 "//tensorflow/core:lib_internal", 2202 "//tensorflow/core:regexp_internal", 2203 ], 2204 alwayslink = 1, 2205 ) 2206 2207 tf_cc_test( 2208 name = "hlo_graph_dumper_test", 2209 srcs = ["hlo_graph_dumper_test.cc"], 2210 deps = [ 2211 ":hlo", 2212 ":hlo_graph_dumper", 2213 "//tensorflow/compiler/xla:test", 2214 "//tensorflow/compiler/xla:xla_proto", 2215 "//tensorflow/compiler/xla/tests:test_utils", 2216 "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep 2217 "//tensorflow/core:lib", 2218 ], 2219 ) 2220 2221 cc_library( 2222 name = "transpose_folding", 2223 srcs = ["transpose_folding.cc"], 2224 hdrs = ["transpose_folding.h"], 2225 deps = [ 2226 ":hlo", 2227 ":hlo_pass", 2228 "//tensorflow/compiler/xla:shape_util", 2229 "//tensorflow/compiler/xla:status_macros", 2230 "//tensorflow/compiler/xla:util", 2231 "//tensorflow/core:lib", 2232 ], 2233 ) 2234 2235 tf_cc_test( 2236 name = "transpose_folding_test", 2237 srcs = ["transpose_folding_test.cc"], 2238 deps = [ 2239 ":hlo", 2240 ":shape_inference", 2241 ":transpose_folding", 2242 "//tensorflow/compiler/xla:literal_util", 2243 "//tensorflow/compiler/xla:shape_util", 2244 "//tensorflow/compiler/xla:test", 2245 "//tensorflow/compiler/xla:test_helpers", 2246 "//tensorflow/compiler/xla:xla_data_proto", 2247 "//tensorflow/compiler/xla/client:computation_builder", 2248 "//tensorflow/compiler/xla/service/gpu:ir_emission_utils", 2249 "//tensorflow/compiler/xla/tests:hlo_test_base", 2250 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 2251 "//tensorflow/core:lib", 2252 ], 2253 ) 2254 2255 cc_library( 2256 name = "zero_sized_hlo_elimination", 2257 srcs = ["zero_sized_hlo_elimination.cc"], 2258 hdrs = ["zero_sized_hlo_elimination.h"], 2259 deps = [ 2260 ":hlo", 2261 ":hlo_pass", 2262 "//tensorflow/compiler/xla:literal_util", 2263 "//tensorflow/compiler/xla:shape_util", 2264 "//tensorflow/compiler/xla:status_macros", 2265 "//tensorflow/compiler/xla:util", 2266 "//tensorflow/core:lib", 2267 ], 2268 ) 2269 2270 tf_cc_test( 2271 name = "zero_sized_hlo_elimination_test", 2272 srcs = ["zero_sized_hlo_elimination_test.cc"], 2273 deps = [ 2274 ":hlo", 2275 ":shape_inference", 2276 ":zero_sized_hlo_elimination", 2277 "//tensorflow/compiler/xla:literal_util", 2278 "//tensorflow/compiler/xla:shape_util", 2279 "//tensorflow/compiler/xla:status_macros", 2280 "//tensorflow/compiler/xla:test", 2281 "//tensorflow/compiler/xla:test_helpers", 2282 "//tensorflow/compiler/xla:xla_data_proto", 2283 "//tensorflow/compiler/xla/client:computation_builder", 2284 "//tensorflow/compiler/xla/tests:hlo_test_base", 2285 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 2286 "//tensorflow/core:lib", 2287 ], 2288 ) 2289 2290 cc_library( 2291 name = "pool", 2292 hdrs = ["pool.h"], 2293 deps = [ 2294 "//tensorflow/compiler/xla:util", 2295 "//tensorflow/core:lib", 2296 ], 2297 ) 2298 2299 tf_cc_test( 2300 name = "pool_test", 2301 srcs = ["pool_test.cc"], 2302 deps = [ 2303 ":pool", 2304 "//tensorflow/compiler/xla:test_helpers", 2305 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 2306 ], 2307 ) 2308 2309 cc_library( 2310 name = "hlo_proto_util", 2311 srcs = ["hlo_proto_util.cc"], 2312 hdrs = ["hlo_proto_util.h"], 2313 deps = [ 2314 ":buffer_assignment", 2315 ":hlo", 2316 ":hlo_proto", 2317 "//tensorflow/compiler/xla:status", 2318 ], 2319 ) 2320 2321 cc_library( 2322 name = "reduce_precision_insertion", 2323 srcs = ["reduce_precision_insertion.cc"], 2324 hdrs = ["reduce_precision_insertion.h"], 2325 deps = [ 2326 ":buffer_liveness", 2327 ":hlo", 2328 ":hlo_pass", 2329 ":hlo_pass_pipeline", 2330 "//tensorflow/compiler/xla:shape_util", 2331 "//tensorflow/core:lib", 2332 ], 2333 ) 2334 2335 tf_cc_test( 2336 name = "reduce_precision_insertion_test", 2337 size = "small", 2338 srcs = ["reduce_precision_insertion_test.cc"], 2339 deps = [ 2340 ":hlo", 2341 ":hlo_matchers", 2342 ":reduce_precision_insertion", 2343 "//tensorflow/compiler/xla:shape_util", 2344 "//tensorflow/compiler/xla:test", 2345 "//tensorflow/compiler/xla:test_helpers", 2346 "//tensorflow/compiler/xla:xla_data_proto", 2347 "//tensorflow/compiler/xla/tests:hlo_test_base", 2348 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 2349 ], 2350 ) 2351 2352 cc_library( 2353 name = "hlo_runner", 2354 srcs = ["hlo_runner.cc"], 2355 hdrs = ["hlo_runner.h"], 2356 deps = [ 2357 ":executable", 2358 ":hlo", 2359 ":transfer_manager", 2360 "//tensorflow/compiler/xla:shape_util", 2361 "//tensorflow/compiler/xla:status_macros", 2362 "//tensorflow/compiler/xla:statusor", 2363 "//tensorflow/compiler/xla:types", 2364 "//tensorflow/compiler/xla:util", 2365 "//tensorflow/compiler/xla:xla_data_proto", 2366 "//tensorflow/compiler/xla/service:backend", 2367 "//tensorflow/compiler/xla/service:compiler", 2368 "//tensorflow/compiler/xla/tools/parser:hlo_parser", 2369 "//tensorflow/core:core_cpu_internal", 2370 "//tensorflow/core:lib", 2371 "//tensorflow/core:stream_executor_no_cuda", 2372 "//third_party/eigen3", 2373 ], 2374 ) 2375 2376 cc_library( 2377 name = "hlo_profile_printer", 2378 srcs = ["hlo_profile_printer.cc"], 2379 hdrs = ["hlo_profile_printer.h"], 2380 deps = [ 2381 ":hlo_profile_printer_data", 2382 ":human_readable_profile_builder", 2383 "//tensorflow/compiler/xla:types", 2384 ], 2385 ) 2386 2387 cc_library( 2388 name = "tuple_util", 2389 srcs = ["tuple_util.cc"], 2390 hdrs = ["tuple_util.h"], 2391 deps = [ 2392 ":hlo", 2393 "//tensorflow/core:lib", 2394 ], 2395 ) 2396 2397 tf_cc_test( 2398 name = "tuple_util_test", 2399 srcs = ["tuple_util_test.cc"], 2400 deps = [ 2401 ":tuple_util", 2402 "//tensorflow/compiler/xla:test", 2403 "//tensorflow/compiler/xla/service:hlo_matchers", 2404 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 2405 "//tensorflow/compiler/xla/tools/parser:hlo_parser", 2406 ], 2407 ) 2408 2409 cc_library( 2410 name = "while_util", 2411 srcs = ["while_util.cc"], 2412 hdrs = ["while_util.h"], 2413 deps = [ 2414 ":call_inliner", 2415 ":hlo", 2416 ":tuple_util", 2417 ], 2418 ) 2419 2420 tf_cc_test( 2421 name = "while_util_test", 2422 srcs = ["while_util_test.cc"], 2423 deps = [ 2424 ":while_util", 2425 "//tensorflow/compiler/xla:test", 2426 "//tensorflow/compiler/xla/service:hlo_matchers", 2427 "//tensorflow/compiler/xla/tests:xla_internal_test_main", 2428 "//tensorflow/compiler/xla/tools/parser:hlo_parser", 2429 ], 2430 ) 2431 2432 cc_library( 2433 name = "while_loop_invariant_code_motion", 2434 srcs = ["while_loop_invariant_code_motion.cc"], 2435 hdrs = ["while_loop_invariant_code_motion.h"], 2436 deps = [ 2437 ":hlo", 2438 ":hlo_pass", 2439 ":tuple_util", 2440 ":while_util", 2441 "//tensorflow/compiler/xla:statusor", 2442 "//tensorflow/compiler/xla:util", 2443 "//tensorflow/core:lib", 2444 ], 2445 ) 2446 2447 tf_cc_test( 2448 name = "while_loop_invariant_code_motion_test", 2449 srcs = ["while_loop_invariant_code_motion_test.cc"], 2450 deps = [ 2451 ":hlo_matchers", 2452 ":while_loop_invariant_code_motion", 2453 "//tensorflow/compiler/xla:test", 2454 "//tensorflow/compiler/xla/tests:hlo_verified_test_base", 2455 "//tensorflow/core:test", 2456 ], 2457 ) 2458 2459 cc_library( 2460 name = "source_map_util", 2461 srcs = ["source_map_util.cc"], 2462 hdrs = ["source_map_util.h"], 2463 deps = [ 2464 ":executable", 2465 "//tensorflow/compiler/xla:status", 2466 "//tensorflow/compiler/xla:util", 2467 "//tensorflow/core:lib", 2468 ], 2469 ) 2470 2471 # ----------------------------------------------------------------------------- 2472 2473 filegroup( 2474 name = "all_files", 2475 srcs = glob( 2476 ["**/*"], 2477 exclude = [ 2478 "**/METADATA", 2479 "**/OWNERS", 2480 ], 2481 ), 2482 visibility = ["//tensorflow:__subpackages__"], 2483 ) 2484