1 # Description: 2 # Contains ops to build an input pipeline for tensorflow. 3 # APIs here are meant to evolve over time. 4 5 licenses(["notice"]) # Apache 2.0 6 7 exports_files(["LICENSE"]) 8 9 package(default_visibility = ["//visibility:public"]) 10 11 load( 12 "//tensorflow:tensorflow.bzl", 13 "py_test", 14 "tf_custom_op_library", 15 "tf_cc_tests", 16 "tf_gen_op_libs", 17 "tf_gen_op_wrapper_py", 18 "tf_kernel_library", 19 ) 20 load( 21 "//tensorflow/core:platform/default/build_config.bzl", 22 "tf_kernel_tests_linkstatic", 23 ) 24 load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library") 25 26 tf_custom_op_library( 27 # TODO(sibyl-Mooth6ku,ptucker): Understand why 'python/ops/_' is needed and fix it. 28 name = "python/ops/_input_pipeline_ops.so", 29 srcs = [ 30 "ops/input_pipeline_ops.cc", 31 ], 32 deps = [ 33 "//tensorflow/contrib/input_pipeline/kernels:input_pipeline_kernels", 34 ], 35 ) 36 37 tf_gen_op_libs( 38 op_lib_names = ["input_pipeline_ops"], 39 ) 40 41 tf_gen_op_wrapper_py( 42 name = "input_pipeline_ops", 43 deps = [":input_pipeline_ops_op_lib"], 44 ) 45 46 tf_kernel_library( 47 name = "input_pipeline_ops_kernels", 48 deps = [ 49 "//tensorflow/contrib/input_pipeline/kernels:input_pipeline_kernels", 50 "//tensorflow/core:framework", 51 ], 52 alwayslink = 1, 53 ) 54 55 tf_custom_op_py_library( 56 name = "input_pipeline_py", 57 srcs = glob(["python/ops/*.py"]) + ["__init__.py"], 58 dso = [":python/ops/_input_pipeline_ops.so"], 59 kernels = [ 60 ":input_pipeline_ops_kernels", 61 ":input_pipeline_ops_op_lib", 62 ], 63 srcs_version = "PY2AND3", 64 deps = [ 65 ":input_pipeline_ops", 66 "//tensorflow/contrib/util:util_py", 67 "//tensorflow/python:client_testlib", 68 "//tensorflow/python:errors", 69 "//tensorflow/python:framework_for_generated_wrappers", 70 "//tensorflow/python:platform", 71 "//tensorflow/python:state_ops", 72 "//tensorflow/python:util", 73 "//tensorflow/python:variable_scope", 74 "//tensorflow/python:variables", 75 ], 76 ) 77 78 py_test( 79 name = "input_pipeline_ops_test", 80 size = "small", 81 srcs = ["python/ops/input_pipeline_ops_test.py"], 82 srcs_version = "PY2AND3", 83 deps = [ 84 ":input_pipeline_py", 85 "//tensorflow/python:client_testlib", 86 "//tensorflow/python:constant_op", 87 "//tensorflow/python:dtypes", 88 "//tensorflow/python:errors", 89 "//tensorflow/python:state_ops", 90 "//tensorflow/python:variables", 91 ], 92 ) 93 94 tf_cc_tests( 95 name = "input_pipeline_ops_test", 96 size = "small", 97 srcs = [ 98 "ops/input_pipeline_ops_test.cc", 99 ], 100 linkstatic = tf_kernel_tests_linkstatic(), 101 deps = [ 102 ":input_pipeline_ops_op_lib", 103 "//tensorflow/cc:cc_ops", 104 "//tensorflow/core", 105 "//tensorflow/core:core_cpu", 106 "//tensorflow/core:core_cpu_internal", 107 "//tensorflow/core:framework", 108 "//tensorflow/core:framework_internal", 109 "//tensorflow/core:lib", 110 "//tensorflow/core:lib_internal", 111 "//tensorflow/core:ops", 112 "//tensorflow/core:test", 113 "//tensorflow/core:test_main", 114 "//tensorflow/core:testlib", 115 ], 116 ) 117