# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Aggregation Protocol Package load("@org_tensorflow//tensorflow/core/platform:build_config.bzl", "tf_proto_library") load("//fcp:config.bzl", "FCP_COPTS") load("@com_github_grpc_grpc//bazel:python_rules.bzl", "py_proto_library") package( default_visibility = ["//fcp/aggregation:internal"], licenses = ["notice"], # Apache 2.0 ) proto_library( name = "proto", srcs = ["aggregation_protocol_messages.proto"], deps = [ "//fcp/secagg/shared:proto", ], ) cc_proto_library( name = "cc_proto", deps = [ ":proto", ], ) py_proto_library( name = "py_pb2", deps = [ ":proto", ], ) # Using tf_proto_library to get dependencies to TF protos built correctly. tf_proto_library( name = "configuration_proto", srcs = ["configuration.proto"], protodeps = [ "@org_tensorflow//tensorflow/core:protos_all", ], ) # Allowing to refer to the cc library generated by the rule above in usual way: alias( name = "configuration_cc_proto", actual = "configuration_proto_cc", ) alias( name = "configuration_py_pb2", actual = "configuration_proto_py", ) cc_library( name = "aggregation_protocol", hdrs = [ "aggregation_protocol.h", ], copts = FCP_COPTS, deps = [ ":cc_proto", "@com_google_absl//absl/status", "@com_google_absl//absl/strings:cord", ], ) cc_library( name = "resource_resolver", hdrs = [ "resource_resolver.h", ], copts = FCP_COPTS, deps = [ "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings:cord", ], ) cc_library( name = "checkpoint_builder", hdrs = [ "checkpoint_builder.h", ], copts = FCP_COPTS, deps = [ "//fcp/aggregation/core:tensor", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings:cord", ], ) cc_library( name = "checkpoint_parser", hdrs = [ "checkpoint_parser.h", ], copts = FCP_COPTS, deps = [ "//fcp/aggregation/core:tensor", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings:cord", ], )