1313# limitations under the License.
1414
1515load ("@rules_cc//cc:cc_test.bzl" , "cc_test" )
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" )
16+ load ("//struct2tensor:struct2tensor.bzl" , "py_proto_library" )
2317
2418licenses (["notice" ])
2519
@@ -35,26 +29,28 @@ py_proto_library(
3529 deps = [":benchmark_proto" ],
3630)
3731
32+ # Use native cc_proto_library instead of custom macro since we already have proto_library defined
3833cc_proto_library (
3934 name = "benchmark_cc_proto" ,
4035 deps = [":benchmark_proto" ],
4136)
4237
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- )
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+ # )
5854
5955py_library (
6056 name = "struct2tensor_benchmark_lib" ,
@@ -63,10 +59,11 @@ py_library(
6359 ":benchmark_proto_py_pb2" ,
6460 ":struct2tensor_benchmark_util" ,
6561 "//struct2tensor" ,
66- "//testing/pybase" ,
67- "//testing/pybase:parameterized" ,
68- "//third_party/py/cpuinfo" ,
69- "//third_party/py/psutil" ,
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",
7067 ],
7168)
7269
@@ -112,9 +109,10 @@ py_library(
112109 name = "struct2tensor_benchmark_util" ,
113110 srcs = ["struct2tensor_benchmark_util.py" ],
114111 deps = [
115- "//file/colossus/public:cns" ,
116- "//third_party/py/cpuinfo" ,
117- "//third_party/py/psutil" ,
112+ # Google-internal dependencies - not available in OSS
113+ # "//file/colossus/public:cns",
114+ # "//third_party/py/cpuinfo",
115+ # "//third_party/py/psutil",
118116 "@absl_py//absl/flags" ,
119117 "@absl_py//absl/testing:parameterized" ,
120118 ],
0 commit comments