1. 程式人生 > >kaldi平臺上aishell執行時出現的問題及解決辦法

kaldi平臺上aishell執行時出現的問題及解決辦法

問題 1:

This script is intended to be used with GPUs but you have not compiled Kaldi with CUDA
If you want to use GPUs (and have them), go to src/, and configure and make on a machine
where "nvcc" is installed.

解決辦法:

cd 到src目錄下:make clean,清除我們之前的編譯結果。

檢查src/configure檔案370行,cuda安裝路徑是否對應。

for base in /usr/local/share/cuda /usr/local/cuda /usr/; do

./configure:重新生成配置檔案,這時會自動檢查是否安裝了cuda,這裡會有顯示是不是有cuda。

make  編譯完成後,就可以使用GPU進行訓練了。

問題 2:
LOG (nnet3-train[5.5]:SelectGpuId():cu-device.cc:166) num-gpus=4. Device 0: all CUDA-capable devices are busy or unavailable.  Device 1: all CUDA-capable devices are busy or unavailable.  Device 2: all CUDA-capable devices are busy or unavailable.  Device 3: all CUDA-capable devices are busy or unavailable.
ERROR (nnet3-train[5.5]:SelectGpuId():cu-device.cc:167) Failed to create CUDA context, no more unused GPUs?

[ Stack-Trace: ]
kaldi::MessageLogger::HandleMessage(kaldi::LogMessageEnvelope const&, char const*)
kaldi::FatalMessageLogger::~FatalMessageLogger()
kaldi::CuDevice::SelectGpuId(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
main
__libc_start_main
_start

ERROR (nnet3-train[5.5]:SelectGpuId():cu-device.cc:167) Failed to create CUDA context, no more unused GPUs?
 

解決辦法:

修改kaldi-trunk/egs/aishell/s5/local/nnet3/run_tdnn.sh檔案,將檔案第96行--use-gpu true 改成 --use-gpu wait。

問題 3:

utils/data/perturb_data_dir_speed_3way.sh: data/train_sp/feats.scp already exists: refusing to run this (please delete data/train_sp/feats.scp if you want this to run)


解決辦法:

刪除kaldi-trunk/egs/aishell/s5/data/train_sp/feats.scp檔案即可。