From 4b660b49225b49d62d023506aad248ba50cfe997 Mon Sep 17 00:00:00 2001 From: Zhangqiang Date: Mon, 21 Sep 2020 14:16:47 +0800 Subject: [PATCH] add support for mips64 platform --- tensorflow/BUILD | 6 ++++++ third_party/cpuinfo/BUILD.bazel | 6 ++++++ third_party/remote_config/remote_platform_configure.bzl | 2 ++ 3 files changed, 14 insertions(+) diff --git a/tensorflow/BUILD b/tensorflow/BUILD index f95a0691c79..29b222209b4 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -238,6 +238,12 @@ config_setting( visibility = ["//visibility:public"], ) +config_setting( + name = "linux_mips64", + values = {"cpu": "mips64"}, + visibility = ["//visibility:public"], +) + config_setting( name = "debug", values = { diff --git a/third_party/cpuinfo/BUILD.bazel b/third_party/cpuinfo/BUILD.bazel index 15cfcd1c4ee..9b007cc0daa 100644 --- a/third_party/cpuinfo/BUILD.bazel +++ b/third_party/cpuinfo/BUILD.bazel @@ -102,6 +102,7 @@ cc_library( ":linux_armv7a": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS, ":linux_armeabi": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS, ":linux_aarch64": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM64_SRCS, + ":linux_mips64": COMMON_SRCS + LINUX_SRCS, ":macos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, ":windows_x86_64": COMMON_SRCS + X86_SRCS + WINDOWS_X86_SRCS, ":android_armv7": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS + ANDROID_ARM_SRCS, @@ -208,6 +209,11 @@ config_setting( values = {"cpu": "aarch64"}, ) +config_setting( + name = "linux_mips64", + values = {"cpu": "mips64"}, +) + config_setting( name = "macos_x86_64", values = { diff --git a/third_party/remote_config/remote_platform_configure.bzl b/third_party/remote_config/remote_platform_configure.bzl index 386ad603950..29520396905 100644 --- a/third_party/remote_config/remote_platform_configure.bzl +++ b/third_party/remote_config/remote_platform_configure.bzl @@ -22,6 +22,8 @@ def _remote_platform_configure_impl(repository_ctx): cpu = "aarch64" elif machine_type.startswith("arm"): cpu = "arm" + elif machine_type.startswith("mips64"): + cpu = "mips64" exec_properties = repository_ctx.attr.platform_exec_properties