登 录
註 冊
论坛
微波仿真网
注册
登录论坛可查看更多信息
微波仿真论坛
>
程序
>
利用nvidia CUDA加速MATLAB运算
发帖
回复
3483
阅读
2
回复
[
资料共享
]
利用nvidia CUDA加速MATLAB运算
离线
xasun
UID :26401
注册:
2009-03-01
登录:
2009-11-12
发帖:
2
等级:
旁观者
0楼
发表于: 2009-07-10 15:13:11
星期六早上去参加了旅英侨界运动会,认识了不少好朋友,也第一次听说了NVidia的CUDA,可以用GPU运算!NV牌八系列以上的芯片组就可以用!我的F8SV完全OK阿!据说利用GPU可以大幅缩短MATLAB矩阵运算的时间,我听了感觉很嗨!当然就投入研究看看啰!
&N_c-@2O
-yQ\3wli`
j~*Z7iu
但是想的比做的美,如果乖乖按照NV官网上的教学,我想我到现在还是无法使用吧?最后还是跟先进求救才搞定。就把这步骤记录下来当作我BLOG的第一篇吧!
%e7(HfW-U
NVqC|uEAF
先介绍我的laptop
X5|/s::u
ASUS F8Sv
eoe^t:5&
OS: VISTA 32bit
H"rzRd;S
MATLAB R2008a
Q_0x6]/!
u\6]^T6
接着看看你的显示适配器是不是支持CUDA,底下是支援列表。
G0 /vn9&
'b?.\Bm;
b\;u9C2y'
如果你有,恭喜!
za]p,bMX
q[OTaSQ~u^
安装CUDA以前,先安装第三方显卡驱动。对,你没看错NV自家驱动会让你安装不了CUDA driver,够鸟吧!
}R&5qpl
专家帮我找到属于我的规格的最新趋动,连结如下
,Zf!KQw
.!8X]trEg
如果你跟我不一样显卡,自己从
r82o[+$u0K
X/8iJ-KB
n`z+ w*
去找吧!
jJ"EGFa8
INF档是当EXE自解压缩完成之后要丢进去替换掉的,这样才能顺利安装。安装前记得先移除原来的显示适配器驱动程序。
$dp#nyP
<I%9O:R
6 _5d
去当漏区把该抓的三样东西都抓一抓,驱动要第一个灌,上面的INF档一样要塞进来,不然不能顺利安装喔!
Y0B1xL@
接着安装另外两个档案toolkit&SDK
"I}Z2
马上就可以看看NV官方提供的GPU强大威力演示啰!
km\ld&d]$
7 Y>`- \
但是这还不够,我要的是MATLAB的API阿!翻来找去,让我找到了Jacket这个project,提供MATLAB用的
TBKd|D'H
函示库喔!不需要自己的撰写C语言再用MEX function,真是爽阿。下载后,直接把Jacket提供的函式库加进PATH就搞定了!
1uS-Tx
)Ct*G= N
底下是BLAS范例执行的结果,我就不多做解释了,自己看看有多威吧!
7Jx-W|
/3[9{r
BLAS Example 1: Square Matrix Multiplication
)uid!d
Computing the 2x2 benchmark...
j"IM,=
On average GPU is 0.177807 times faster than the CPU.
soq".+Q
Computing the 4x4 benchmark...
}t51U0b%
On average GPU is 0.143623 times faster than the CPU.
1:x nD
Computing the 8x8 benchmark...
Kxl,] |e>
On average GPU is 0.135356 times faster than the CPU.
ki~y@@3I
Computing the 16x16 benchmark...
G(0y|Eq
On average GPU is 0.182954 times faster than the CPU.
? TT8|Os
Computing the 32x32 benchmark...
I>%S4Z+o
On average GPU is 5.28891 times faster than the CPU.
>6I.%!jU
Computing the 64x64 benchmark...
LJ(n?/z%
On average GPU is 1.67258 times faster than the CPU.
-yAnn
Computing the 128x128 benchmark...
CSL{Q
On average GPU is 4.13088 times faster than the CPU.
\FoxKOTp
Computing the 256x256 benchmark...
H[7cA9FI
On average GPU is 17.4282 times faster than the CPU.
xOL)Pjo/m
Computing the 512x512 benchmark...
L=HVdeE
On average GPU is 139.496 times faster than the CPU.
#xP!!.DF(
Computing the 1024x1024 benchmark...
>U~|R=*
On average GPU is 990.547 times faster than the CPU.
G4`Ut1g^
Plotting results...End of BLAS Example 1.
F%#*U82
HD:%Yv
BLAS Example 2: Matrix-Vector Multiplication (Transformation)
rFq@]t3q
Computing the 3x1024 benchmark...
E! I
On average GPU is 1.60066 times faster than the CPU.
fcE)V#c"g
Computing the 3x2048 benchmark...
5M Wvu,'%8
On average GPU is 4.33732 times faster than the CPU.
%]<RRH.w
Computing the 3x4096 benchmark...
u.kYp
On average GP ..
0/:=wn^pg
JOdwv4(3V
未注册仅能浏览
部分内容
,查看
全部内容及附件
请先
登录
或
注册
共
条评分
离线
liudada
走自己的路,让别人说去吧!
UID :57462
注册:
2010-04-17
登录:
2011-09-21
发帖:
18
等级:
仿真新人
1楼
发表于: 2010-05-01 07:28:02
长见识了!
共
条评分
--From Blue BarCodes
离线
djtyc
川流不息
UID :72488
注册:
2011-02-18
登录:
2011-09-03
发帖:
90
等级:
仿真二级
2楼
发表于: 2011-08-02 09:18:01
的确是长见识了
共
条评分
发帖
回复