aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/platform
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-08-21 13:21:13 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-21 13:27:24 -0700
commit75adfa5ca180abdd1ccf9408078906e5874c9e2a (patch)
tree5367d71ff099a70918270580120896ef4309992b /tensorflow/core/platform
parent7cc6abab4e3569e4e44af7d577a71d15039f014b (diff)
Fully enabled absl and removed TENSORFLOW_USE_ABSL define (as absl is now always available).
Previously, absl was not enabled for mobile or for makefile-based builds. PiperOrigin-RevId: 209648505
Diffstat (limited to 'tensorflow/core/platform')
-rw-r--r--tensorflow/core/platform/default/build_config.bzl4
-rw-r--r--tensorflow/core/platform/posix/port.cc6
2 files changed, 2 insertions, 8 deletions
diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl
index 5ec7a82ae9..6a4ff9a1cb 100644
--- a/tensorflow/core/platform/default/build_config.bzl
+++ b/tensorflow/core/platform/default/build_config.bzl
@@ -619,11 +619,11 @@ def tf_additional_lib_defines():
"//tensorflow:with_jemalloc_linux_x86_64": ["TENSORFLOW_USE_JEMALLOC"],
"//tensorflow:with_jemalloc_linux_ppc64le": ["TENSORFLOW_USE_JEMALLOC"],
"//conditions:default": [],
- }) + if_not_mobile(["TENSORFLOW_USE_ABSL"])
+ })
def tf_additional_lib_deps():
"""Additional dependencies needed to build TF libraries."""
- return if_not_mobile(["@com_google_absl//absl/base:base"]) + if_static(
+ return ["@com_google_absl//absl/base:base"] + if_static(
["@nsync//:nsync_cpp"],
["@nsync//:nsync_headers"],
) + select({
diff --git a/tensorflow/core/platform/posix/port.cc b/tensorflow/core/platform/posix/port.cc
index 1939cf72fb..b46b9927cd 100644
--- a/tensorflow/core/platform/posix/port.cc
+++ b/tensorflow/core/platform/posix/port.cc
@@ -17,9 +17,7 @@ limitations under the License.
#include "jemalloc/jemalloc.h"
#endif
-#ifdef TENSORFLOW_USE_ABSL
#include "absl/base/internal/sysinfo.h"
-#endif
#include "tensorflow/core/platform/cpu_info.h"
#include "tensorflow/core/platform/logging.h"
@@ -194,11 +192,7 @@ bool Snappy_Uncompress(const char* input, size_t length, char* output) {
string Demangle(const char* mangled) { return mangled; }
double NominalCPUFrequency() {
-#ifdef TENSORFLOW_USE_ABSL
return absl::base_internal::NominalCPUFrequency();
-#else
- return 1.0;
-#endif
}
int64 AvailableRam() {