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

Gpu inference #3

Open
puppetm4st3r opened this issue Jul 7, 2024 · 7 comments
Open

Gpu inference #3

puppetm4st3r opened this issue Jul 7, 2024 · 7 comments

Comments

@puppetm4st3r
Copy link

is there a way to use webgpu or multithread cpu inference? or that depends on the browser/os host? regards

@k9p5
Copy link
Contributor

k9p5 commented Jul 7, 2024

WebGPU browser compatibility is still rather limited, however it should most definitely be possible. I'll be working on it asap.

@puppetm4st3r
Copy link
Author

puppetm4st3r commented Jul 7, 2024

thanks, and for cpu inference? it uses multithread inference? when i try raw onxx on wasm cannot do it with multithread inference, no errors just did not do anything

@k9p5
Copy link
Contributor

k9p5 commented Jul 8, 2024

Yes it can be multithreaded but you need to enable cross-origin isolation.

@C-Loftus
Copy link

This is a great idea and would be very useful.

I would like to look into this or help you out. Have there been any updates on this or pointers for where to start? I wasn't sure how much of this needs to be done in WebGPU via JS or inside the WebAssembly. I also wasn't sure whether or not this will touch the build process in the piper wasm repo.

@raymondtri
Copy link

I'm also interested in helping with this where possible.

From my understanding the blocker is related to the actual piper library and not vits. ONNX runtime has gpu support of course, and piper can be ran in GPU locally, but it looks like there's no compiled WASM bundle of piper that is built for gpu support which would run on the ONNX runtime.

I'm pretty new to WASM especially GPU WASM, so I could be wrong.

@C-Loftus
Copy link

C-Loftus commented Nov 8, 2024

From my understanding the blocker is related to the actual piper library and not vits. ONNX runtime has gpu support of course, and piper can be ran in GPU locally, but it looks like there's no compiled WASM bundle of piper that is built for gpu support which would run on the ONNX runtime.

I think that is correct. As I have look into this further, it also seems based on ken107/read-aloud#424 (comment) that even in piper itself within a standard desktop runtime there are issues with GPU utilization. So I think this might be blocked on piper before pursuing web / wasm issues further.

@raymondtri
Copy link

rhasspy/piper#598

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

No branches or pull requests

4 participants