Update XNNPACK and its dependencies

Bring in Windows support

PiperOrigin-RevId: 307517564
Change-Id: I450cb6bf77d0936437898126e98b9973109a13fd
This commit is contained in:
Marat Dukhan 2020-04-20 18:25:49 -07:00 committed by TensorFlower Gardener
parent 58310deb9b
commit 3a443a3832
4 changed files with 37 additions and 43 deletions

View File

@ -156,31 +156,31 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
tf_http_archive(
name = "XNNPACK",
sha256 = "583e408c9ab9a6ec241a54e0775bc170ed2ea3d1073668c9379dbfe282fa8acc",
strip_prefix = "XNNPACK-24d9a03a9ee036949f8c56878ecec17ab400fc23",
sha256 = "c002c961fd73b87b68074f9fda49d0dcbd0627c783e487a445da16bcd8dfdee6",
strip_prefix = "XNNPACK-10a38087936d84ab2879a2e39fc7e204757ff3e8",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/XNNPACK/archive/24d9a03a9ee036949f8c56878ecec17ab400fc23.zip",
"https://github.com/google/XNNPACK/archive/24d9a03a9ee036949f8c56878ecec17ab400fc23.zip",
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/XNNPACK/archive/10a38087936d84ab2879a2e39fc7e204757ff3e8.zip",
"https://github.com/google/XNNPACK/archive/10a38087936d84ab2879a2e39fc7e204757ff3e8.zip",
],
)
tf_http_archive(
name = "FXdiv",
sha256 = "8224ff187cdfa178b8c54d36eea70520391781eda16d13a418ab5ae53289e1ab",
strip_prefix = "FXdiv-561254d968e5679460e6a0a743206410284d9f46",
sha256 = "ab7dfb08829bee33dca38405d647868fb214ac685e379ec7ef2bebcd234cd44d",
strip_prefix = "FXdiv-b408327ac2a15ec3e43352421954f5b1967701d1",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/FXdiv/archive/561254d968e5679460e6a0a743206410284d9f46.zip",
"https://github.com/Maratyszcza/FXdiv/archive/561254d968e5679460e6a0a743206410284d9f46.zip",
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/FXdiv/archive/b408327ac2a15ec3e43352421954f5b1967701d1.zip",
"https://github.com/Maratyszcza/FXdiv/archive/b408327ac2a15ec3e43352421954f5b1967701d1.zip",
],
)
tf_http_archive(
name = "pthreadpool",
sha256 = "27c039e73846d0bdfe393833e91afafe45e61ba792cc60e1c62808090554ce4d",
strip_prefix = "pthreadpool-a61ed1ab70389c62f6f699ca1a30a2421d3ea594",
sha256 = "c4b148fba41fc937fdf96bc195caadf0cf0be83f1c3e335ef5355934d4501f83",
strip_prefix = "pthreadpool-e918b206d26b1f3b2100b0edabf445c18708d2b7",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/pthreadpool/archive/a61ed1ab70389c62f6f699ca1a30a2421d3ea594.zip",
"https://github.com/Maratyszcza/pthreadpool/archive/a61ed1ab70389c62f6f699ca1a30a2421d3ea594.zip",
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/pthreadpool/archive/e918b206d26b1f3b2100b0edabf445c18708d2b7.zip",
"https://github.com/Maratyszcza/pthreadpool/archive/e918b206d26b1f3b2100b0edabf445c18708d2b7.zip",
],
)

View File

@ -15,15 +15,13 @@ cc_library(
hdrs = [
"deps/clog/include/clog.h",
],
copts = [
"-Wno-unused-result",
],
copts = select({
":windows": [],
"//conditions:default": ["-Wno-unused-result"],
}),
linkopts = select({
":android": [
"-llog",
],
"//conditions:default": [
],
":android": ["-llog"],
"//conditions:default": [],
}),
linkstatic = True,
strip_include_prefix = "deps/clog/include",
@ -32,5 +30,9 @@ cc_library(
config_setting(
name = "android",
values = {"crosstool_top": "//external:android/crosstool"},
visibility = ["//visibility:public"],
)
config_setting(
name = "windows",
values = {"cpu": "x64_windows"},
)

View File

@ -98,9 +98,8 @@ cc_library(
srcs = select({
":linux_x86_64": COMMON_SRCS + X86_SRCS + LINUX_SRCS + LINUX_X86_SRCS,
":linux_aarch64": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM64_SRCS,
":linux_armhf": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS,
":linux_arm": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_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,
":android_arm64": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM64_SRCS + ANDROID_ARM_SRCS,
":android_x86": COMMON_SRCS + X86_SRCS + LINUX_SRCS + LINUX_X86_SRCS,
@ -116,9 +115,11 @@ cc_library(
":watchos_arm64_32": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS,
":tvos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS,
":tvos_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS,
":emscripten_wasm": COMMON_SRCS + EMSCRIPTEN_SRCS,
}),
copts = C99OPTS + [
copts = select({
":windows_x86_64": [],
"//conditions:default": C99OPTS,
}) + [
"-Iexternal/cpuinfo/include",
"-Iexternal/cpuinfo/src",
],
@ -169,20 +170,6 @@ config_setting(
values = {"cpu": "aarch64"},
)
config_setting(
name = "linux_arm",
values = {"cpu": "arm"},
visibility = ["//visibility:public"],
)
config_setting(
name = "linux_armhf",
values = {
"cpu": "armhf",
},
visibility = ["//visibility:public"],
)
config_setting(
name = "macos_x86_64",
values = {
@ -191,6 +178,11 @@ config_setting(
},
)
config_setting(
name = "windows_x86_64",
values = {"cpu": "x64_windows"},
)
config_setting(
name = "android_armv7",
values = {

View File

@ -5,11 +5,11 @@ load("//third_party:repo.bzl", "third_party_http_archive")
def repo():
third_party_http_archive(
name = "psimd",
strip_prefix = "psimd-10b4ffc6ea9e2e11668f86969586f88bc82aaefa",
sha256 = "1fefd66702cb2eb3462b962f33d4fb23d59a55d5889ee6372469d286c4512df4",
strip_prefix = "psimd-85427dd4c8521cc037a1ffa6fcd25c55fafc8a00",
sha256 = "db23c2bc4a58d6f40c181797e43103300edac7cf9d286ca81590543f66ab95d2",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/psimd/archive/10b4ffc6ea9e2e11668f86969586f88bc82aaefa.tar.gz",
"https://github.com/Maratyszcza/psimd/archive/10b4ffc6ea9e2e11668f86969586f88bc82aaefa.tar.gz",
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/psimd/archive/85427dd4c8521cc037a1ffa6fcd25c55fafc8a00.zip",
"https://github.com/Maratyszcza/psimd/archive/85427dd4c8521cc037a1ffa6fcd25c55fafc8a00.zip",
],
build_file = "//third_party/psimd:BUILD.bazel",
)