Update XNNPACK and its dependencies
- Update XNNPACK, FXdiv, pthreadpool, FP16 libraries - Switch to using upstreamed BUILD.bazel for FXdiv and pthreadpool PiperOrigin-RevId: 306260724 Change-Id: I800f4827ca8da3e8151700e285f9de373230c4b5
This commit is contained in:
parent
517e0274df
commit
da4fba5d6d
@ -22,7 +22,6 @@ load(
|
||||
"def_file_filter_configure",
|
||||
)
|
||||
load("//third_party/FP16:workspace.bzl", FP16 = "repo")
|
||||
load("//third_party/FXdiv:workspace.bzl", FXdiv = "repo")
|
||||
load("//third_party/aws:workspace.bzl", aws = "repo")
|
||||
load("//third_party/clog:workspace.bzl", clog = "repo")
|
||||
load("//third_party/cpuinfo:workspace.bzl", cpuinfo = "repo")
|
||||
@ -38,7 +37,6 @@ load("//third_party/opencl_headers:workspace.bzl", opencl_headers = "repo")
|
||||
load("//third_party/kissfft:workspace.bzl", kissfft = "repo")
|
||||
load("//third_party/pasta:workspace.bzl", pasta = "repo")
|
||||
load("//third_party/psimd:workspace.bzl", psimd = "repo")
|
||||
load("//third_party/pthreadpool:workspace.bzl", pthreadpool = "repo")
|
||||
load("//third_party/ruy:workspace.bzl", ruy = "repo")
|
||||
load("//third_party/sobol_data:workspace.bzl", sobol_data = "repo")
|
||||
load("//third_party/vulkan_headers:workspace.bzl", vulkan_headers = "repo")
|
||||
@ -47,7 +45,6 @@ load("//third_party/toolchains/remote_config:configs.bzl", "initialize_rbe_confi
|
||||
def initialize_third_party():
|
||||
""" Load third party repositories. See above load() statements. """
|
||||
FP16()
|
||||
FXdiv()
|
||||
aws()
|
||||
clog()
|
||||
cpuinfo()
|
||||
@ -63,7 +60,6 @@ def initialize_third_party():
|
||||
opencl_headers()
|
||||
pasta()
|
||||
psimd()
|
||||
pthreadpool()
|
||||
sobol_data()
|
||||
vulkan_headers()
|
||||
ruy()
|
||||
@ -151,11 +147,31 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
|
||||
|
||||
tf_http_archive(
|
||||
name = "XNNPACK",
|
||||
sha256 = "2afaaf5f866ec714358985b123c3115043b9e099638100937743997f02bbd8cb",
|
||||
strip_prefix = "XNNPACK-05702cf4099ad019ad1abb8ba656bfe04304f32a",
|
||||
sha256 = "246aa56afc5263f1d41fc4a3437ecd51b56f78e16421818961cf79e39431c1df",
|
||||
strip_prefix = "XNNPACK-b9d07cfa38af15c2abf564c980e00c965857ba21",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/XNNPACK/archive/05702cf4099ad019ad1abb8ba656bfe04304f32a.zip",
|
||||
"https://github.com/google/XNNPACK/archive/05702cf4099ad019ad1abb8ba656bfe04304f32a.zip",
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/XNNPACK/archive/b9d07cfa38af15c2abf564c980e00c965857ba21.zip",
|
||||
"https://github.com/google/XNNPACK/archive/b9d07cfa38af15c2abf564c980e00c965857ba21.zip",
|
||||
],
|
||||
)
|
||||
|
||||
tf_http_archive(
|
||||
name = "FXdiv",
|
||||
sha256 = "8224ff187cdfa178b8c54d36eea70520391781eda16d13a418ab5ae53289e1ab",
|
||||
strip_prefix = "FXdiv-561254d968e5679460e6a0a743206410284d9f46",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/FXdiv/archive/561254d968e5679460e6a0a743206410284d9f46.zip",
|
||||
"https://github.com/Maratyszcza/FXdiv/archive/561254d968e5679460e6a0a743206410284d9f46.zip",
|
||||
],
|
||||
)
|
||||
|
||||
tf_http_archive(
|
||||
name = "pthreadpool",
|
||||
sha256 = "f894d845cefc091291329712deec85ce7020546f6eaff200b690ae04b6094535",
|
||||
strip_prefix = "pthreadpool-bfa3b9ce6cb71dc8b792e39d24717320a4f92572",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/pthreadpool/archive/bfa3b9ce6cb71dc8b792e39d24717320a4f92572.zip",
|
||||
"https://github.com/Maratyszcza/pthreadpool/archive/bfa3b9ce6cb71dc8b792e39d24717320a4f92572.zip",
|
||||
],
|
||||
)
|
||||
|
||||
|
8
third_party/FP16/workspace.bzl
vendored
8
third_party/FP16/workspace.bzl
vendored
@ -5,11 +5,11 @@ load("//third_party:repo.bzl", "third_party_http_archive")
|
||||
def repo():
|
||||
third_party_http_archive(
|
||||
name = "FP16",
|
||||
strip_prefix = "FP16-febbb1c163726b5db24bed55cc9dc42529068997",
|
||||
sha256 = "3e71681e0a67cd28552aa0bbb78ec6a6bd238216df15336dc1326280f7958de2",
|
||||
strip_prefix = "FP16-3c54eacb74f6f5e39077300c5564156c424d77ba",
|
||||
sha256 = "0d56bb92f649ec294dbccb13e04865e3c82933b6f6735d1d7145de45da700156",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/Maratyszcza/FP16/archive/febbb1c163726b5db24bed55cc9dc42529068997.tar.gz",
|
||||
"https://github.com/Maratyszcza/FP16/archive/febbb1c163726b5db24bed55cc9dc42529068997.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/Maratyszcza/FP16/archive/3c54eacb74f6f5e39077300c5564156c424d77ba.zip",
|
||||
"https://github.com/Maratyszcza/FP16/archive/3c54eacb74f6f5e39077300c5564156c424d77ba.zip",
|
||||
],
|
||||
build_file = "//third_party/FP16:BUILD.bazel",
|
||||
)
|
||||
|
1
third_party/FXdiv/BUILD
vendored
1
third_party/FXdiv/BUILD
vendored
@ -1 +0,0 @@
|
||||
# This empty BUILD file is required to make Bazel treat this directory as a package.
|
15
third_party/FXdiv/BUILD.bazel
vendored
15
third_party/FXdiv/BUILD.bazel
vendored
@ -1,15 +0,0 @@
|
||||
# Description:
|
||||
# C99/C++ library for division via fixed-point multiplication by inverse
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
cc_library(
|
||||
name = "FXdiv",
|
||||
hdrs = glob(["include/fxdiv.h"]),
|
||||
includes = ["include"],
|
||||
strip_include_prefix = "include",
|
||||
)
|
15
third_party/FXdiv/workspace.bzl
vendored
15
third_party/FXdiv/workspace.bzl
vendored
@ -1,15 +0,0 @@
|
||||
"""Loads the FXdiv library, used by XNNPACK & pthreadpool."""
|
||||
|
||||
load("//third_party:repo.bzl", "third_party_http_archive")
|
||||
|
||||
def repo():
|
||||
third_party_http_archive(
|
||||
name = "FXdiv",
|
||||
strip_prefix = "FXdiv-f8c5354679ec2597792bc70a9e06eff50c508b9a",
|
||||
sha256 = "7d3215bea832fe77091ec5666200b91156df6724da1e348205078346325fc45e",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/FXdiv/archive/f8c5354679ec2597792bc70a9e06eff50c508b9a.tar.gz",
|
||||
"https://github.com/Maratyszcza/FXdiv/archive/f8c5354679ec2597792bc70a9e06eff50c508b9a.tar.gz",
|
||||
],
|
||||
build_file = "//third_party/FXdiv:BUILD.bazel",
|
||||
)
|
1
third_party/pthreadpool/BUILD
vendored
1
third_party/pthreadpool/BUILD
vendored
@ -1 +0,0 @@
|
||||
# This empty BUILD file is required to make Bazel treat this directory as a package.
|
76
third_party/pthreadpool/BUILD.bazel
vendored
76
third_party/pthreadpool/BUILD.bazel
vendored
@ -1,76 +0,0 @@
|
||||
# Description:
|
||||
# Portable pthread-based thread pool for C and C++
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
cc_library(
|
||||
name = "pthreadpool",
|
||||
srcs = [
|
||||
"src/threadpool-atomics.h",
|
||||
"src/threadpool-pthreads.c",
|
||||
"src/threadpool-utils.h",
|
||||
],
|
||||
hdrs = [
|
||||
"include/pthreadpool.h",
|
||||
],
|
||||
copts = [
|
||||
"-O2",
|
||||
] + select({
|
||||
":optimized_build": ["-O2"],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
":linux_aarch64": ["-DPTHREADPOOL_USE_CPUINFO=1"],
|
||||
":android_arm64": ["-DPTHREADPOOL_USE_CPUINFO=1"],
|
||||
":android_armv7": ["-DPTHREADPOOL_USE_CPUINFO=1"],
|
||||
"//conditions:default": ["-DPTHREADPOOL_USE_CPUINFO=0"],
|
||||
}),
|
||||
defines = [
|
||||
"PTHREADPOOL_NO_DEPRECATED_API",
|
||||
],
|
||||
includes = [
|
||||
"include",
|
||||
],
|
||||
strip_include_prefix = "include",
|
||||
deps = [
|
||||
"@FXdiv",
|
||||
] + select({
|
||||
":linux_aarch64": ["@cpuinfo"],
|
||||
":android_arm64": ["@cpuinfo"],
|
||||
":android_armv7": ["@cpuinfo"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
||||
############################# Build configurations #############################
|
||||
|
||||
config_setting(
|
||||
name = "optimized_build",
|
||||
values = {
|
||||
"compilation_mode": "opt",
|
||||
},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "linux_aarch64",
|
||||
values = {"cpu": "aarch64"},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "android_armv7",
|
||||
values = {
|
||||
"crosstool_top": "//external:android/crosstool",
|
||||
"cpu": "armeabi-v7a",
|
||||
},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "android_arm64",
|
||||
values = {
|
||||
"crosstool_top": "//external:android/crosstool",
|
||||
"cpu": "arm64-v8a",
|
||||
},
|
||||
)
|
15
third_party/pthreadpool/workspace.bzl
vendored
15
third_party/pthreadpool/workspace.bzl
vendored
@ -1,15 +0,0 @@
|
||||
"""Loads the pthreadpool library, used by XNNPACK."""
|
||||
|
||||
load("//third_party:repo.bzl", "third_party_http_archive")
|
||||
|
||||
def repo():
|
||||
third_party_http_archive(
|
||||
name = "pthreadpool",
|
||||
strip_prefix = "pthreadpool-76042155a8b1e189c8f141429fd72219472c32e1",
|
||||
sha256 = "91c7b00c16c60c96f23d1966d524879c0f6044caf4bc5e9fc06518dda643e07e",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/Maratyszcza/pthreadpool/archive/76042155a8b1e189c8f141429fd72219472c32e1.tar.gz",
|
||||
"https://github.com/Maratyszcza/pthreadpool/archive/76042155a8b1e189c8f141429fd72219472c32e1.tar.gz",
|
||||
],
|
||||
build_file = "//third_party/pthreadpool:BUILD.bazel",
|
||||
)
|
Loading…
Reference in New Issue
Block a user