Fix compilation errors of workload xnnpack and meshoptimizer (#2081)

This commit is contained in:
liang.he
2023-03-30 21:15:21 +08:00
committed by GitHub
parent 403ccf02b7
commit 48429da29f
5 changed files with 27 additions and 15 deletions

View File

@ -11,11 +11,10 @@ include(ExternalProject)
ExternalProject_Add(xnnpack
PREFIX xnnpack
GIT_REPOSITORY https://github.com/google/XNNPACK.git
GIT_TAG master
GIT_TAG 4570a7151aa4f3e57eca14a575eeff6bb13e26be
GIT_PROGRESS ON
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xnnpack
UPDATE_COMMAND git checkout .
&& git reset --hard 4570a7151aa4f3e57eca14a575eeff6bb13e26be
UPDATE_COMMAND git restore .
&& cmake -E copy ${CMAKE_CURRENT_SOURCE_DIR}/xnnpack/google3/third_party/XNNPACK/microkernels.bzl
${CMAKE_CURRENT_SOURCE_DIR}/xnnpack/
&& git apply ${CMAKE_CURRENT_SOURCE_DIR}/xnnpack.patch

View File

@ -15,10 +15,22 @@ index 688279da1..376996885 100644
+build:wasm --crosstool_top=@emsdk//emscripten_toolchain:everything
+build:wasm --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
diff --git a/WORKSPACE b/WORKSPACE
index cd8960ffa..5d3e685f4 100644
index cd8960ffa..787e03ca8 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -92,8 +92,25 @@ http_archive(
@@ -29,8 +29,9 @@ http_archive(
# Google Benchmark library, used in micro-benchmarks.
http_archive(
name = "com_google_benchmark",
- strip_prefix = "benchmark-main",
- urls = ["https://github.com/google/benchmark/archive/main.zip"],
+ sha256 = "1ba14374fddcd9623f126b1a60945e4deac4cdc4fb25a5f25e7f779e36f2db52",
+ strip_prefix = "benchmark-d2a8a4ee41b923876c034afb939c4fc03598e622",
+ urls = ["https://github.com/google/benchmark/archive/d2a8a4ee41b923876c034afb939c4fc03598e622.zip"],
)
# FP16 library, used for half-precision conversions
@@ -92,8 +93,25 @@ http_archive(
],
)
@ -47,7 +59,7 @@ index cd8960ffa..5d3e685f4 100644
-android_sdk_repository(name = "androidsdk")
+#android_sdk_repository(name = "androidsdk")
diff --git a/build_defs.bzl b/build_defs.bzl
index b8217a18d..da232966e 100644
index b8217a18d..6f2d1675e 100644
--- a/build_defs.bzl
+++ b/build_defs.bzl
@@ -380,7 +380,7 @@ def xnnpack_benchmark(name, srcs, copts = [], deps = [], tags = []):
@ -59,6 +71,13 @@ index b8217a18d..da232966e 100644
srcs = srcs,
copts = xnnpack_std_cxxopts() + [
"-Iinclude",
@@ -405,5 +405,5 @@ def xnnpack_benchmark(name, srcs, copts = [], deps = [], tags = []):
":emscripten": xnnpack_emscripten_deps(),
"//conditions:default": [],
}),
- tags = tags,
+ tags = tags,
)
diff --git a/emscripten.bzl b/emscripten.bzl
index f1557a7b1..7f964a094 100644
--- a/emscripten.bzl