diff options
author | 2017-02-17 17:05:49 -0800 | |
---|---|---|
committer | 2017-02-17 17:23:48 -0800 | |
commit | 93a975e114ee1c35f01ed3bdd47170e6f7129014 (patch) | |
tree | e34255aff698fe6a4a586e7940337fd278947f58 /tensorflow/core | |
parent | eb9624017a0040e805fda622a5f9ec6681e24246 (diff) |
Merge changes from github.
Change: 147897309
Diffstat (limited to 'tensorflow/core')
-rw-r--r-- | tensorflow/core/BUILD | 21 | ||||
-rw-r--r-- | tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc | 3 | ||||
-rw-r--r-- | tensorflow/core/kernels/segment_reduction_ops.cc | 2 | ||||
-rw-r--r-- | tensorflow/core/lib/hash/crc32c_accelerate.cc | 6 | ||||
-rw-r--r-- | tensorflow/core/ops/ops.pbtxt | 53 | ||||
-rw-r--r-- | tensorflow/core/platform/posix/error.cc | 2 | ||||
-rw-r--r-- | tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc | 1 | ||||
-rw-r--r-- | tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h | 2 | ||||
-rw-r--r-- | tensorflow/core/public/version.h | 2 |
9 files changed, 83 insertions, 9 deletions
diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index b070f384e0..fc039eaa39 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -1197,7 +1197,10 @@ cc_library( ], copts = tf_copts(), defines = tf_additional_lib_defines(), - linkopts = ["-ldl"], + linkopts = select({ + "//tensorflow:freebsd": [], + "//conditions:default": ["-ldl"], + }), deps = tf_additional_lib_deps() + [ ":lib_hash_crc32c_accelerate_internal", ":lib_proto_parsing", @@ -1224,7 +1227,10 @@ cc_library( ], hdrs = ["lib/gif/gif_io.h"], copts = tf_copts(), - linkopts = ["-ldl"], + linkopts = select({ + "//tensorflow:freebsd": [], + "//conditions:default": ["-ldl"], + }), deps = [ ":lib", "//tensorflow/core/platform/default/build_config:gif", @@ -1243,7 +1249,10 @@ cc_library( "lib/jpeg/jpeg_mem.h", ], copts = tf_copts(), - linkopts = ["-ldl"], + linkopts = select({ + "//tensorflow:freebsd": [], + "//conditions:default": ["-ldl"], + }), deps = [ ":lib", "//tensorflow/core/platform/default/build_config:jpeg", @@ -1321,8 +1330,10 @@ tf_cuda_library( "util/tensor_slice_util.h", ], copts = tf_copts(), - linkopts = [ - "-ldl", + linkopts = select({ + "//tensorflow:freebsd": [], + "//conditions:default": ["-ldl"], + }) + [ "-lm", ], deps = [ diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc index f1e435e50e..80fae4b9d8 100644 --- a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc +++ b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc @@ -304,7 +304,8 @@ std::unique_ptr<Master> GrpcServer::CreateMaster(MasterEnv* master_env) { /* static */ Status GrpcServer::Create(const ServerDef& server_def, Env* env, std::unique_ptr<ServerInterface>* out_server) { - std::unique_ptr<GrpcServer> ret(new GrpcServer(server_def, Env::Default())); + std::unique_ptr<GrpcServer> ret(new GrpcServer(server_def, + env == nullptr ? Env::Default() : env)); TF_RETURN_IF_ERROR(ret->Init()); *out_server = std::move(ret); return Status::OK(); diff --git a/tensorflow/core/kernels/segment_reduction_ops.cc b/tensorflow/core/kernels/segment_reduction_ops.cc index 5bd4362801..7808e4ff1d 100644 --- a/tensorflow/core/kernels/segment_reduction_ops.cc +++ b/tensorflow/core/kernels/segment_reduction_ops.cc @@ -254,7 +254,7 @@ struct UnsortedSegmentMaxFunctor<CPUDevice, T, Index> typename TTypes<Index>::ConstFlat segment_ids, const Index data_size, const T* data, typename TTypes<T, 2>::Tensor output) override { - output.setConstant(std::numeric_limits<T>::min()); + output.setConstant(std::numeric_limits<T>::lowest()); if (data_size == 0) { return; } diff --git a/tensorflow/core/lib/hash/crc32c_accelerate.cc b/tensorflow/core/lib/hash/crc32c_accelerate.cc index 07fa2faedd..b87550fba9 100644 --- a/tensorflow/core/lib/hash/crc32c_accelerate.cc +++ b/tensorflow/core/lib/hash/crc32c_accelerate.cc @@ -31,6 +31,12 @@ limitations under the License. #endif #endif /* __SSE4_2__ */ +// This version of Apple clang has a bug: +// https://llvm.org/bugs/show_bug.cgi?id=25510 +#if defined(__APPLE__) && (__clang_major__ <= 8) +#undef USE_SSE_CRC32C +#endif + #ifdef USE_SSE_CRC32C #include <nmmintrin.h> #endif diff --git a/tensorflow/core/ops/ops.pbtxt b/tensorflow/core/ops/ops.pbtxt index 8fa3d0c872..fa27edbbd8 100644 --- a/tensorflow/core/ops/ops.pbtxt +++ b/tensorflow/core/ops/ops.pbtxt @@ -25374,6 +25374,59 @@ op { description: "Read [the section on\nSegmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation\nof segments.\n\nComputes a tensor such that\n`(output[i] = sum_{j...} data[j...]` where the sum is over tuples `j...` such\nthat `segment_ids[j...] == i`. Unlike `SegmentSum`, `segment_ids`\nneed not be sorted and need not cover all values in the full\nrange of valid values.\n\nIf the sum is empty for a given segment ID `i`, `output[i] = 0`.\n\n`num_segments` should equal the number of distinct segment IDs.\n\n<div style=\"width:70%; margin:auto; margin-bottom:10px; margin-top:20px;\">\n<img style=\"width:100%\" src=\"../../images/UnsortedSegmentSum.png\" alt>\n</div>" } op { + name: "UnsortedSegmentSum" + input_arg { + name: "data" + type_attr: "T" + } + input_arg { + name: "segment_ids" + description: "A tensor whose shape is a prefix of `data.shape`." + type_attr: "Tindices" + } + input_arg { + name: "num_segments" + type: DT_INT32 + } + output_arg { + name: "output" + description: "Has same shape as data, except for the first `segment_ids.rank`\ndimensions, which are replaced with a single dimension which has size\n`num_segments`." + type_attr: "T" + } + attr { + name: "T" + type: "type" + allowed_values { + list { + type: DT_FLOAT + type: DT_DOUBLE + type: DT_INT64 + type: DT_INT32 + type: DT_UINT8 + type: DT_UINT16 + type: DT_INT16 + type: DT_INT8 + type: DT_QINT8 + type: DT_QUINT8 + type: DT_QINT32 + type: DT_HALF + } + } + } + attr { + name: "Tindices" + type: "type" + allowed_values { + list { + type: DT_INT32 + type: DT_INT64 + } + } + } + summary: "Computes the max along segments of a tensor." + description: "Read [the section on\nSegmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation\nof segments.\n\nComputes a tensor such that\n\\\\(output_i = \\sum_j data_j\\\\) where sum is over `j` such\nthat `segment_ids[j] == i`. Unlike `SegmentSum`, `segment_ids`\nneed not be sorted and need not cover all values in the full\n range of valid values.\n\nIf the sum is empty for a given segment ID `i`, `output[i] = 0`.\n\n`num_segments` should equal the number of distinct segment IDs.\n\n<div style=\"width:70%; margin:auto; margin-bottom:10px; margin-top:20px;\">\n<img style=\"width:100%\" src=\"../../images/UnsortedSegmentSum.png\" alt>\n</div>" +} +op { name: "Unstage" output_arg { name: "values" diff --git a/tensorflow/core/platform/posix/error.cc b/tensorflow/core/platform/posix/error.cc index 94a3a6ab5d..df5c800879 100644 --- a/tensorflow/core/platform/posix/error.cc +++ b/tensorflow/core/platform/posix/error.cc @@ -131,7 +131,7 @@ error::Code ErrnoToCode(int err_number) { case ENETUNREACH: // Network unreachable case ENOLCK: // No locks available case ENOLINK: // Link has been severed -#if !(defined(__APPLE__) || defined(_WIN32)) +#if !(defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32)) case ENONET: // Machine is not on the network #endif code = error::UNAVAILABLE; diff --git a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc index 61b6fa0c84..927e2bc572 100644 --- a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc +++ b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc @@ -24,6 +24,7 @@ limitations under the License. #include <string.h> #include <sys/ioctl.h> #include <sys/syscall.h> +#include <sys/types.h> #include <unistd.h> #include "tensorflow/core/lib/strings/stringprintf.h" diff --git a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h index c4fe2fc5b3..09c365dd9e 100644 --- a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h +++ b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h @@ -16,6 +16,8 @@ limitations under the License. #ifndef TENSORFLOW_PLATFORM_PROFILEUTILS_ANDROID_ARMV7A_CPU_UTILS_HELPER_H__ #define TENSORFLOW_PLATFORM_PROFILEUTILS_ANDROID_ARMV7A_CPU_UTILS_HELPER_H__ +#include <sys/types.h> + #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/platform/profile_utils/i_cpu_utils_helper.h" #include "tensorflow/core/platform/types.h" diff --git a/tensorflow/core/public/version.h b/tensorflow/core/public/version.h index 37e5dc81b2..a9d984993e 100644 --- a/tensorflow/core/public/version.h +++ b/tensorflow/core/public/version.h @@ -20,7 +20,7 @@ limitations under the License. #define TF_MAJOR_VERSION 1 #define TF_MINOR_VERSION 0 -#define TF_PATCH_VERSION 0-rc1 +#define TF_PATCH_VERSION 0-rc2 // TF_VERSION_SUFFIX is non-empty for pre-releases (e.g. "-alpha", "-alpha.1", // "-beta", "-rc", "-rc.1") |