天天看点

Linux 16.04 + CUDA8.0 + kaldi + CNTK

Basic install

#: svn co https://kaldi.svn.sourceforge.net/svnroot/kaldi/trunk kaldi-trunk

#: cd to tool run 'make'

#: cd to src run './configure, make depend, make'

----if ' libatlas not install '  in src configure step, find another kaldi-trunk source to replace "tool"part and remake it.

forget about cpufrequency--that didn't help in my computer. it seems that ubuntu16.04 x86_64 has no power manager to shut down throttling effect.

Compile with CNTK

#configure nvida driver and cuda 8.0

#: svn co https://kaldi.svn.sourceforge.net/svnroot/kaldi/trunk kaldi-trunk

#: cd to tool run 'make'

#: cd to src run './configure --shared, make depend, make'

#compile CNTK : https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-CNTK-on-your-machine

----Remember to add "--shared" option in configure step.

---- I found it easier to compile CNTK with cuda 8.0

---- If you just want your CNTK support ASR training, don't configure image process library in CNTK or you'll get into troubles.

---- For ASR support, you only need to compile CNTK with CNTKCustomMKL, cuda, cub, cudnn, kaldi, boost, protobuf.

---- Here attached my Config file for cntk

#Configuration file for cntk

BUILDTYPE=release

MATHLIB=mkl

MKL_PATH=/usr/local/CNTKCustomMKL

MKL_THREADING=

CNTK_CUSTOM_MKL_VERSION=2

CUDA_PATH=/usr/local/cuda

GDK_INCLUDE_PATH=/usr/include/nvidia/gdk

GDK_NVML_LIB_PATH=/usr/src/gdk/nvml/lib

CUB_PATH=/usr/local/cub-1.4.1

CUDNN_PATH=/usr/local/cudnn-5.1

NCCL_PATH=/usr/local/nccl

KALDI_PATH=/pathtokaldi/kaldi-trunk2

LIBZIP_PATH=/usr/local

BOOST_PATH=/usr/local/boost-1.62.0

PROTOBUF_PATH=/usr/local/protobuf-3.1.0

CNTK_ENABLE_ASGD=true

Newly Kaldi

----The newly kaldi version in github is strongly suggested: https://github.com/kaldi-asr/kaldi , or you will run into bugs training with egs scripts, say HKUST demo.

继续阅读