Skip to content

Commit

Permalink
Merge pull request tensorflow#9 from Honry/remove-emsdk-patch
Browse files Browse the repository at this point in the history
Remove unnecessary emsdk.patch
  • Loading branch information
huningxin committed May 31, 2023
2 parents 885768f + ba6d079 commit a718554
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3,794 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ using bazel and emsdk.
- Run `yarn run electron-packager` to build an electron.js app of this demo.
5. The WebNN delegate support
- `tensorflow_lite_webnn_delegate.patch`: the WebNN delegate implementation.
- `emscripten_webnn_support.patch`: WebNN support of emscripten.
- `emsdk.patch`: workaround the frozen cache setting of emscripten so WebNN support can be regenerated. As the cache is cleared, the first `yarn build` would fail. Please rerun, it would succeed.
- Add `TFLiteWebModelRunnerOptions.enableWebNNDelegate` to enable or disable WebNN delegate.
- Demo in browser is using webnn-polyfill.
- Demo in electron.js could use [WebNN-native node.js binding](https://github.com/webmachinelearning/webnn-native/tree/main/node) for more details.
35 changes: 2 additions & 33 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -555,45 +555,14 @@ arm_linux_toolchain_configure(
)

# Emscripten toolchain
#http_archive(
# name = "emsdk",
# sha256 = "7a58a9996b113d3e0675df30b5f17e28aa47de2e684a844f05394fe2f6f12e8e",
# strip_prefix = "emsdk-c1589b55641787d55d53e883852035beea9aec3f/bazel",
# url = "https://github.com/emscripten-core/emsdk/archive/c1589b55641787d55d53e883852035beea9aec3f.tar.gz",
#)

http_archive(
name = "emsdk",
# repo_mapping = {"@nodejs": "@nodejs_host"},
sha256 = "1aa5365ccb2147701cc9d1e59a5a49577c1d6aea55da7c450df2d5ffa48b8a58",
strip_prefix = "emsdk-3.1.24/bazel",
urls = ["https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.24.tar.gz"],
patches = [
# WebNN support
"@//third_party:emsdk.patch",
],
patch_args = ["-p2"],
)

# emscripten_url = "https://storage.googleapis.com/webassembly/emscripten-releases-builds/{}/{}/wasm-binaries.tbz2"
#
# # "3.1.4"
# http_archive(
# name = "emscripten_bin_linux",
# strip_prefix = "install",
# url = emscripten_url.format("linux", "39e60dda6945cfcd6487725bdb1361ae7975173f"),
# sha256 = "4a57c0d60eeb4e021de61c8497f0b595a0a9db0235f1640a528de752409f4fcf",
# build_file = "@emsdk//emscripten_toolchain:emscripten.BUILD",
# type = "tar.bz2",
# patches = [
# # WebNN support
# "@//third_party:emscripten_webnn_support.patch",
# ],
# patch_args = ["-d", "emscripten", "-p1"],
# # Clear the cache to renegerate the webnn headers and libs
# # The first "yarn build" would fail. Rerunning it would be successful.
# patch_cmds = ["rm -r emscripten/cache"],
# )
)


load("@emsdk//:deps.bzl", emsdk_deps = "deps")

Expand Down
Loading

0 comments on commit a718554

Please sign in to comment.