1313# limitations under the License.
1414
1515load ("@rules_cc//cc:cc_test.bzl" , "cc_test" )
16- load ("//struct2tensor:struct2tensor.bzl" , "py_proto_library" )
16+
17+ # Placeholder: load py_proto_library
18+ # Placeholder: load py_binary
19+ # Placeholder: load py_library
20+ # Placeholder: load py_test
21+ load ("//third_party/protobuf/bazel:proto_library.bzl" , "proto_library" )
22+ load ("//tools/build_defs/proto/cpp:cc_proto_library.bzl" , "cc_proto_library" )
1723
1824licenses (["notice" ])
1925
@@ -29,28 +35,26 @@ py_proto_library(
2935 deps = [":benchmark_proto" ],
3036)
3137
32- # Use native cc_proto_library instead of custom macro since we already have proto_library defined
3338cc_proto_library (
3439 name = "benchmark_cc_proto" ,
3540 deps = [":benchmark_proto" ],
3641)
3742
38- # Google-internal benchmark - commented out for OSS
39- # cc_test(
40- # name = "serialization_benchmark",
41- # srcs = ["serialization_benchmark.cc"],
42- # deps = [
43- # ":benchmark_cc_proto",
44- # "//testing/base/public:gunit",
45- # "@com_google_absl//absl/flags:flag",
46- # "@com_google_absl//absl/flags:parse",
47- # "@com_google_absl//absl/random",
48- # "@com_google_absl//absl/random:distributions",
49- # "@com_google_protobuf//:protobuf",
50- # "@org_tensorflow//tensorflow/core:feature_util",
51- # "@org_tensorflow//tensorflow/core:protos_all_cc",
52- # ],
53- # )
43+ cc_test (
44+ name = "serialization_benchmark" ,
45+ srcs = ["serialization_benchmark.cc" ],
46+ deps = [
47+ ":benchmark_cc_proto" ,
48+ "//testing/base/public:gunit" ,
49+ "@com_google_absl//absl/flags:flag" ,
50+ "@com_google_absl//absl/flags:parse" ,
51+ "@com_google_absl//absl/random" ,
52+ "@com_google_absl//absl/random:distributions" ,
53+ "@com_google_protobuf//:protobuf" ,
54+ "@org_tensorflow//tensorflow/core:feature_util" ,
55+ "@org_tensorflow//tensorflow/core:protos_all_cc" ,
56+ ],
57+ )
5458
5559py_library (
5660 name = "struct2tensor_benchmark_lib" ,
@@ -59,11 +63,10 @@ py_library(
5963 ":benchmark_proto_py_pb2" ,
6064 ":struct2tensor_benchmark_util" ,
6165 "//struct2tensor" ,
62- # Google-internal dependencies - not available in OSS
63- # "//testing/pybase",
64- # "//testing/pybase:parameterized",
65- # "//third_party/py/cpuinfo",
66- # "//third_party/py/psutil",
66+ "//testing/pybase" ,
67+ "//testing/pybase:parameterized" ,
68+ "//third_party/py/cpuinfo" ,
69+ "//third_party/py/psutil" ,
6770 ],
6871)
6972
@@ -109,10 +112,9 @@ py_library(
109112 name = "struct2tensor_benchmark_util" ,
110113 srcs = ["struct2tensor_benchmark_util.py" ],
111114 deps = [
112- # Google-internal dependencies - not available in OSS
113- # "//file/colossus/public:cns",
114- # "//third_party/py/cpuinfo",
115- # "//third_party/py/psutil",
115+ "//file/colossus/public:cns" ,
116+ "//third_party/py/cpuinfo" ,
117+ "//third_party/py/psutil" ,
116118 "@absl_py//absl/flags" ,
117119 "@absl_py//absl/testing:parameterized" ,
118120 ],
0 commit comments