standardize BUILD files format using buildifier (#3395)

run `buildifier -mode=fix `find . -iname BUILD -type f`
This commit is contained in:
Fabrizio Milo 2016-07-22 15:42:00 -07:00 committed by Martin Wicke
parent fb7a2ba5fc
commit 2b56028018
8 changed files with 53 additions and 49 deletions

View File

@ -824,6 +824,7 @@ cc_library(
hdrs = [ hdrs = [
"lib/core/blocking_counter.h", "lib/core/blocking_counter.h",
"lib/core/refcount.h", "lib/core/refcount.h",
"lib/gif/gif_io.h",
"lib/gtl/edit_distance.h", "lib/gtl/edit_distance.h",
"lib/gtl/int_type.h", "lib/gtl/int_type.h",
"lib/gtl/iterator_range.h", "lib/gtl/iterator_range.h",
@ -837,7 +838,6 @@ cc_library(
"lib/io/zlib_outputbuffer.h", "lib/io/zlib_outputbuffer.h",
"lib/jpeg/jpeg_handle.h", "lib/jpeg/jpeg_handle.h",
"lib/png/png_io.h", "lib/png/png_io.h",
"lib/gif/gif_io.h",
"lib/random/random.h", "lib/random/random.h",
"lib/random/random_distributions.h", "lib/random/random_distributions.h",
"lib/random/weighted_picker.h", "lib/random/weighted_picker.h",

View File

@ -47,13 +47,13 @@ cc_library(
name = "platformlib", name = "platformlib",
copts = tf_copts(), copts = tf_copts(),
deps = [ deps = [
"//tensorflow/core:protos_cc",
"@farmhash_archive//:farmhash", "@farmhash_archive//:farmhash",
"@jpeg_archive//:jpeg",
"@png_archive//:png",
"@gif_archive//:gif", "@gif_archive//:gif",
"@highwayhash//:sip_hash", "@highwayhash//:sip_hash",
"@jpeg_archive//:jpeg",
"@png_archive//:png",
"@re2//:re2", "@re2//:re2",
"//tensorflow/core:protos_cc",
], ],
) )

View File

@ -55,8 +55,8 @@ py_binary(
srcs = [ srcs = [
"graph_metrics.py", "graph_metrics.py",
], ],
srcs_version = "PY2AND3",
main = "graph_metrics.py", main = "graph_metrics.py",
srcs_version = "PY2AND3",
deps = [ deps = [
"//tensorflow:tensorflow_py", "//tensorflow:tensorflow_py",
], ],

View File

@ -10,10 +10,10 @@ exports_files(["LICENSE"])
filegroup( filegroup(
name = "frontend", name = "frontend",
srcs = [ srcs = [
"TAG",
"dist/index.html", "dist/index.html",
"dist/tf-tensorboard.html", "dist/tf-tensorboard.html",
"TAG", "//tensorflow/tensorboard/bower",
"//tensorflow/tensorboard/bower:bower",
"//tensorflow/tensorboard/lib:all_files", "//tensorflow/tensorboard/lib:all_files",
], ],
) )

View File

@ -8,8 +8,8 @@ load("//tensorflow:tensorflow.bzl", "transitive_hdrs")
transitive_hdrs( transitive_hdrs(
name = "other_headers", name = "other_headers",
deps = [ deps = [
"//third_party/eigen3",
"//tensorflow/core:protos_all_cc", "//tensorflow/core:protos_all_cc",
"//third_party/eigen3",
], ],
) )
@ -30,9 +30,9 @@ sh_binary(
":other_headers", ":other_headers",
":simple_console", ":simple_console",
"//tensorflow:tensorflow_py", "//tensorflow:tensorflow_py",
# "//tensorflow/contrib/session_bundle:all_files", # "//tensorflow/contrib/session_bundle:all_files",
# "//tensorflow/contrib/session_bundle:manifest_proto_py", # "//tensorflow/contrib/session_bundle:manifest_proto_py",
# "//tensorflow/contrib/session_bundle/example:half_plus_two", # "//tensorflow/contrib/session_bundle/example:half_plus_two",
"//tensorflow/contrib/slim:all_files", "//tensorflow/contrib/slim:all_files",
"//tensorflow/contrib/slim/python/slim/data:all_files", "//tensorflow/contrib/slim/python/slim/data:all_files",
"//tensorflow/contrib/tensor_forest:all_files", "//tensorflow/contrib/tensor_forest:all_files",

View File

@ -1,4 +1,3 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0

View File

@ -51,7 +51,10 @@ cc_library(
hdrs = glob([ hdrs = glob([
"**/*.h", "**/*.h",
]), ]),
includes = [".", "include"], includes = [
".",
"include",
],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
@ -66,7 +69,7 @@ cc_library(
"-lpthread", "-lpthread",
] + select({ ] + select({
"//tensorflow:darwin": [], "//tensorflow:darwin": [],
"//conditions:default": ["-lrt"] "//conditions:default": ["-lrt"],
}), }),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
@ -74,65 +77,65 @@ cc_library(
cc_library( cc_library(
name = "cudart", name = "cudart",
srcs = [ srcs = [
cuda_library_path("cudart") cuda_library_path("cudart"),
], ],
data = [ data = [
cuda_library_path("cudart") cuda_library_path("cudart"),
], ],
includes = ["include/"], includes = ["include/"],
visibility = ["//visibility:public"],
linkstatic = 1, linkstatic = 1,
visibility = ["//visibility:public"],
) )
cc_library( cc_library(
name = "cublas", name = "cublas",
srcs = [ srcs = [
cuda_library_path("cublas") cuda_library_path("cublas"),
], ],
data = [ data = [
cuda_library_path("cublas") cuda_library_path("cublas"),
], ],
includes = ["include/"], includes = ["include/"],
visibility = ["//visibility:public"],
linkstatic = 1, linkstatic = 1,
visibility = ["//visibility:public"],
) )
cc_library( cc_library(
name = "cudnn", name = "cudnn",
srcs = [ srcs = [
cudnn_library_path() cudnn_library_path(),
], ],
data = [ data = [
cudnn_library_path() cudnn_library_path(),
], ],
includes = ["include/"], includes = ["include/"],
visibility = ["//visibility:public"],
linkstatic = 1, linkstatic = 1,
visibility = ["//visibility:public"],
) )
cc_library( cc_library(
name = "cufft", name = "cufft",
srcs = [ srcs = [
cuda_library_path("cufft") cuda_library_path("cufft"),
], ],
data = [ data = [
cuda_library_path("cufft") cuda_library_path("cufft"),
], ],
includes = ["include/"], includes = ["include/"],
visibility = ["//visibility:public"],
linkstatic = 1, linkstatic = 1,
visibility = ["//visibility:public"],
) )
cc_library( cc_library(
name = "cuda", name = "cuda",
visibility = ["//visibility:public"],
deps = [ deps = [
":cublas",
":cuda_headers", ":cuda_headers",
":cudart", ":cudart",
":cublas",
":cudnn", ":cudnn",
":cufft", ":cufft",
], ],
visibility = ["//visibility:public"],
) )
cc_library( cc_library(
@ -140,7 +143,10 @@ cc_library(
hdrs = glob([ hdrs = glob([
"**/*.h", "**/*.h",
]), ]),
includes = [".", "extras/CUPTI/include/"], includes = [
".",
"extras/CUPTI/include/",
],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
@ -152,7 +158,6 @@ cc_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
# TODO(opensource): for now, we have to invoke the cuda_config.sh manually in the source tree. # TODO(opensource): for now, we have to invoke the cuda_config.sh manually in the source tree.
# This rule checks if Cuda libraries in the source tree has been properly configured. # This rule checks if Cuda libraries in the source tree has been properly configured.
# The output list makes bazel runs this rule first if the Cuda files are missing. # The output list makes bazel runs this rule first if the Cuda files are missing.
@ -182,21 +187,21 @@ genrule(
# Under non-cuda config, create all dummy files to make the build go through # Under non-cuda config, create all dummy files to make the build go through
";".join([ ";".join([
"mkdir -p $(@D)/include", "mkdir -p $(@D)/include",
"mkdir -p $(@D)/lib64", "mkdir -p $(@D)/lib64",
"mkdir -p $(@D)/extras/CUPTI/include", "mkdir -p $(@D)/extras/CUPTI/include",
"mkdir -p $(@D)/extras/CUPTI/lib64", "mkdir -p $(@D)/extras/CUPTI/lib64",
"touch $(@D)/include/cuda.h", "touch $(@D)/include/cuda.h",
"touch $(@D)/include/cublas.h", "touch $(@D)/include/cublas.h",
"touch $(@D)/include/cudnn.h", "touch $(@D)/include/cudnn.h",
"touch $(@D)/extras/CUPTI/include/cupti.h", "touch $(@D)/extras/CUPTI/include/cupti.h",
"touch $(@D)/{}".format(cuda_static_library_path("cudart")), "touch $(@D)/{}".format(cuda_static_library_path("cudart")),
"touch $(@D)/{}".format(cuda_library_path("cublas")), "touch $(@D)/{}".format(cuda_library_path("cublas")),
"touch $(@D)/{}".format(cudnn_library_path()), "touch $(@D)/{}".format(cudnn_library_path()),
"touch $(@D)/{}".format(cuda_library_path("cudart")), "touch $(@D)/{}".format(cuda_library_path("cudart")),
"touch $(@D)/{}".format(cuda_library_path("cufft")), "touch $(@D)/{}".format(cuda_library_path("cufft")),
"touch $(@D)/{}".format(cupti_library_path()), "touch $(@D)/{}".format(cupti_library_path()),
]), ]),
), ),
local = 1, local = 1,
) )
@ -212,7 +217,7 @@ genrule(
# Under non-cuda config, create the dummy file # Under non-cuda config, create the dummy file
";".join([ ";".join([
"touch $(@D)/cuda.config", "touch $(@D)/cuda.config",
]), ]),
), ),
local = 1, local = 1,

View File

@ -15,7 +15,7 @@ genrule(
name = "python_check", name = "python_check",
srcs = [ srcs = [
"python_config.sh", "python_config.sh",
"configure_files" "configure_files",
], ],
outs = [ outs = [
"python_checked", "python_checked",
@ -27,6 +27,6 @@ genrule(
filegroup( filegroup(
name = "configure_files", name = "configure_files",
data = glob([ data = glob([
"*", "*",
]) ]),
) )