kaidi中 install cuda

1,   官网网址, cuda  nvidia   ubuntu-linux  install

http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#ubuntu-installation



2 ,  lspci | grep -i nvidia

GeForce GTX 750

3,  https://developer.nvidia.com/cuda-gpus  , 查看 GeForce GTX 750

得到 GeForce GTX 750  5.0 (Compute Capability )

4,  


dpkg -i cuda-repo-ubuntu1504_7.5-14_amd64.deb  (注意 根据官网,和自身机器型号来装)

 apt-get update

安装 cuda:apt-get install cuda

check cuda install: nvcc --version



5,  ./tools  ./src 都重新装一遍

其中  

src/cudamatrix 中 Makefile 中修改 CUDA_ARCH =-gencode 那一行.我用的是 geforce 750 显卡计算能力为 5,

则修改compute=50,code=sm_50,把TESTFILES 改为 BINFILES(根据官网的数据修改, 第三步来)



在cudamatrix 中测试

./cu-vector-test

LOG (cu-vector-test:SelectGpuId():cu-device.cc:103) Manually selected to compute on CPU.

2.474e+09 2.474e+09

5.69062e+07 5.69062e+07

LOG (cu-vector-test:main():cu-vector-test.cc:765) Tests without GPU use succeeded.

LOG (cu-vector-test:SelectGpuIdAuto():cu-device.cc:288) Selecting from 1 GPUs

LOG (cu-vector-test:SelectGpuIdAuto():cu-device.cc:303) cudaSetDevice(0): GeForce GTX 750    free:1630M, used:416M, total:2047M, free/total:0.796639

LOG (cu-vector-test:SelectGpuIdAuto():cu-device.cc:352) Trying to select device: 0 (automatically), mem_ratio: 0.796639

LOG (cu-vector-test:SelectGpuIdAuto():cu-device.cc:371) Success selecting device 0 free mem ratio: 0.796639

LOG (cu-vector-test:FinalizeActiveGpu():cu-device.cc:213) The active GPU is [0]: GeForce GTX 750    free:1622M, used:424M, total:2047M, free/total:0.792731 version 5.0

2.61506e+08 2.61506e+08

2.12365e+09 2.12365e+09

LOG (cu-vector-test:main():cu-vector-test.cc:767) Tests with GPU use (if available) succeeded.

LOG (cu-vector-test:PrintProfile():cu-device.cc:415) -----

[cudevice profile]

CuMatrix::CopyToMatD2H    0.00232148s

CuVector::CopyFromVecH2D    0.00253987s

AddVec    0.00312328s

CopyRowsFromMat    0.0035851s

CopyFromVec    0.00370455s

CopyToVec    0.00441456s

AddMatMat    0.00453591s

CuVectorBase::CopyColFromMat    0.0058372s

CopyRowsFromVec    0.00752211s

CuVectorBase::CopyRowsFromMat    0.00919819s

CuMatrix::Resize    0.0107021s

VecVec    0.0123014s

CuVector::SetZero    0.0161092s

CuVector::Resize    0.0247462s

RandGaussian    0.555742s

Total GPU time:    0.679858s (may involve some double-counting)

-----

LOG (cu-vector-test:PrintMemoryUsage():cu-allocator.cc:127) Memory usage: 4991268 bytes currently allocated (max: 4991268); 0 currently in use by user (max: 3462368); 1757/3466 calls to Malloc* resulted in CUDA calls.

LOG (cu-vector-test:PrintMemoryUsage():cu-allocator.cc:134) Time taken in cudaMallocPitch=0.00498128, in cudaMalloc=0.0170541, in cudaFree=0.0164499, in this->MallocPitch()=0.0405507

LOG (cu-vector-test:PrintMemoryUsage():cu-device.cc:388) Memory used (according to the device): 10485760 bytes.


这样cuda在kaldi就装好了。




export PATH=/usr/local/cuda/bin:$PATH

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值