From f96c3fb234c3411ec9b162661826ffaa0ef377a8 Mon Sep 17 00:00:00 2001 From: Yifei Feng Date: Mon, 19 Nov 2018 10:46:50 -0800 Subject: [PATCH] Run buildifier on some files. PiperOrigin-RevId: 222101413 --- third_party/googleapis.BUILD | 14 ++++++----- third_party/mkl_dnn/mkldnn.BUILD | 2 +- third_party/nccl/archive.BUILD | 26 +++++++++---------- third_party/ngraph/ngraph.BUILD | 26 +++++++++---------- third_party/ngraph/ngraph_tf.BUILD | 40 +++++++++++++++--------------- third_party/ngraph/tbb.BUILD | 10 ++++---- 6 files changed, 60 insertions(+), 58 deletions(-) diff --git a/third_party/googleapis.BUILD b/third_party/googleapis.BUILD index 95e999af188..b8871eda728 100644 --- a/third_party/googleapis.BUILD +++ b/third_party/googleapis.BUILD @@ -13,7 +13,9 @@ # limitations under the License. package(default_visibility = ["//visibility:public"]) + licenses(["notice"]) # Apache 2.0 + exports_files(["LICENSE"]) load("@protobuf_archive//:protobuf.bzl", "cc_proto_library") @@ -21,6 +23,9 @@ load("@protobuf_archive//:protobuf.bzl", "cc_proto_library") cc_proto_library( name = "bigtable_protos", srcs = [ + "google/api/annotations.proto", + "google/api/auth.proto", + "google/api/http.proto", "google/bigtable/admin/v2/bigtable_instance_admin.proto", "google/bigtable/admin/v2/bigtable_table_admin.proto", "google/bigtable/admin/v2/common.proto", @@ -31,15 +36,12 @@ cc_proto_library( "google/iam/v1/iam_policy.proto", "google/iam/v1/policy.proto", "google/longrunning/operations.proto", - "google/rpc/status.proto", "google/rpc/error_details.proto", - "google/api/annotations.proto", - "google/api/auth.proto", - "google/api/http.proto", + "google/rpc/status.proto", ], include = ".", - protoc = "@protobuf_archive//:protoc", default_runtime = "@protobuf_archive//:protobuf", - deps = ["@protobuf_archive//:cc_wkt_protos"], + protoc = "@protobuf_archive//:protoc", use_grpc_plugin = True, + deps = ["@protobuf_archive//:cc_wkt_protos"], ) diff --git a/third_party/mkl_dnn/mkldnn.BUILD b/third_party/mkl_dnn/mkldnn.BUILD index 597ac69e2ff..7a8ed3bf439 100644 --- a/third_party/mkl_dnn/mkldnn.BUILD +++ b/third_party/mkl_dnn/mkldnn.BUILD @@ -42,8 +42,8 @@ cc_library( "src", "src/common", "src/cpu", - "src/cpu/xbyak", "src/cpu/gemm", + "src/cpu/xbyak", ], nocopts = "-fno-exceptions", visibility = ["//visibility:public"], diff --git a/third_party/nccl/archive.BUILD b/third_party/nccl/archive.BUILD index c0833828a73..7a08f97ef32 100644 --- a/third_party/nccl/archive.BUILD +++ b/third_party/nccl/archive.BUILD @@ -64,13 +64,13 @@ nccl_library( ":device_srcs", ], copts = ["-DNCCL_OP=0"] + rdc_copts(), + linkstatic = True, prefix = "sum_", deps = [ - ":src_hdrs", ":include_hdrs", + ":src_hdrs", "@local_config_cuda//cuda:cuda_headers", ], - linkstatic = True, ) nccl_library( @@ -80,13 +80,13 @@ nccl_library( ":device_srcs", ], copts = ["-DNCCL_OP=1"] + rdc_copts(), + linkstatic = True, prefix = "_prod", deps = [ - ":src_hdrs", ":include_hdrs", + ":src_hdrs", "@local_config_cuda//cuda:cuda_headers", ], - linkstatic = True, ) nccl_library( @@ -96,13 +96,13 @@ nccl_library( ":device_srcs", ], copts = ["-DNCCL_OP=2"] + rdc_copts(), + linkstatic = True, prefix = "min_", deps = [ - ":src_hdrs", ":include_hdrs", + ":src_hdrs", "@local_config_cuda//cuda:cuda_headers", ], - linkstatic = True, ) nccl_library( @@ -112,28 +112,28 @@ nccl_library( ":device_srcs", ], copts = ["-DNCCL_OP=3"] + rdc_copts(), + linkstatic = True, prefix = "max_", deps = [ - ":src_hdrs", ":include_hdrs", + ":src_hdrs", "@local_config_cuda//cuda:cuda_headers", ], - linkstatic = True, ) nccl_library( name = "functions", srcs = [ - ":device_hdrs", "src/collectives/device/functions.cu", + ":device_hdrs", ], copts = rdc_copts(), + linkstatic = True, deps = [ - ":src_hdrs", ":include_hdrs", + ":src_hdrs", "@local_config_cuda//cuda:cuda_headers", ], - linkstatic = True, ) rdc_library( @@ -162,13 +162,13 @@ nccl_library( "src/nccl.h", ], hdrs = ["src/nccl.h"], + copts = cuda_default_copts(), include_prefix = "third_party/nccl", strip_include_prefix = "src", - copts = cuda_default_copts(), + visibility = ["//visibility:public"], deps = [ ":device_code", ":include_hdrs", ":src_hdrs", ], - visibility = ["//visibility:public"], ) diff --git a/third_party/ngraph/ngraph.BUILD b/third_party/ngraph/ngraph.BUILD index f556c5279df..63e9548c532 100644 --- a/third_party/ngraph/ngraph.BUILD +++ b/third_party/ngraph/ngraph.BUILD @@ -97,13 +97,6 @@ cc_library( "src/ngraph/runtime/cpu/pass/cpu_workspace_insertion.cpp", ], hdrs = glob(["src/ngraph/runtime/cpu/**/*.hpp"]) + glob([]), - deps = [ - ":ngraph_headers", - "@eigen_archive//:eigen", - "@nlohmann_json_lib", - "@tbb", - "@mkl_dnn//:mkl_dnn", - ], copts = [ "-I external/ngraph/src", "-I external/nlohmann_json_lib/include/", @@ -113,6 +106,13 @@ cc_library( '-D PROJECT_ROOT_DIR=\\"\\"', ], visibility = ["//visibility:public"], + deps = [ + ":ngraph_headers", + "@eigen_archive//:eigen", + "@mkl_dnn", + "@nlohmann_json_lib", + "@tbb", + ], alwayslink = 1, ) @@ -138,12 +138,6 @@ cc_library( "src/ngraph/runtime/*.cpp", "src/ngraph/type/*.cpp", ]), - deps = [ - ":ngraph_headers", - ":ngraph_cpu_backend", - "@eigen_archive//:eigen", - "@nlohmann_json_lib", - ], copts = [ "-I external/ngraph/src", "-I external/nlohmann_json_lib/include/", @@ -152,5 +146,11 @@ cc_library( '-D PROJECT_ROOT_DIR=\\"\\"', ], visibility = ["//visibility:public"], + deps = [ + ":ngraph_cpu_backend", + ":ngraph_headers", + "@eigen_archive//:eigen", + "@nlohmann_json_lib", + ], alwayslink = 1, ) diff --git a/third_party/ngraph/ngraph_tf.BUILD b/third_party/ngraph/ngraph_tf.BUILD index 068e411e81b..db9a66f9b5b 100644 --- a/third_party/ngraph/ngraph_tf.BUILD +++ b/third_party/ngraph/ngraph_tf.BUILD @@ -10,6 +10,10 @@ load( cc_library( name = "ngraph_tf", srcs = [ + "logging/ngraph_log.cc", + "logging/ngraph_log.h", + "logging/tf_graph_writer.cc", + "logging/tf_graph_writer.h", "src/ngraph_api.cc", "src/ngraph_api.h", "src/ngraph_assign_clusters.cc", @@ -41,27 +45,23 @@ cc_library( "src/tf_deadness_analysis.h", "src/tf_graphcycles.cc", "src/tf_graphcycles.h", - "logging/ngraph_log.h", - "logging/ngraph_log.cc", - "logging/tf_graph_writer.h", - "logging/tf_graph_writer.cc", - ], - deps = [ - "@org_tensorflow//tensorflow/core:protos_all_proto_text", - "@org_tensorflow//tensorflow/core:framework_headers_lib", - "@org_tensorflow//tensorflow/core:core_cpu_headers_lib", - "@ngraph//:ngraph_core", - "@com_google_absl//absl/container:container_memory", - "@com_google_absl//absl/container:flat_hash_set", - "@com_google_absl//absl/types:variant", ], copts = [ "-I external/ngraph_tf/src", "-I external/ngraph_tf/logging", "-I external/ngraph/src", ], - alwayslink = 1, visibility = ["//visibility:public"], + deps = [ + "@com_google_absl//absl/container:container_memory", + "@com_google_absl//absl/container:flat_hash_set", + "@com_google_absl//absl/types:variant", + "@ngraph//:ngraph_core", + "@org_tensorflow//tensorflow/core:core_cpu_headers_lib", + "@org_tensorflow//tensorflow/core:framework_headers_lib", + "@org_tensorflow//tensorflow/core:protos_all_proto_text", + ], + alwayslink = 1, ) tf_cc_test( @@ -82,6 +82,12 @@ tf_cc_test( "test/test_utilities.h", "test/tf_exec.cpp", ], + extra_copts = [ + "-fexceptions ", + "-I external/ngraph_tf/src", + "-I external/ngraph_tf/logging", + "-I external/ngraph/src", + ], deps = [ ":ngraph_tf", "@com_google_googletest//:gtest", @@ -89,10 +95,4 @@ tf_cc_test( "@org_tensorflow//tensorflow/cc:client_session", "@org_tensorflow//tensorflow/core:tensorflow", ], - extra_copts = [ - "-fexceptions ", - "-I external/ngraph_tf/src", - "-I external/ngraph_tf/logging", - "-I external/ngraph/src", - ], ) diff --git a/third_party/ngraph/tbb.BUILD b/third_party/ngraph/tbb.BUILD index 04e6544ffb5..c78a2d79ddf 100644 --- a/third_party/ngraph/tbb.BUILD +++ b/third_party/ngraph/tbb.BUILD @@ -14,6 +14,10 @@ genrule( srcs = glob(["**"]) + [ "@local_config_cc//:toolchain", ], + outs = [ + "libtbb.a", + "libtbbmalloc.a", + ], cmd = """ set -e WORK_DIR=$$PWD @@ -45,19 +49,15 @@ genrule( cp build/build_{release,debug}/*.a $$DEST_DIR cd $$WORK_DIR """, - outs = [ - "libtbb.a", - "libtbbmalloc.a", - ], ) cc_library( name = "tbb", + srcs = ["libtbb.a"], hdrs = glob([ "include/serial/**", "include/tbb/**/**", ]), - srcs = ["libtbb.a"], includes = ["include"], visibility = ["//visibility:public"], )