日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

kaidi中 install cuda

發(fā)布時(shí)間:2025/3/12 编程问答 48 豆豆
生活随笔 收集整理的這篇文章主要介紹了 kaidi中 install cuda 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1,?? 官網(wǎng)網(wǎng)址, 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? (注意 根據(jù)官網(wǎng),和自身機(jī)器型號(hào)來(lái)裝)

?apt-get update

安裝 cuda:apt-get install cuda

check cuda install: nvcc --version



5,? ./tools? ./src 都重新裝一遍

其中 ?

src/cudamatrix 中 Makefile 中修改 CUDA_ARCH =-gencode 那一行.我用的是 geforce 750 顯卡計(jì)算能力為 5,

則修改compute=50,code=sm_50,把TESTFILES 改為 BINFILES(根據(jù)官網(wǎng)的數(shù)據(jù)修改, 第三步來(lái))



在cudamatrix 中測(cè)試

./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

總結(jié)

以上是生活随笔為你收集整理的kaidi中 install cuda的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。