-
Notifications
You must be signed in to change notification settings - Fork 16
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
Enable GPU support #5
base: master
Are you sure you want to change the base?
Conversation
Looks good to me, and this would be a great thing to have. |
The |
Hi @synesthesiam, thank you for your quick answer. According to the documentation from here: https://github.com/rhasspy/piper (line https://github.com/rhasspy/piper/blob/6c5e283439f8400aa7a2652aafbedfb77ca3fc22/README.md?plain=1#L176) piper has a Is it a bug there that cuda does not work (I see you just commited something in that repo related to cuda) or is it in this other issue rhasspy/rhasspy3#49? Can we help you in some way? |
The Python library for piper supports CUDA. I added the flag for the C++ version yesterday, but it needs the "gpu" version of the onnx runtime so I will need to adjust the build process too. |
@synesthesiam is there a way to leverage the latest C++ version that has the |
+1, @synesthesiam I would be appreciated if you could guide us a bit how to utilise cuda in our Jetson project here (using Edit: Solved here: dusty-nv/jetson-containers@4ba5dc4 |
I agree with @synesthesiam, piper supports "--use-cuda", not "--cuda" Source: https://github.com/rhasspy/piper/blob/c0670df63daf07070c9be36b5c4bed270ad72383/src/cpp/main.cpp#L441 Please see my comment on a related project where I encountered the same issue here: linuxserver/docker-piper#8 (comment) |
Good catch @roryeckel ! Can you @mreilaender update this PR please? |
Seems like after using
This issue was already reported in this other issue: rhasspy/wyoming#9 |
Indeed I experienced the same issue in linuxserver/docker-piper#8 (comment) , it seems to be a segfault |
Why do you think it might be a segfault? I was thinking more about a permissions issue, since the error says: "No such file or directory" |
I came to that conclusion by running the piper binary inside the container without the python wyoming scaffolding around it. The reason it fails to load a file is because empty string is returned by piper, which is interpreted as a filename. Certainly empty string is not a valid file. But the segfault is the reason for empty string. |
Piper stores the wavefile on filesystem. It's a permissions issue. Piper works perfectly with CUDA and onnxruntime-gpu in jetson-containers: https://github.com/dusty-nv/jetson-containers/blob/master/packages/smart-home/wyoming/piper/Dockerfile You can find a git patch there, showcasing fow to fix Cheers. |
This change provides an executable that will be installed into the bin/ directory of the python environment, which is simpler to start up, because the correct python instance is already implied.
@edurenye done. I used pull --rebase I hope that's fine. Let me know if it isn't |
@mreilaender Thanks for updating the PR. The rebase looks fine, but is not enough changing the input argument, what you really need to change is the past argument, so you changed the |
Enables GPU support by adding
--cuda
to the argument parser and passing it to piperCloses #1