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

Loading Wasm and Activiting in Worker Causes Compile Error #3765

Closed
Deamoner opened this issue Aug 10, 2020 · 6 comments
Closed

Loading Wasm and Activiting in Worker Causes Compile Error #3765

Deamoner opened this issue Aug 10, 2020 · 6 comments

Comments

@Deamoner
Copy link

To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

TensorFlow.js version

2.0

Browser version

Latest Chrome

Describe the problem or feature request

Wanted to add and turn on wasm in the web worker. It loads the file but on set tfjs says compile error.

Code to reproduce the bug / link to feature request

If you would like to get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.
importScripts("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs");
importScripts("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm");
importScripts("https://cdn.jsdelivr.net/npm/@tensorflow-models/body-pix");

tf.setBackend('wasm').then(() => main());

GitHub issues for this repository are tracked in the tfjs union repository.

Please file your issue there, following the guidance in that issue template.

@rthadur
Copy link
Contributor

rthadur commented Aug 11, 2020

@Deamoner did you try with latest version , can you please provide steps and error message ?

@rthadur rthadur self-assigned this Aug 11, 2020
@rthadur rthadur added comp:wasm type:support user support questions labels Aug 11, 2020
@Deamoner
Copy link
Author

Deamoner commented Aug 11, 2020 via email

@rthadur rthadur assigned annxingyuan and unassigned rthadur Aug 11, 2020
@annxingyuan
Copy link
Contributor

Hi @Deamoner - has your code worked in any previous version of TFJS? Also if you could include the full compile error from the console that would be great.

I also wonder whether this might be related: #3771

@ButzYung
Copy link

When using WASM backend in worker, you need to run setWasmPath (or setWasmPaths in later versions) before setting the backend.

@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 dyas if no further activity occurs. Thank you.

@google-ml-butler
Copy link

Closing as stale. Please @mention us if this needs more attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants