xinjli / allosaurus

Allosaurus is a pretrained universal phone recognizer for more than 2000 languages
GNU General Public License v3.0
550 stars 86 forks source link

device-id argument doesn't work for different GPUs #4

Closed ajd12342 closed 4 years ago

ajd12342 commented 4 years ago

For inference, the command is python -m allosaurus.run [--lang <language name>] [--model <model name>] [--device_id <gpu_id>] -i <audio>

However, specifying any device ID other than 0 (like say 1) still runs the inference on GPU 0.

Currently, the following code works to run inference on a GPU other than 0, but I think the intention of the device_id argument was to specify GPU ID as well. CUDA_VISIBLE_DEVICES=<gpu_id> python -m allosaurus.run [--lang <language name>] [--model <model name>] [--device_id 0] -i <audio>

xinjli commented 4 years ago

Hi, thanks for reporting this. I will take a look at this issue.