From 97840588ae8c717c0f35ee0d82b2232f59cb2964 Mon Sep 17 00:00:00 2001 From: Winston Du Date: Wed, 2 Sep 2020 11:04:44 -0700 Subject: [PATCH] Fix 1.15 build and run issues on iOS --- tensorflow/contrib/makefile/download_dependencies.sh | 2 +- tensorflow/core/platform/profile_utils/cpu_utils.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tensorflow/contrib/makefile/download_dependencies.sh b/tensorflow/contrib/makefile/download_dependencies.sh index 6cf1145021c0ea..b1f5a659556dbf 100755 --- a/tensorflow/contrib/makefile/download_dependencies.sh +++ b/tensorflow/contrib/makefile/download_dependencies.sh @@ -26,7 +26,7 @@ if [ ! -f $BZL_FILE_PATH ]; then exit 1; fi -EIGEN_URL="$(grep -o 'https://bitbucket.org/eigen/eigen/get/.*tar\.gz' "${BZL_FILE_PATH}" | grep -v mirror.bazel | head -n1)" +EIGEN_URL="$(grep -o 'https://storage.googleapis.com/mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/.*tar.gz' "${BZL_FILE_PATH}")" GEMMLOWP_URL="$(grep -o 'https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/gemmlowp/.*zip' "${BZL_FILE_PATH}" | head -n1)" GOOGLETEST_URL="https://github.com/google/googletest/archive/release-1.8.0.tar.gz" NSYNC_URL="$(grep -o 'https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/nsync/.*tar\.gz' "${BZL_FILE_PATH}" | head -n1)" diff --git a/tensorflow/core/platform/profile_utils/cpu_utils.h b/tensorflow/core/platform/profile_utils/cpu_utils.h index b0b1ef0363f31f..0320513ba0a0a0 100644 --- a/tensorflow/core/platform/profile_utils/cpu_utils.h +++ b/tensorflow/core/platform/profile_utils/cpu_utils.h @@ -67,6 +67,10 @@ class CpuUtils { __asm__ volatile("rdtsc" : "=a"(low), "=d"(high)); return (high << 32) | low; // ---------------------------------------------------------------- +#elif defined(__aarch64__) && defined(TARGET_OS_IOS) + // On iOS, we are not able to access the cntvct_el0 register. + // As a temporary build fix, we will just return the dummy cycle clock. + return DUMMY_CYCLE_CLOCK #elif defined(__aarch64__) // System timer of ARMv8 runs at a different frequency than the CPU's. // The frequency is fixed, typically in the range 1-50MHz. It can because