Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Apple silicon WASM development #6098

Merged
merged 6 commits into from Feb 16, 2022

Conversation

mattsoulanille
Copy link
Member

@mattsoulanille mattsoulanille commented Feb 3, 2022

Upgrade xnnpack and emsdk to support WASM development on Apple silicon.

Depends on #6090. Also depends on emscripten-core/emsdk#978.

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

mattsoulanille added a commit that referenced this pull request Feb 4, 2022
Upgrade Bazel version to 4.2.2 (supported by m1), rules_nodejs to 4.6.1 (required for node 16.13.2), and node to 16.13.2 (same as our CI docker image and required for m1 compatibility).

tfjs-backend-wasm will be fixed in #6098.

Not yet working:
* tfjs-converter python. #6089 may fix this if you have a working python2.7 homebrew install.
Copy link
Member Author

@mattsoulanille mattsoulanille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 approvals obtained


tfjs-backend-wasm/src/cc/BUILD, line 64 at r1 (raw file):

        "-s MALLOC=emmalloc",
        "-s USE_PTHREADS=1",
        "-s PROXY_TO_PTHREAD=1",

I removed this because I don't think it's actually doing anything for us. We have no main function, so there's nothing to proxy, at least according to the emscripten error message I get when I compile with this flag:

emcc: error: PROXY_TO_PTHREAD proxies main() for you, but no main exists

Code quote:

      "-s PROXY_TO_PTHREAD=1",

@mattsoulanille mattsoulanille marked this pull request as ready for review February 12, 2022 02:14
Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on my M1X, all tests passed. Thank you!

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @pyu10055)

Copy link
Collaborator

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r1.
Reviewable status: :shipit: complete! 2 of 1 approvals obtained

@mattsoulanille mattsoulanille merged commit 23c7251 into tensorflow:master Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants