Skip to content

Commit

Permalink
Fix compilation errors of workload xnnpack and meshoptimizer (bytecod…
Browse files Browse the repository at this point in the history
  • Loading branch information
lum1n0us authored Mar 30, 2023
1 parent 0e78942 commit 54efc56
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 15 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build_iwasm_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ jobs:
./core/deps/llvm/build/libexec
./core/deps/llvm/build/share
key: ${{ inputs.llvm_cache_key }}

- name: Quit if cache miss
if: steps.retrieve_llvm_libs.outputs.cache-hit != 'true'
run: echo "::error::can not get prebuilt llvm libraries" && exit 1
fail-on-cache-miss: true

- name: generate iwasm binary release
run: |
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/build_wamrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ jobs:
./core/deps/llvm/build/libexec
./core/deps/llvm/build/share
key: ${{ inputs.llvm_cache_key }}

- name: Quit if cache miss
if: steps.retrieve_llvm_libs.outputs.cache-hit != 'true'
run: echo "::error::can not get prebuilt llvm libraries" && exit 1
fail-on-cache-miss: true

- name: generate wamrc binary release
run: |
Expand Down
5 changes: 2 additions & 3 deletions samples/workload/XNNPACK/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 22 additions & 3 deletions samples/workload/XNNPACK/xnnpack.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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(
],
)

Expand Down Expand Up @@ -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 = []):
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion samples/workload/meshoptimizer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ExternalProject_Add(codecbench
PREFIX codecbench
GIT_REPOSITORY https://github.com/zeux/meshoptimizer.git
GIT_TAG f734fd572aed5bf76e84d9ed62ca6f4f6c47d84e
GIT_SHALLOW ON
GIT_SHALLOW OFF
GIT_PROGRESS ON
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/meshoptimizer
UPDATE_COMMAND git clean -fd && git checkout -- *
Expand Down

0 comments on commit 54efc56

Please sign in to comment.