-
Couldn't load subscription status.
- Fork 700
JavaScript bindings for module API #12571
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12571
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ddbc698 with merge base ce9da63 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
e8749aa to
bbc46df
Compare
aa8779b to
b50ce11
Compare
b50ce11 to
9c2b93b
Compare
Summary: Needed for pytorch/pytorch#158580 Differential Revision: D78989384
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| executorch_wasm PUBLIC ${_common_include_directories} | ||
| ) | ||
| target_link_libraries(executorch_wasm PUBLIC ${link_libraries}) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should there be a default target_link_options for emscripten?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link options used for the unit tests are specific for that target. I don't think there are link options that would be widely applicable for this.
|
|
||
| cmake_minimum_required(VERSION 3.29) | ||
|
|
||
| project(executorch_wasm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this directory belongs to a new project so should delete this.
| set(link_libraries) | ||
| list( | ||
| APPEND | ||
| link_libraries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should follow the naming convention with a prepending _
Summary
The next step for building Executorch for the web is to write JavaScript bindings for the API.
Added bindidngs that would allow for loading modules and executing methods in JavaScript, along with a few functions to create tensors and read its data.
Test plan
Assuming you already have Emscripten and Node.js version >= 17, you also need Jest as the testing framework. That can be installed with
npm install --save-dev jestTo build and run the tests, run the commands
Added CI for unit tests.