1# Utilities for building XLA computations. 2 3load("//tensorflow:tensorflow.bzl", "filegroup") 4load("//tensorflow/core/platform:rules_cc.bzl", "cc_library") 5 6package( 7 default_visibility = ["//tensorflow/compiler/tf2xla:friends"], 8 licenses = ["notice"], # Apache 2.0 9) 10 11# Filegroup used to collect source files for dependency checking. 12filegroup( 13 name = "c_srcs", 14 data = glob([ 15 "**/*.cc", 16 "**/*.h", 17 ]), 18) 19 20cc_library( 21 name = "broadcast", 22 srcs = ["broadcast.cc"], 23 hdrs = ["broadcast.h"], 24 deps = [ 25 "//tensorflow/compiler/tf2xla:common", 26 "//tensorflow/compiler/xla:shape_util", 27 "//tensorflow/compiler/xla:status_macros", 28 "//tensorflow/compiler/xla:statusor", 29 "//tensorflow/compiler/xla:util", 30 "//tensorflow/compiler/xla/client:xla_builder", 31 "//tensorflow/core:framework", 32 "@com_google_absl//absl/algorithm:container", 33 "@com_google_absl//absl/strings", 34 "@com_google_absl//absl/types:span", 35 ], 36) 37 38cc_library( 39 name = "random", 40 srcs = ["random.cc"], 41 hdrs = ["random.h"], 42 deps = [ 43 "//tensorflow/compiler/tf2xla:xla_compiler", 44 "//tensorflow/compiler/tf2xla:xla_helpers", 45 "//tensorflow/compiler/xla:status_macros", 46 "//tensorflow/compiler/xla:statusor", 47 "//tensorflow/compiler/xla/client:xla_builder", 48 "//tensorflow/compiler/xla/client/lib:constants", 49 "//tensorflow/compiler/xla/client/lib:math", 50 "//tensorflow/core:protos_all_cc", 51 ], 52) 53 54cc_library( 55 name = "scatter", 56 srcs = ["scatter.cc"], 57 hdrs = ["scatter.h"], 58 deps = [ 59 ":util", 60 "//tensorflow/compiler/xla:literal", 61 "//tensorflow/compiler/xla:shape_util", 62 "//tensorflow/compiler/xla:status_macros", 63 "//tensorflow/compiler/xla:statusor", 64 "//tensorflow/compiler/xla:util", 65 "//tensorflow/compiler/xla/client:xla_builder", 66 "//tensorflow/compiler/xla/client:xla_computation", 67 "//tensorflow/compiler/xla/client/lib:arithmetic", 68 "//tensorflow/core:lib", 69 "@com_google_absl//absl/types:span", 70 ], 71) 72 73cc_library( 74 name = "util", 75 srcs = ["util.cc"], 76 hdrs = ["util.h"], 77 deps = [ 78 "//tensorflow/compiler/xla:literal", 79 "//tensorflow/compiler/xla:literal_util", 80 "//tensorflow/compiler/xla:shape_util", 81 "//tensorflow/compiler/xla:status_macros", 82 "//tensorflow/compiler/xla:statusor", 83 "//tensorflow/compiler/xla:util", 84 "//tensorflow/compiler/xla/client:xla_builder", 85 "//tensorflow/compiler/xla/client:xla_computation", 86 "//tensorflow/core:lib", 87 "@com_google_absl//absl/types:span", 88 ], 89) 90 91cc_library( 92 name = "data_format", 93 srcs = ["data_format.cc"], 94 hdrs = ["data_format.h"], 95 deps = [ 96 "//tensorflow/compiler/xla:statusor", 97 "//tensorflow/compiler/xla:util", 98 "//tensorflow/compiler/xla/client:xla_builder", 99 "//tensorflow/core:framework", 100 "//tensorflow/core:lib", 101 ], 102) 103