1313# limitations under the License.
1414# ==============================================================================
1515
16- load ("@tf//google/protobuf :protobuf.bzl" , "cc_proto_library" )
17- load ("@tf//google/protobuf :protobuf.bzl" , "py_proto_library" )
16+ load ("@protobuf// :protobuf.bzl" , "cc_proto_library" )
17+ load ("@protobuf// :protobuf.bzl" , "py_proto_library" )
1818
1919def if_cuda (if_true , if_false = []):
20- """Shorthand for select()'ing on whether we're building with CUDA.
21-
22- Returns a select statement which evaluates to if_true if we're building
23- with CUDA enabled. Otherwise, the select statement evaluates to if_false.
24-
25- """
20+ """Shorthand for select()'ing on whether we're building with CUDA."""
2621 return select ({
27- "@tf //third_party/gpus/cuda:using_nvcc" : if_true ,
28- "@tf //third_party/gpus/cuda:using_gcudacc" : if_true ,
22+ "@org_tensorflow //third_party/gpus/cuda:using_nvcc" : if_true ,
23+ "@org_tensorflow //third_party/gpus/cuda:using_gcudacc" : if_true ,
2924 "//conditions:default" : if_false
3025 })
3126
3227def tf_copts ():
3328 return (["-fno-exceptions" , "-DEIGEN_AVOID_STL_ARRAY" ,] +
3429 if_cuda (["-DGOOGLE_CUDA=1" ]) +
35- select ({"@tf //tensorflow:darwin" : [],
30+ select ({"@org_tensorflow //tensorflow:darwin" : [],
3631 "//conditions:default" : ["-pthread" ]}))
3732
3833def tf_proto_library (name , srcs = [], has_services = False ,
@@ -47,9 +42,9 @@ def tf_proto_library(name, srcs=[], has_services=False,
4742 cc_proto_library (name = name ,
4843 srcs = srcs ,
4944 deps = deps ,
50- cc_libs = ["@tf//google/protobuf :protobuf" ],
51- protoc = "@tf//google/protobuf :protoc" ,
52- default_runtime = "@tf//google/protobuf :protobuf" ,
45+ cc_libs = ["@protobuf// :protobuf" ],
46+ protoc = "@protobuf// :protoc" ,
47+ default_runtime = "@protobuf// :protobuf" ,
5348 testonly = testonly ,
5449 visibility = visibility ,)
5550
@@ -58,8 +53,8 @@ def tf_proto_library_py(name, srcs=[], deps=[], visibility=None, testonly=0):
5853 srcs = srcs ,
5954 srcs_version = "PY2AND3" ,
6055 deps = deps ,
61- default_runtime = "@tf//google/protobuf :protobuf_python" ,
62- protoc = "@tf//google/protobuf :protoc" ,
56+ default_runtime = "@protobuf// :protobuf_python" ,
57+ protoc = "@protobuf// :protoc" ,
6358 visibility = visibility ,
6459 testonly = testonly ,)
6560
@@ -72,7 +67,7 @@ def tf_gen_op_libs(op_lib_names):
7267 native .cc_library (name = n + "_op_lib" ,
7368 copts = tf_copts (),
7469 srcs = ["ops/" + n + ".cc" ],
75- deps = (["@tf //tensorflow/core:framework" ]),
70+ deps = (["@org_tensorflow //tensorflow/core:framework" ]),
7671 visibility = ["//visibility:public" ],
7772 alwayslink = 1 ,
7873 linkstatic = 1 ,)
@@ -89,8 +84,8 @@ def tf_gen_op_wrapper_py(name, out=None, hidden=[], visibility=None, deps=[],
8984 linkopts = ["-lm" ],
9085 copts = tf_copts (),
9186 linkstatic = 1 , # Faster to link this one-time-use binary dynamically
92- deps = (["@tf //tensorflow/core:framework" ,
93- "@tf //tensorflow/python:python_op_gen_main" ] + deps ),
87+ deps = (["@org_tensorflow //tensorflow/core:framework" ,
88+ "@org_tensorflow //tensorflow/python:python_op_gen_main" ] + deps ),
9489 )
9590
9691 # Invoke the previous cc_binary to generate a python file.
@@ -110,5 +105,5 @@ def tf_gen_op_wrapper_py(name, out=None, hidden=[], visibility=None, deps=[],
110105 srcs_version = "PY2AND3" ,
111106 visibility = visibility ,
112107 deps = [
113- "@tf //tensorflow/python:framework_for_generated_wrappers" ,
108+ "@org_tensorflow //tensorflow/python:framework_for_generated_wrappers" ,
114109 ],)
0 commit comments