How to enable CUDA for conda-forge MFA?

411 views
Skip to first unread message

Daniel Wolf

unread,
Jan 2, 2022, 12:40:53 PM1/2/22
to MFA Users
Hi!

The MFA installation instructions mention that "Installing MFA via conda will pick up Kaldi as well." This is great news for me, since I found that manually building the prerequisites isn't trivial. I also noticed that Michael McAuliffe seems to have put quite some effort into making sure that the kaldi package is available not just in a CPU version, but also in a GPU version with CUDA support, kaldi-cuda.

My question, then, is: How do I install MFA via Conda in such a way that the CUDA version of Kaldi gets installed? Unless I'm missing something, the montreal-forced-aligner package explicitly references the kaldi package, which I suspect is identical with caldi-cpu.

Best,
Daniel

michael.e...@gmail.com

unread,
Jan 2, 2022, 10:49:15 PM1/2/22
to MFA Users
You should be able to install the cuda version with `conda install kaldi-cuda -c conda-forge`.  I haven't done a ton of testing of it other than running the cuda detection bins in Kaldi and they were working on my system, but let me know if you run into issues.  That said, MFA currently doesn't take advantage of any cuda functionality at the moment, so performance will be identical for MFA commands.  I am hoping to get a new release out shortly that has some significant optimizations after recent refactors slowed it down.

Daniel Wolf

unread,
Jan 3, 2022, 2:25:14 AM1/3/22
to MFA Users
Thank you for your answer! If none of the Kaldi commands used by MFA use CUDA-optimized matrix operations, CUDA support for MFA certainly doesn't make much sense at the moment.

Are the forthcoming performance optimizations in MFA CPU-only, or are you planning to call CUDA-optimized Kaldi commands?
Reply all
Reply to author
Forward
0 new messages