kaldi+cuda安裝
1.下載kaldi
2.在tools下面按照步驟安裝
3.vim .bashrc修改環境變數
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64$LD_LIBRARY_PATH
source .bashrc啟用環境變數
4.到src目錄下,在configure檔案26%左右修改
for base in /usr/local/share/cuda /usr/loc /cuda-8.0 /usr/; do
呼叫自己的環境變數
5.在src目錄下編譯
make clean
./configure --shared
make depend -j 8
make -j 8
6.單獨編譯 cudamatrix
cd kaldi/src/cudamatrix/
把Makefile檔案中的 TESTFILES 改成 BINFILES
make all
./cu-vector-test
如果不報錯並顯示如下資訊,則說明 CUDA 進行矩陣運算了
./cu-vector-test
LOG (cu-vector-test[5.4.105~2-4fda]:SelectGpuId():cu-device.cc:123) Manually selected to compute on CPU.
-1.05384e+09 -1.05384e+09
-2.15126e+08 -2.15126e+08
LOG (cu-vector-test[5.4.105~2-4fda]:main():cu-vector-test.cc:859) Tests without GPU use succeeded.
WARNING (cu-vector-test[5.4.105~2-4fda]:SelectGpuId():cu-device.cc:196) Not in compute-exclusive mode. Suggestion: use 'nvidia-smi -c 3' to set compute exclusive mode
LOG (cu-vector-test[5.4.105~2-4fda]:SelectGpuIdAuto():cu-device.cc:315) Selecting from 1 GPUs
LOG (cu-vector-test[5.4.105~2-4fda]:SelectGpuIdAuto():cu-device.cc:330) cudaSetDevice(0): Tesla K40c free:412M, used:11028M, total:11441M, free/total:0.0360703
LOG (cu-vector-test[5.4.105~2-4fda]:SelectGpuIdAuto():cu-device.cc:379) Trying to select device: 0 (automatically), mem_ratio: 0.0360703
LOG (cu-vector-test[5.4.105~2-4fda]:SelectGpuIdAuto():cu-device.cc:398) Success selecting device 0 free mem ratio: 0.0360703
LOG (cu-vector-test[5.4.105~2-4fda]:FinalizeActiveGpu():cu-device.cc:247) The active GPU is [0]: Tesla K40c free:366M, used:11074M, total:11441M, free/total:0.0320389 version 3.5
4.52132e+08 4.52132e+08
1.38749e+09 1.38749e+09
LOG (cu-vector-test[5.4.105~2-4fda]:main():cu-vector-test.cc:861) Tests with GPU use (if available) succeeded.
LOG (cu-vector-test[5.4.105~2-4fda]:PrintProfile():cu-device.cc:449) -----
[cudevice profile]
CuVectorBase::ApplyCeiling 0.0205135s
CuVectorBase::MulTp 0.0229831s
AddTpVec 0.0262518s
Sum 0.0361161s
CuVector::CopyFromVecH2D 0.0428603s
CopyRowsFromVec 0.061161s
CuVectorBase::CopyColFromMat 0.077713s
AddVec 0.0862093s
CopyToVec 0.101046s
CopyFromVec 0.15156s
CuMatrix::Resize 0.159565s
VecVec 0.252803s
CuVector::SetZero 0.55053s
CuVector::Resize 0.782922s
RandGaussian 6.31372s
Total GPU time: 8.93733s (may involve some double-counting)
-----
LOG (cu-vector-test[5.4.105~2-4fda]:PrintMemoryUsage():cu-allocator.cc:127) Memory usage: 16257160 bytes currently allocated (max: 16348884); 0 currently in use by user (max: 12585152); 1292/2299 calls to Malloc* resulted in CUDA calls.
LOG (cu-vector-test[5.4.105~2-4fda]:PrintMemoryUsage():cu-allocator.cc:136) Time taken in cudaMallocPitch=0.0663958, in cudaMalloc=0.106217, in cudaFree=0.113429, in this->MallocPitch()=0.346224
LOG (cu-vector-test[5.4.105~2-4fda]:PrintMemoryUsage():cu-device.cc:422) Memory used (according to the device): 20447232 bytes.
相關文章
- 安裝npm 解除安裝npm 安裝apidocNPMAPI
- BiocManager安裝,devtools安裝dev
- Linux安裝解除安裝MySQLLinuxMySql
- linux 安裝yum 安裝phpLinuxPHP
- Ubuntu解除安裝和安裝Ubuntu
- 02 安裝git、安裝TortoiseGitGit
- cocoapods安裝/解除安裝/使用
- JDK安裝和解除安裝JDK
- ffmpeg安裝之mac安裝Mac
- docker安裝及解除安裝Docker
- [ 安裝 ] Zeppelin安裝步驟!
- win10安裝版怎麼安裝_安裝版win10安裝教程Win10
- ElasticSearch的安裝和使用,Postman的安裝,Kibana的安裝,EShead外掛的安裝ElasticsearchPostman
- Mac Redis安裝與解除安裝MacRedis
- 安裝了IDLE後安裝tensorflow
- kratos安裝及依賴安裝
- Linux 解除安裝openjdk 安裝oraclejdkLinuxJDKOracle
- debian安裝和解除安裝vmware
- JDK的安裝與解除安裝JDK
- linux 解除安裝jdk和安裝LinuxJDK
- 【推薦 - glibc安裝】MySQL - 安裝MySql
- linux下安裝snap安裝工具Linux
- [雲原生]Docker - 安裝&解除安裝Docker
- Ubuntu安裝和解除安裝mongodbUbuntuMongoDB
- window下安裝並使用nvm(含解除安裝node、解除安裝nvm、全域性安裝npm)NPM
- 安裝
- air安裝win10怎麼解除安裝_air安裝win10如何解除安裝AIWin10
- Centos Docker安裝、升級、解除安裝CentOSDocker
- Webpack學習 – Webpack安裝及安裝Web
- Linux-Ubuntu-mysql-安裝&解除安裝LinuxUbuntuMySql
- Centos7.9安裝解除安裝DockerCentOSDocker
- Centos7安裝安裝部署dockerCentOSDocker
- Linux系統安裝——Centos 7.6安裝LinuxCentOS
- PostgreSQL 10.12 安裝系列 - 原始碼安裝SQL原始碼
- PostgreSQL 10.12 安裝系列 - 本地RPM安裝SQL
- 【 Linux 軟體安裝 】- 1 JDK安裝LinuxJDK
- Python pip的安裝及解除安裝Python
- CentOS7安裝php、安裝MySqlCentOSPHPMySql