aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/resampler/BUILD
blob: 48345d7030bea431152bbed934af9f500f2c15c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
licenses(["notice"])  # Apache 2.0 License

exports_files(["LICENSE"])

package(default_visibility = ["//visibility:public"])

load(
    "//tensorflow:tensorflow.bzl",
    "tf_custom_op_library",
    "tf_custom_op_py_library",
    "tf_gen_op_libs",
    "tf_gen_op_wrapper_py",
    "tf_kernel_library",
)
load("//tensorflow:tensorflow.bzl", "cuda_py_test")

tf_custom_op_py_library(
    name = "resampler_py",
    srcs = ["__init__.py"] + glob(["python/ops/*.py"]),
    dso = [":python/ops/_resampler_ops.so"],
    kernels = [
        ":resampler_ops_kernels",
        ":resampler_ops_op_lib",
    ],
    visibility = ["//visibility:public"],
    deps = [
        ":resampler_ops",
        "//tensorflow/contrib/util:util_py",
        "//tensorflow/python:array_ops",
        "//tensorflow/python:client_testlib",
        "//tensorflow/python:constant_op",
        "//tensorflow/python:dtypes",
        "//tensorflow/python:errors",
        "//tensorflow/python:framework_ops",
        "//tensorflow/python:platform",
        "//tensorflow/python:util",
        "//third_party/py/numpy",
    ],
)

tf_kernel_library(
    name = "resampler_ops_kernels",
    prefix = "resampler_ops",
    deps = [
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
    ],
    alwayslink = 1,
)

tf_custom_op_library(
    name = "python/ops/_resampler_ops.so",
    srcs = [
        "kernels/resampler_ops.cc",
        "kernels/resampler_ops.h",
        "ops/resampler_ops.cc",
    ],
    gpu_srcs = [
        "kernels/resampler_ops_gpu.cu.cc",
        "kernels/resampler_ops.h",
    ],
)

tf_gen_op_libs(
    op_lib_names = [
        "resampler_ops",
    ],
)

tf_gen_op_wrapper_py(
    name = "resampler_ops",
    deps = [":resampler_ops_op_lib"],
)

cuda_py_test(
    name = "resampler_ops_test",
    size = "small",
    srcs = ["python/ops/resampler_ops_test.py"],
    additional_deps = [
        ":resampler_py",
        "//tensorflow/python:client_testlib",
        "//tensorflow/python:constant_op",
        "//tensorflow/python:dtypes",
        "//tensorflow/python:errors",
        "//tensorflow/python:array_ops",
    ],
)