關(guān)于GTX690與TeslaK10性能間的對比_第1頁
關(guān)于GTX690與TeslaK10性能間的對比_第2頁
關(guān)于GTX690與TeslaK10性能間的對比_第3頁
關(guān)于GTX690與TeslaK10性能間的對比_第4頁
關(guān)于GTX690與TeslaK10性能間的對比_第5頁
已閱讀5頁,還剩7頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、關(guān)于gtx 690與tesla k10性能間的對比環(huán)境設(shè)置gpx 690與tesla k10搭載的環(huán)境分別如下表所示。表1 gtx 690與tesla k10的環(huán)境配置顯卡數(shù)量操作系統(tǒng)內(nèi)存cpugtx 6902xp 32 位4g17/3.2ghztesla k102win7 64 位2帶寬測試結(jié)果兩顯卡內(nèi)存與現(xiàn)存以及顯存間的帶寬測試如下表所示。表2 gtx 690與tesla k10帶寬對比2顯卡(內(nèi)存與顯存)單顯卡(內(nèi)存與顯存)顯存間帶寬gtx 6906gb12gb15gbtesla k1012gb12gb14. 5gb從上面的表格中可以看出貴公司的主板性能很強(qiáng)大,當(dāng)搭載兩塊顯卡后,帶寬并不

2、會(huì)下降。3運(yùn)行速度測試結(jié)果對代碼分別在兩個(gè)環(huán)境下連續(xù)進(jìn)行了 1000次的測試,每次需耍的平均時(shí)間的結(jié)果如下 表所示。表2 gtx 690與tesla k10計(jì)算能力2顯卡4gpu單顯卡2gpu雙顯卡2gpu (每個(gè)顯卡用一個(gè)gpu)gtx 690410ms700ms710mstesla k10460ms870ms870ms4運(yùn)行穩(wěn)定性測試結(jié)果對1000次的結(jié)果進(jìn)行了查看,tesla k10的結(jié)果穩(wěn)定在460ms左右,相差最大ims, 運(yùn)行相當(dāng)穩(wěn)定,但是gtx 690每次運(yùn)行的結(jié)果相差幾個(gè)毫秒,甚至幾十毫秒,運(yùn)行很不穩(wěn)定。vs2010 中配置 cuda5.01、安裝之前必須確認(rèn)自己電腦的gpu支

3、持cuda0在設(shè)備管理器中找到顯示適配器(display adapters), 找至u自己電腦的顯卡型號,如果包含在 的列表中,說明支持 cuda©安裝cudaz前最好檢查一下自己電腦的顯卡驅(qū)動(dòng)版木,版本過老的話,需要更新。有時(shí)候 安裝完畢cuda之后,運(yùn)行6中的devicequery程序時(shí)會(huì)出錯(cuò),請優(yōu)先考慮顯卡驅(qū)動(dòng)的問題。2、下載;nvidia cuda toolkit ( 本人下載的是desktop版本win32cuda5.0已經(jīng)將toolkit和sdk等整合在了一起,因此只需下載一個(gè)安裝文件即可。3、首先確認(rèn)自己已經(jīng)安裝visual studio 2010后再安裝助手visua

4、l assist x。這里visual assist x 對于使用cuda不是必須的,但為了使程序編寫更為方便,這里推薦安裝。安裝請參考:4、cuda 的默認(rèn)安裝目錄為:c:program filesnvidia gpu computing toolkit 這里推薦使用 默認(rèn)的安裝路徑,不需更改。5、安裝完成后,在系統(tǒng)環(huán)境里面會(huì)發(fā)現(xiàn)新添加了兩個(gè)壞境變量:cuda_path_v5_0和 cuda_path。但是這些還不夠。保險(xiǎn)起見,手動(dòng)配置環(huán)境變量。在系統(tǒng)環(huán)境變量中新建如下 項(xiàng):cuda sdk path = c:programdatanvidia corporationcuda samples

5、v5.0common cuda_lib_path = %cuda_path%libwi n32cuda_bin_path = %cuda_path%bi ncuda_sdk_lib_path = %cuda_sdk_path%commonlibwi n32cuda_sdk_bin_path = %cuda_sdk_path%bi nwin32然后在系統(tǒng)環(huán)境變量path后添加如下內(nèi)容:;%cuda_lib_path%;%cuda_bin_path%;%cuda_sdk_lib_path%;%cuda_sdk_bin_path%;6、此時(shí)cuda已經(jīng)安裝成功??梢詼y試運(yùn)行。(1) 、啟動(dòng)命令行,s

6、tart > all programs > accessories > command prompt,輸入 nvcc -v 査看 版本信息。(2) 、運(yùn)行例子程序devicequeryo路徑在如下位置:windows xp:c:documentsandsettingsaiiusersapplicatio ndatanvidiacorporationcudasamplesv5.0cbinwin32releasewindows vista, windows 7, windows 8, windows server 2003, and windows server2008:c:pr

7、ogramdatanvidia corporationcuda samplesv5.0cbinwin32release(詳見 運(yùn)行結(jié)果如下:administrator command promptdeuicequery starting.cuda device query (runtine api) version (cudart static linking)found 1 cuda capable deuice(s)device 0: ugeforce gtx 670”cudfi driuer uersion / runtine uersioncuda capability major/h

8、inor version number: total anount of global nenory:< ?) nultipnocessops x <192) cuda cores/mp: gpu clock rate:menory clock rate: memory bus width: l2 cache size: max texture dinension size gyq max layered texture size (din> x layers total anount of constant nenory:total anount of shared nen

9、ory per block:total nunber of registers auailable per block: varp size: naxmun maxinun maxi ruim maxinun maxinun textureconcurrent copy and execution: run tine linit on kernels: integrated gpu sharing host menory: support host pageocked nenory napping: concurrent kernel execution: alignnent requirem

10、ent for surfaces: deuice has ecc support enabled: deuice is using tcc driver node: deuice supports unified addressing <uua>: device pci bus id / pci location id: compute mode:< default (multiple host threads can usenumber of threads per multiprocessor: nunbe? of threads per block: sizes of

11、each dinension of a block: sizes of each dimension of a grid: nemory pitch: alignnent:5.0 / 5.03.02048134410463004mbytes <2147483648 bytes)cum coreshhz (1.05 ghz)mhz256-bit524288 bytesld-(65536), 2dm65536.65536,3d叭4096.40%,40 1d=(16384) x 2048, 2d=(1638446384) x 2048 65536 bytes49152 bytes6553632

12、204810241024 x 1024 x 642147483647 x 65535 x 655352147483647 bytes512 bytesyes with 1 copy engine(s)nono¥esvesvesnono¥es1 / 0:cudasetdeuiceo with deuice sinultaneously) >deuicequery. cuda driver = cudartcuda driver uersion = cuda runtine uersion = 5.0, nunde deuicequeryl test results.pa

13、ssed> exit inti in 3 seconds: 3. .2(3)、運(yùn)行bandwidthtest示例程序,結(jié)果如下:administrator command promptbandwidthtest startingrunning on.deuice<s>deuice<s>deuice<s>bandwidth<mb/s>148632.6bandwidth<mb/s>3174.5bandwidth<mb/s>2805.11.done?c:programdatanui di a corporationcuda

14、 sanplesu5.0cbinwin64releasenrbandwidthtest j startingdeuice 0: geforce gtx 670quick modehost to deuice bandwidth pinned memory transfers transfer size (bytes) 33554432device to host bandwidth.pinned memory transfers transfer size bytes 33554432deuice to device bandwidth.pinned memory transfers tran

15、sfer size (bytes) 33554432bandvfidthtest j test results. passed> exiting in 3 seconds: 3(4)、運(yùn)行particles示例程序,觀看效果。 若以上都運(yùn)行正常,說明cuda安裝成功。7、cuda c/c+關(guān)鍵字及函數(shù)高亮顯示這個(gè)設(shè)置是讓visual studio2010在編輯.cu文件時(shí),把.cu文件里的c/c+語法高亮。設(shè)置 方法: 在 visual studio 2010 的菜單依次選"tools | options |text editor|file extension (工具 | 選項(xiàng)

16、i文本編輯器i文件擴(kuò)展名)”,在該窗口中將"editor (編輯器)下拉框選擇"microsoft visual c+在"extension (擴(kuò)展名)"文本框中輸入cu點(diǎn)擊"add (添加)"按鈕,重復(fù)工作 把cuh添加為visual c+類型,添加完成后點(diǎn)擊"ok (確定)按鈕,如下圖所示:項(xiàng)目»?如文本彌朗i gggbask c/o css» f#> html jsaipt pl/sql> sqlce transact-sql> t sql90> xamlxml噺黎文件痢獅:

17、m(t):鵜器(1):,、,珞osoftvisual際“ (siflfl)"(船r)為了讓cuda的關(guān)鍵字,如_0兇8_、dim3等的文字高亮,需按如下步驟設(shè)置:將c:programdatanvidiacorporati oncudasamplesv5.0docsyntax_highlightingvisual_studio_8 目 錄下的 usertype.dat 文件復(fù)制到 c:program filesmicrosoft visual studiol0.0common7ide 目錄下(對 x64 位 win7 系統(tǒng) 為 x:program files(x86)microsoft

18、 visual studio 10.0common7ide)o 重啟 visual studio 2010 后打開.cu文件,cuda的關(guān)鍵字應(yīng)該變成藍(lán)色了。8、cuda函數(shù)高亮,及cuda函數(shù)輸入代碼提示實(shí)現(xiàn)這個(gè)功能需要使用visual assist x,如果沒有安裝支持visual studio 2010的visual assist x,這部分功能無法實(shí)現(xiàn)。這里只是為使編寫代碼更加方便,對cuda程序的開發(fā)無實(shí)質(zhì)性 障礙。如果已經(jīng)安裝visual assist x,可以通過以下兩步實(shí)現(xiàn)需要的功能。1)使visual assist x支持cuda函數(shù)高亮和代碼完成在 visual studi

19、o 2010 的菜單里依次選擇:"vassistx|visual assist x options | projects | c/c+di recto riesw,在該界面的"platform"下拉框屮選擇 custom,在"show directories for,z下拉框中選擇0ther include files,然后在下血的輸入框里,新建、添加如下 路徑,如圖:c:program filesnvidia gpu computing toolkitcudav5.0includec:programdatanvidia corporationcuda

20、samplesv5.0commonincquick configg) advancedr projectsc/c+ directories i file handling:performancekstartupj system infoaboutc/c+ directoriesv/hole tomato softwarefhtfom:show directories fotcustomother include files仔x個(gè)*電確定 恥肖 應(yīng)刖)使visual assist x實(shí)現(xiàn).cu文件高亮和代碼完成功能,需要編輯注冊表。在修改注冊表時(shí), 為避免帶來不必要的錯(cuò)誤請先關(guān)閉visual s

21、tudio 2010o使用win+r組合鍵打開“運(yùn)行窗口, 鍵入入regedit命令(register edit的縮寫)打開注冊表,找到如下位置: hkey_current_usersoftwarewholetomatovisual assist x'vanetlo。在右邊找到 extsource 項(xiàng)目,鼠標(biāo)右鍵選修改,在原有文字后添加如下文字:.cu;.cuh;確定后關(guān)閉注冊表。重新打visual studio 2010, visual assist x便開始支持.cu及.cuh文件的語法高亮及代碼完成。此 時(shí).cu文件的cuda函數(shù)是高亮的,使用函數(shù)名符號就會(huì)自動(dòng)提示函數(shù)全稱,參數(shù)

22、類型等信 息。修改注冊表吋,請把vs關(guān)閉,否則修改不成功。9、其余的重要配置:在"additional libraries directories"下添加"$(cuda_path_v5_0)lib$(platform);(下圖只是示 意,其中的路徑按照自己安裝z后的來設(shè)置,也可以直接定位到文件夾的絕對路徑)在''additional dependencies7/中添加"cudart.lib;"10、經(jīng)過上而的安裝,開發(fā)程序應(yīng)該沒問題了,但會(huì)發(fā)現(xiàn)有如下的問題:(1) .vs2010顯示.cu文件時(shí),有很多cuda函數(shù)下有波浪線(2

23、) .在cu文件里使用vs2010 wgoto definition"功能查無法找到cuda函數(shù)的定義。 這兩個(gè)問題的原因是vs2010不認(rèn)識這些函數(shù),沒有指定它們在那個(gè)頭文件里包含的。解決 方法其實(shí)是一樣的,把cuda tookit和cuda sdk的頭文件路徑加到vs2010的vc+fi錄里 面°解決方法如下:在 vc+目錄的 include directories 中,添力1 c:program filesnvidia gpu computing toolkitcudav5.0include如下圖所示:configuration: n/a platform:n/a c

24、onfiguration manager.j common propertiesgeneraluser macrosvc* directories> cuda c/c+> linker> cuda linker|> manifest tool> resources> midl> xml document generator> browse informationt> build eventst> custom build step> managed resources> custom build tooll> xml

25、 data generatertool> code analysisexecutable directories include directories reference directorieslibrary directories source directories exclude directories$(vcinstalldir)bin;s(windowssdkdir)binnetfx4.0 tools;s0£:progani files'nvidia gpu comp噢 tooodtcudas(vanstdlldir)atlmfclib;s(vcinshll

26、dir)libd:program files %28x86%29vtk5.10.1binbindebug; $(vcinstalldir)atlmfcsrcmfc;s(vcinstalldir)atlmfcsrcmfc s(vcinstalldir)include;s(vcin5talldir)atlmfcinclude;s(windcexecutable directoriespath to use when searching for executable files while building a vc+* project. corresponds to environment var

27、iable path.ok cancel apply到此,所有的配置都已經(jīng)完成了。o(c_g)o11、創(chuàng)建工程在visual studio 2010菜單選擇/zfile| new| project (文件|新建|工程)”,在打開的新建項(xiàng)目窗 口的"已安裝的模板"一欄中選擇"nvidia|cuda,類型選擇為"cuda5.0 runtime",見下圖。在"名稱中輸入工程名后,點(diǎn)擊確定。對對系統(tǒng)提供的kernel.cu示例進(jìn)行編譯運(yùn)行,運(yùn)行 結(jié)果如下圖。將kernel.cu中的main函數(shù)重命名后,添加新的.cu文件,寫入如下代碼: cpp view plaincopyprint?#include< stdio.h>#inelude "cuda_runtime.h”#inelude "devicejaunch_parameters.h”bool initcuda()int count;cudagetdevicecount(&co unt);if(count = 0)fprintffstderr, "there is no device.nj; return false;int i;for(i = 0; i < count; i+)cudadeviceprop pro

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論