Andrew Harp | 6e3e7d1 | 2017-08-21 12:10:44 -0700 | [diff] [blame] | 1 | licenses(["notice"]) # Apache 2.0 |
| 2 | |
| 3 | exports_files(["LICENSE"]) |
| 4 | |
| 5 | load("//tensorflow:tensorflow.bzl", "tf_custom_op_library") |
| 6 | load("//tensorflow:tensorflow.bzl", "tf_gen_op_libs") |
| 7 | load("//tensorflow:tensorflow.bzl", "tf_gen_op_wrapper_py") |
| 8 | load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library") |
| 9 | load("//tensorflow:tensorflow.bzl", "tf_cc_test") |
| 10 | load("//tensorflow:tensorflow.bzl", "cuda_py_test") |
| 11 | load("//tensorflow:tensorflow.bzl", "tf_kernel_library") |
| 12 | load("//tensorflow/core:platform/default/build_config.bzl", "tf_kernel_tests_linkstatic") |
| 13 | |
| 14 | tf_custom_op_library( |
| 15 | name = "python/ops/_reduce_slice_ops.so", |
| 16 | srcs = [ |
| 17 | "kernels/reduce_slice_ops.cc", |
| 18 | "kernels/reduce_slice_ops.h", |
| 19 | "ops/reduce_slice_ops.cc", |
| 20 | ], |
| 21 | gpu_srcs = [ |
| 22 | "kernels/reduce_slice_ops.h", |
| 23 | "kernels/reduce_slice_ops_gpu.cu.cc", |
| 24 | ], |
| 25 | ) |
| 26 | |
| 27 | tf_kernel_library( |
| 28 | name = "reduce_slice_ops_kernels", |
| 29 | srcs = [ |
| 30 | "kernels/reduce_slice_ops.cc", |
| 31 | ], |
| 32 | hdrs = [ |
| 33 | "kernels/reduce_slice_ops.h", |
| 34 | ], |
| 35 | gpu_srcs = [ |
| 36 | "kernels/reduce_slice_ops.h", |
| 37 | "kernels/reduce_slice_ops_gpu.cu.cc", |
| 38 | ], |
| 39 | deps = [ |
| 40 | "//tensorflow/core:framework", |
| 41 | "//tensorflow/core:lib", |
| 42 | "//third_party/eigen3", |
| 43 | ], |
| 44 | ) |
| 45 | |
| 46 | tf_gen_op_libs( |
| 47 | op_lib_names = ["reduce_slice_ops"], |
| 48 | ) |
| 49 | |
| 50 | tf_gen_op_wrapper_py( |
| 51 | name = "reduce_slice_ops", |
| 52 | deps = [":reduce_slice_ops_op_lib"], |
| 53 | ) |
| 54 | |
| 55 | tf_custom_op_py_library( |
| 56 | name = "reduce_slice_ops_py", |
| 57 | srcs = [ |
| 58 | "__init__.py", |
| 59 | "python/ops/reduce_slice_ops.py", |
| 60 | ], |
| 61 | dso = [ |
| 62 | ":python/ops/_reduce_slice_ops.so", |
| 63 | ], |
Anna R | 2ee43d0 | 2017-08-21 17:09:48 -0700 | [diff] [blame] | 64 | kernels = [ |
| 65 | ":reduce_slice_ops_kernels", |
| 66 | ":reduce_slice_ops_op_lib", |
| 67 | ], |
Andrew Harp | 6e3e7d1 | 2017-08-21 12:10:44 -0700 | [diff] [blame] | 68 | srcs_version = "PY2AND3", |
| 69 | visibility = ["//visibility:public"], |
| 70 | deps = [ |
| 71 | ":reduce_slice_ops", |
| 72 | "//tensorflow/contrib/util:util_py", |
| 73 | "//tensorflow/python:framework", |
A. Unique TensorFlower | ef4490f | 2017-10-30 07:22:44 -0700 | [diff] [blame] | 74 | "//tensorflow/python:platform", |
Andrew Harp | 6e3e7d1 | 2017-08-21 12:10:44 -0700 | [diff] [blame] | 75 | ], |
| 76 | ) |
| 77 | |
| 78 | cuda_py_test( |
| 79 | name = "reduce_slice_ops_test", |
| 80 | size = "small", |
| 81 | srcs = ["python/kernel_tests/reduce_slice_ops_test.py"], |
| 82 | additional_deps = [ |
| 83 | ":reduce_slice_ops_py", |
| 84 | "//tensorflow/python:framework_test_lib", |
| 85 | "//tensorflow/python:platform_test", |
| 86 | "//third_party/py/numpy", |
| 87 | ], |
| 88 | ) |
| 89 | |
| 90 | tf_cc_test( |
| 91 | name = "reduce_slice_ops_test_cc", |
| 92 | size = "small", |
| 93 | srcs = [ |
| 94 | "ops/reduce_slice_ops_test.cc", |
| 95 | ], |
| 96 | linkstatic = tf_kernel_tests_linkstatic(), |
| 97 | deps = [ |
| 98 | ":reduce_slice_ops_op_lib", |
| 99 | "//tensorflow/core:test", |
| 100 | "//tensorflow/core:test_main", |
| 101 | "//tensorflow/core:testlib", |
| 102 | ], |
| 103 | ) |