Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 1 | licenses(["notice"]) # Apache 2.0 |
| 2 | |
| 3 | package( |
| 4 | default_visibility = [ |
| 5 | "//tensorflow/compiler/tf2xla:internal", |
| 6 | ], |
| 7 | features = ["no_layering_check"], |
| 8 | ) |
| 9 | |
| 10 | load("//tensorflow:tensorflow.bzl", "tf_kernel_library") |
| 11 | load("//tensorflow/compiler/xla:xla.bzl", "export_dynamic_linkopts") |
| 12 | |
| 13 | tf_kernel_library( |
| 14 | name = "xla_ops", |
| 15 | srcs = [ |
| 16 | "aggregate_ops.cc", |
Peter Hawkins | 2e307b4 | 2017-04-19 09:35:12 -0800 | [diff] [blame] | 17 | "arg_op.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 18 | "batch_matmul_op.cc", |
A. Unique TensorFlower | 88fff5a | 2017-08-02 15:40:43 -0700 | [diff] [blame^] | 19 | "batch_norm_op.cc", |
Peter Hawkins | 96bc32e | 2017-04-06 12:02:29 -0800 | [diff] [blame] | 20 | "batchtospace_op.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 21 | "bcast_ops.cc", |
| 22 | "bias_ops.cc", |
| 23 | "binary_ops.cc", |
| 24 | "cast_op.cc", |
| 25 | "concat_op.cc", |
Peter Hawkins | 2e307b4 | 2017-04-19 09:35:12 -0800 | [diff] [blame] | 26 | "const_op.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 27 | "conv_ops.cc", |
Chris Leary | 32e198f | 2017-07-26 18:39:34 -0700 | [diff] [blame] | 28 | "cross_op.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 29 | "cwise_ops.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 30 | "diag_op.cc", |
| 31 | "dynamic_stitch_op.cc", |
A. Unique TensorFlower | a291c8a | 2017-04-06 07:14:08 -0800 | [diff] [blame] | 32 | "elu_op.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 33 | "fill_op.cc", |
| 34 | "function_ops.cc", |
| 35 | "identity_op.cc", |
| 36 | "l2loss_op.cc", |
| 37 | "lrn_ops.cc", |
| 38 | "matmul_op.cc", |
Chris Leary | 3cc5fc0 | 2017-08-01 07:59:31 -0700 | [diff] [blame] | 39 | "mirror_pad_op.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 40 | "no_op.cc", |
Peter Hawkins | f424ca3 | 2017-03-01 06:15:30 -0800 | [diff] [blame] | 41 | "one_hot_op.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 42 | "pack_op.cc", |
| 43 | "pad_op.cc", |
| 44 | "pooling_ops.cc", |
| 45 | "random_ops.cc", |
| 46 | "reduction_ops.cc", |
| 47 | "reduction_ops_common.cc", |
| 48 | "relu_op.cc", |
| 49 | "reshape_op.cc", |
| 50 | "retval_op.cc", |
A. Unique TensorFlower | 8633b22 | 2017-03-07 17:30:49 -0800 | [diff] [blame] | 51 | "reverse_op.cc", |
A. Unique TensorFlower | b4c97bf | 2017-07-25 12:53:50 -0700 | [diff] [blame] | 52 | "segment_reduction_ops.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 53 | "select_op.cc", |
| 54 | "sequence_ops.cc", |
| 55 | "shape_op.cc", |
| 56 | "slice_op.cc", |
| 57 | "softmax_op.cc", |
Peter Hawkins | 96bc32e | 2017-04-06 12:02:29 -0800 | [diff] [blame] | 58 | "spacetobatch_op.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 59 | "split_op.cc", |
Peter Hawkins | eb1fe50 | 2017-07-12 06:58:36 -0700 | [diff] [blame] | 60 | "stack_ops.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 61 | "strided_slice_op.cc", |
Peter Hawkins | c19e6ca | 2017-06-07 14:55:31 -0700 | [diff] [blame] | 62 | "tensor_array_ops.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 63 | "tile_ops.cc", |
Peter Hawkins | 09adaff | 2017-03-14 14:49:09 -0800 | [diff] [blame] | 64 | "training_ops.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 65 | "transpose_op.cc", |
| 66 | "unary_ops.cc", |
| 67 | "unpack_op.cc", |
Peter Hawkins | 542c3cb | 2017-02-21 19:41:11 -0800 | [diff] [blame] | 68 | "variable_ops.cc", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 69 | ], |
| 70 | hdrs = [ |
| 71 | "cwise_ops.h", |
| 72 | "reduction_ops.h", |
| 73 | ], |
| 74 | deps = [ |
Peter Hawkins | 3e9cd2e | 2017-06-15 15:23:51 -0700 | [diff] [blame] | 75 | ":while_op", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 76 | "//tensorflow/compiler/tf2xla:common", |
| 77 | "//tensorflow/compiler/tf2xla:xla_compiler", |
| 78 | "//tensorflow/compiler/xla:literal_util", |
| 79 | "//tensorflow/compiler/xla/client:client_library", |
| 80 | "//tensorflow/compiler/xla/client:computation_builder", |
| 81 | "//tensorflow/compiler/xla/client/lib:arithmetic", |
| 82 | "//tensorflow/core:framework", |
| 83 | "//tensorflow/core:lib", |
| 84 | "//tensorflow/core:tensorflow_opensource", |
| 85 | "//tensorflow/core/kernels:concat_lib", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 86 | "//tensorflow/core/kernels:conv_ops", |
| 87 | "//tensorflow/core/kernels:cwise_op", |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 88 | "//tensorflow/core/kernels:no_op", |
| 89 | "//tensorflow/core/kernels:ops_util", |
| 90 | "//tensorflow/core/kernels:pooling_ops", |
| 91 | "//tensorflow/core/kernels:sendrecv_ops", |
| 92 | "//tensorflow/core/kernels:transpose_op", |
| 93 | ], |
| 94 | ) |
| 95 | |
Peter Hawkins | 3e9cd2e | 2017-06-15 15:23:51 -0700 | [diff] [blame] | 96 | tf_kernel_library( |
| 97 | name = "while_op", |
| 98 | srcs = ["while_op.cc"], |
| 99 | hdrs = ["while_op.h"], |
| 100 | deps = [ |
| 101 | "//tensorflow/compiler/tf2xla:common", |
| 102 | "//tensorflow/compiler/tf2xla:xla_compiler", |
| 103 | "//tensorflow/compiler/tf2xla/ops:functional_ops", |
| 104 | "//tensorflow/compiler/xla/client:computation_builder", |
| 105 | "//tensorflow/core:framework", |
| 106 | "//tensorflow/core:lib", |
| 107 | "//tensorflow/core:tensorflow_opensource", |
| 108 | ], |
| 109 | ) |
| 110 | |
Peter Hawkins | 1e67c90 | 2017-01-09 12:04:37 -0800 | [diff] [blame] | 111 | # Kernels that only work on CPU, because they use XLA custom calls. |
| 112 | # Only link this when using the CPU backend for XLA. |
| 113 | # |
| 114 | # TODO(cwhipkey): move into xla_ops when ops can be registered for |
| 115 | # CPU compilation only (b/31363654). |
| 116 | tf_kernel_library( |
| 117 | name = "xla_cpu_only_ops", |
| 118 | srcs = [ |
| 119 | "gather_op.cc", |
| 120 | "index_ops.cc", |
| 121 | ], |
| 122 | deps = [ |
| 123 | ":gather_op_kernel_float_int32", |
| 124 | ":gather_op_kernel_float_int64", |
| 125 | ":index_ops_kernel_argmax_float_1d", |
| 126 | ":index_ops_kernel_argmax_float_2d", |
| 127 | "//tensorflow/compiler/tf2xla:common", |
| 128 | "//tensorflow/compiler/tf2xla:xla_compiler", |
| 129 | "//tensorflow/compiler/xla:literal_util", |
| 130 | "//tensorflow/compiler/xla/client:client_library", |
| 131 | "//tensorflow/compiler/xla/client:computation_builder", |
| 132 | "//tensorflow/compiler/xla/client/lib:arithmetic", |
| 133 | "//tensorflow/core:framework", |
| 134 | "//tensorflow/core:lib", |
| 135 | "//tensorflow/core:tensorflow_opensource", |
| 136 | ], |
| 137 | ) |
| 138 | |
| 139 | tf_kernel_library( |
| 140 | name = "gather_op_kernel_float_int32", |
| 141 | srcs = ["gather_op_kernel_float_int32.cc"], |
| 142 | # Makes the custom-call function visible to LLVM during JIT. |
| 143 | linkopts = export_dynamic_linkopts, |
| 144 | visibility = ["//visibility:public"], |
| 145 | deps = [ |
| 146 | "//tensorflow/compiler/tf2xla:xla_local_runtime_context", |
| 147 | "//tensorflow/core:framework_lite", |
| 148 | "//tensorflow/core/kernels:gather_functor", |
| 149 | "//third_party/eigen3", |
| 150 | ], |
| 151 | ) |
| 152 | |
| 153 | tf_kernel_library( |
| 154 | name = "gather_op_kernel_float_int64", |
| 155 | srcs = ["gather_op_kernel_float_int64.cc"], |
| 156 | # Makes the custom-call function visible to LLVM during JIT. |
| 157 | linkopts = export_dynamic_linkopts, |
| 158 | visibility = ["//visibility:public"], |
| 159 | deps = [ |
| 160 | "//tensorflow/compiler/tf2xla:xla_local_runtime_context", |
| 161 | "//tensorflow/core:framework_lite", |
| 162 | "//tensorflow/core/kernels:gather_functor", |
| 163 | "//third_party/eigen3", |
| 164 | ], |
| 165 | ) |
| 166 | |
| 167 | tf_kernel_library( |
| 168 | name = "index_ops_kernel_argmax_float_1d", |
| 169 | srcs = ["index_ops_kernel_argmax_float_1d.cc"], |
| 170 | # Makes the custom-call function visible to LLVM during JIT. |
| 171 | linkopts = export_dynamic_linkopts, |
| 172 | visibility = ["//visibility:public"], |
| 173 | deps = [ |
| 174 | "//tensorflow/core:framework_lite", |
| 175 | "//third_party/eigen3", |
| 176 | ], |
| 177 | ) |
| 178 | |
| 179 | tf_kernel_library( |
| 180 | name = "index_ops_kernel_argmax_float_2d", |
| 181 | srcs = ["index_ops_kernel_argmax_float_2d.cc"], |
| 182 | # Makes the custom-call function visible to LLVM during JIT. |
| 183 | linkopts = export_dynamic_linkopts, |
| 184 | visibility = ["//visibility:public"], |
| 185 | deps = [ |
| 186 | "//tensorflow/core:framework_lite", |
| 187 | "//third_party/eigen3", |
| 188 | ], |
| 189 | ) |
| 190 | |
| 191 | # ----------------------------------------------------------------------------- |
| 192 | |
| 193 | filegroup( |
| 194 | name = "all_files", |
| 195 | srcs = glob( |
| 196 | ["**/*"], |
| 197 | exclude = [ |
| 198 | "**/METADATA", |
| 199 | "**/OWNERS", |
| 200 | ], |
| 201 | ), |
| 202 | visibility = ["//tensorflow:__subpackages__"], |
| 203 | ) |