Skip to content

Commit

Permalink
Merge changes from github.
Browse files Browse the repository at this point in the history
Change: 123427036
  • Loading branch information
Vijay Vasudevan authored and tensorflower-gardener committed May 27, 2016
1 parent 3ae0153 commit 22c111c
Show file tree
Hide file tree
Showing 18 changed files with 128 additions and 81 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tf_workspace()

# Specify the minimum required bazel version.
load("//tensorflow:tensorflow.bzl", "check_version")
check_version("0.1.4")
check_version("0.2.0")

# TENSORBOARD_BOWER_AUTOGENERATED_BELOW_THIS_LINE_DO_NOT_EDIT

Expand Down
11 changes: 0 additions & 11 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@

DO_NOT_SUBMIT_WARNING="Unofficial setting. DO NOT SUBMIT!!!"

## Verify that the submodule google/protobuf is available
# TODO(cais): Remove this check once protobuf is no longer depended upon
if [[ ! -f "google/protobuf/protobuf.bzl" ]]; then
echo "ERROR: It appears that the required submodule google/protobuf is not "\
"available in this TensorFlow git clone."
echo "Please be sure to use the --recurse-submodules flag when performing "\
"git clone of TensorFlow."

exit 1
fi

## Set up python-related environment settings
while true; do
fromuser=""
Expand Down
28 changes: 28 additions & 0 deletions gmock.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
cc_library(
name = "gtest",
srcs = [
"gmock-1.7.0/gtest/src/gtest-all.cc",
"gmock-1.7.0/src/gmock-all.cc",
],
hdrs = glob([
"gmock-1.7.0/**/*.h",
"gmock-1.7.0/gtest/src/*.cc",
"gmock-1.7.0/src/*.cc",
]),
includes = [
"gmock-1.7.0",
"gmock-1.7.0/gtest",
"gmock-1.7.0/gtest/include",
"gmock-1.7.0/include",
],
linkopts = ["-pthread"],
visibility = ["//visibility:public"],
)

cc_library(
name = "gtest_main",
srcs = ["gmock-1.7.0/src/gmock_main.cc"],
linkopts = ["-pthread"],
visibility = ["//visibility:public"],
deps = [":gtest"],
)
2 changes: 1 addition & 1 deletion tensorflow/contrib/ffmpeg/default/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cc_library(
"//tensorflow/contrib/ffmpeg:ffmpeg_lib.h",
],
deps = [
"//google/protobuf",
"@protobuf//:protobuf",
"//tensorflow/core:framework_headers_lib",
],
)
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/contrib/layers/kernels/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cc_library(
name = "bucketization_kernel",
srcs = ["bucketization_kernel.cc"],
deps = [
"//google/protobuf",
"@protobuf//:protobuf",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
],
Expand All @@ -22,7 +22,7 @@ cc_library(
name = "sparse_feature_cross_kernel",
srcs = ["sparse_feature_cross_kernel.cc"],
deps = [
"//google/protobuf",
"@protobuf//:protobuf",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
],
Expand Down
6 changes: 3 additions & 3 deletions tensorflow/contrib/linear_optimizer/kernels/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cc_library(
"squared-loss.h",
],
deps = [
"//google/protobuf",
"@protobuf//:protobuf",
"//tensorflow/core:framework_headers_lib",
],
)
Expand All @@ -43,7 +43,7 @@ cc_library(
srcs = ["resources.cc"],
hdrs = ["resources.h"],
deps = [
"//google/protobuf",
"@protobuf//:protobuf",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
],
Expand All @@ -66,9 +66,9 @@ cc_library(
name = "sdca_ops",
srcs = ["sdca_ops.cc"],
deps = [
"@protobuf//:protobuf",
":loss_updaters",
":resources",
"//google/protobuf",
"//tensorflow/core:framework_headers_lib",
"//tensorflow/core/kernels:bounds_check_lib",
"//third_party/eigen3",
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/metrics/kernels/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cc_library(
name = "set_kernels",
srcs = ["set_kernels.cc"],
deps = [
"//google/protobuf",
"@protobuf//:protobuf",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
],
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/tensor_forest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cc_library(
"core/ops/tree_utils.h",
],
deps = [
"//google/protobuf",
"@protobuf//:protobuf",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
],
Expand Down
76 changes: 45 additions & 31 deletions tensorflow/core/platform/default/build_config.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Platform-specific build configurations.

load("//google/protobuf:protobuf.bzl", "cc_proto_library")
load("//google/protobuf:protobuf.bzl", "py_proto_library")
load("@protobuf//:protobuf.bzl", "cc_proto_library")
load("@protobuf//:protobuf.bzl", "py_proto_library")

# configure may change the following line to True
WITH_GCP_SUPPORT = False
Expand Down Expand Up @@ -31,49 +31,63 @@ def tf_proto_library_cc(name, srcs = [], has_services = None,
cc_api_version = 2, go_api_version = 2,
java_api_version = 2,
py_api_version = 2):
native.filegroup(name=name + "_proto_srcs",
srcs=srcs + tf_deps(deps, "_proto_srcs"),
testonly=testonly,)
native.filegroup(
name = name + "_proto_srcs",
srcs = srcs + tf_deps(deps, "_proto_srcs"),
testonly = testonly,
)

use_grpc_plugin = None
if cc_grpc_version:
use_grpc_plugin = True
cc_proto_library(name=name + "_cc",
srcs=srcs + tf_deps(deps, "_proto_srcs"),
deps=deps + ["//google/protobuf:cc_wkt_protos"],
cc_libs = cc_libs + ["//google/protobuf:protobuf"],
use_grpc_plugin = use_grpc_plugin,
testonly=testonly,
visibility=visibility,)
cc_proto_library(
name = name + "_cc",
srcs = srcs + tf_deps(deps, "_proto_srcs"),
deps = deps + ["@protobuf//:cc_wkt_protos"],
cc_libs = cc_libs + ["@protobuf//:protobuf"],
protoc = "@protobuf//:protoc",
default_runtime = "@protobuf//:protobuf",
use_grpc_plugin = use_grpc_plugin,
testonly = testonly,
visibility = visibility,
)

def tf_proto_library_py(name, srcs=[], deps=[], visibility=[], testonly=0,
srcs_version="PY2AND3"):
py_proto_library(name = name + "_py",
srcs = srcs,
srcs_version = srcs_version,
deps = deps,
visibility = visibility,
testonly = testonly)
py_proto_library(
name = name + "_py",
srcs = srcs,
srcs_version = srcs_version,
deps = deps,
protoc = "@protobuf//:protoc",
default_runtime = "@protobuf//:protobuf_python",
visibility = visibility,
testonly = testonly,
)

def tf_proto_library(name, srcs = [], has_services = None,
deps = [], visibility = [], testonly = 0,
cc_libs = [],
cc_api_version = 2, go_api_version = 2,
java_api_version = 2,
py_api_version = 2):
tf_proto_library_cc(name=name,
srcs=srcs + tf_deps(deps, "_proto_srcs"),
deps=deps,
cc_libs=cc_libs,
testonly=testonly,
visibility=visibility,)

tf_proto_library_py(name=name,
srcs=srcs + tf_deps(deps, "_proto_srcs"),
srcs_version="PY2AND3",
deps=deps + ["//google/protobuf:protobuf_python"],
testonly=testonly,
visibility=visibility,)
tf_proto_library_cc(
name = name,
srcs = srcs + tf_deps(deps, "_proto_srcs"),
deps = deps,
cc_libs = cc_libs,
testonly = testonly,
visibility = visibility,
)

tf_proto_library_py(
name = name,
srcs = srcs + tf_deps(deps, "_proto_srcs"),
srcs_version = "PY2AND3",
deps = deps + ["@protobuf//:protobuf_python"],
testonly = testonly,
visibility = visibility,
)

def tf_additional_lib_srcs():
return [
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/g3doc/api_docs/python/constant_op.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ tf.zeros_like(tensor) ==> [[0, 0, 0], [0, 0, 0]]

* <b>`tensor`</b>: A `Tensor`.
* <b>`dtype`</b>: A type for the returned `Tensor`. Must be `float32`, `float64`,
`int8`, `int16`, `int32`, `int64`, `uint8`, or `complex64`.
`int8`, `int16`, `int32`, `int64`, `uint8`, `complex64`, or `complex128`.

* <b>`name`</b>: A name for the operation (optional).

Expand Down Expand Up @@ -119,7 +119,7 @@ tf.ones_like(tensor) ==> [[1, 1, 1], [1, 1, 1]]

* <b>`tensor`</b>: A `Tensor`.
* <b>`dtype`</b>: A type for the returned `Tensor`. Must be `float32`, `float64`,
`int8`, `int16`, `int32`, `int64`, `uint8`, or `complex64`.
`int8`, `int16`, `int32`, `int64`, `uint8`, `complex64` or `complex128`.

* <b>`name`</b>: A name for the operation (optional).

Expand Down
6 changes: 3 additions & 3 deletions tensorflow/g3doc/api_docs/python/nn.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ case where both types are quantized.


* <b>`value`</b>: A `Tensor` with type `float`, `double`, `int64`, `int32`, `uint8`,
`int16`, `int8`, or `complex64`.
`int16`, `int8`, `complex64` or `complex128`.
* <b>`bias`</b>: A 1-D `Tensor` with size matching the last dimension of `value`.
Must be the same type as `value` unless `value` is a quantized type,
in which case a different quantized type may be used.
Expand All @@ -186,7 +186,7 @@ Specifically, `y = 1 / (1 + exp(-x))`.
##### Args:


* <b>`x`</b>: A Tensor with type `float`, `double`, `int32`, `complex64`, `int64`,
* <b>`x`</b>: A Tensor with type `float`, `double`, `int32`, `complex64`, `complex128`, `int64`,
or `qint32`.
* <b>`name`</b>: A name for the operation (optional).

Expand All @@ -205,7 +205,7 @@ Computes hyperbolic tangent of `x` element-wise.
##### Args:


* <b>`x`</b>: A Tensor with type `float`, `double`, `int32`, `complex64`, `int64`,
* <b>`x`</b>: A Tensor with type `float`, `double`, `int32`, `complex64`, `complex128`, `int64`,
or `qint32`.
* <b>`name`</b>: A name for the operation (optional).

Expand Down
4 changes: 2 additions & 2 deletions tensorflow/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ cc_binary(
}),
linkshared = 1,
deps = [
"//google/protobuf",
"@protobuf//:protobuf",
"//tensorflow/core:framework_headers_lib",
],
)
Expand Down Expand Up @@ -885,7 +885,7 @@ py_library(
name = "util",
srcs = glob(["util/**/*.py"]),
srcs_version = "PY2AND3",
deps = ["//google/protobuf:protobuf_python"],
deps = ["@protobuf//:protobuf_python"],
)

tf_proto_library(
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tensorflow.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def cc_header_only_library(name, deps=[], **kwargs):

def tf_custom_op_library_additional_deps():
return [
"//google/protobuf",
"@protobuf//:protobuf",
"//third_party/eigen3",
"//tensorflow/core:framework_headers_lib",
]
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/benchmark/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ tf_cc_test(
# --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
#
# NOTE: currently '-pthread' must be removed from the LINK_OPTS variable
# in google/protobuf/BUILD to sucessfully build for Android. This is temporary
# in @protobuf//:BUILD to sucessfully build for Android. This is temporary
# pending an update of the version of the protobuf library that Tensorflow
# uses.
cc_binary(
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/pip_package/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ sh_binary(
"MANIFEST.in",
"README",
"setup.py",
"//tensorflow/core:framework_headers",
":other_headers",
":simple_console",
"//tensorflow:tensorflow_py",
"//tensorflow/core:framework_headers",
"//tensorflow/examples/tutorials/mnist:package",
"//tensorflow/models/embedding:package",
"//tensorflow/models/image/alexnet:all_files",
Expand Down
3 changes: 2 additions & 1 deletion tensorflow/tools/pip_package/build_pip_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ function main() {

# protobuf pip package doesn't ship with header files. Copy the headers
# over so user defined ops can be compiled.
mkdir -p ${TMPDIR}/google
rsync --include "*/" --include "*.h" --exclude "*" --prune-empty-dirs -a \
$RUNFILES/google ${TMPDIR}
$RUNFILES/external/protobuf ${TMPDIR}/google
rsync -a $RUNFILES/third_party/eigen3 ${TMPDIR}/third_party

cp tensorflow/tools/pip_package/MANIFEST.in ${TMPDIR}
Expand Down
Loading

0 comments on commit 22c111c

Please sign in to comment.