如題,是要敲代碼還是去通過計算機的一些功能去查看呢,百度也沒有結果,門外漢有點懵…


你問的應該是英偉達的GPU的「計算能力」。這個在硬體層面上和GPU的構架有關,在軟體層面上CUDA SDK不同版本支持不同的計算能力。我也不知道英偉達為什麼要取這個名字,不過仔細想一想,好像沒有更好的名字可以取了。

更詳細的介紹可以參考維基百科。

https://zh.wikipedia.org/wiki/CUDA?

zh.wikipedia.org

從維基百科裡直接截的圖。

不同計算能力里每個SM能容納的線程數和線程塊數可能有所不同,另外,不同計算能力之間有一些功能上的差異。

懶,直接截圖了。

對於你自己的顯卡,GPU-Z可以直接查看,或者上英偉達的網站可以查到。事實上,如果你不是直接寫CUDA的程序員,並不需要關注顯卡的計算能力。


謝妖!你是程序猿嗎?先聲明,俺也不是專業人士,算是拋磚引玉,錯了最好,下面的專業人士幫俺糾錯,THX。

但是你的問題確實太……白了!不知道是不是問的浮點?

FLOPS - Wikipedia?

en.wikipedia.org

GPU的浮點計算理論峰值能力測試跟CPU的計算方式基本一樣,

理論峰值 = GPU晶元數量*GPU Boost主頻*核心數量*單個時鐘周期內能處理的浮點計算次數,

只不過在GPU里單精度和雙精度的浮點計算能力需要分開計算,以最新的Tesla P100為例:

雙精度理論峰值 = FP64 Cores * GPU Boost Clock * 2 = 1792 *1.48GHz*2 = 5.3 TFlops

單精度理論峰值 = FP32 cores * GPU Boost Clock * 2 = 3584 * 1.58GHz * 2 = 10.6 TFlops

Tesla P100還支持在一個FP32里同時進行2次FP16的半精度浮點計算,所以對於半精度的理論峰值更是單精度浮點數計算能力的兩倍也就是達到21.2TFlops 。

1.面向遊戲玩家的顯卡,對雙精度計算能力基本沒有需求。

2.圖形工作站的專業卡不一樣

3.面向科學計算或機器學習的浮點性能最強

半精度、單精度、雙精度這些概念是在IEEE 754標準里定義的,浮點計數是利用浮動小數點的方式使用不同長度的二進位來表示一個數字,與之對應的是定點數。同樣的長度下浮點數能表達的數字範圍相比定點數更大,但浮點數並不能精確表達所有實數,而只能採用更加接近的不同精度來表達。單精度的浮點數中採用4個位元組也就是32位二進位來表達一個數字,雙精度浮點數採用8個位元組也就是64bits來表達,當然半精度浮點數也就是採用16bits了。因為採用不同位數的浮點數的表達精度不一樣,所以造成的計算誤差也不一樣,對於需要處理的數字範圍大而且需要精確計算的科學計算來說,就要求採用雙精度浮點數,而對於常見的多媒體和圖形處理計算,32位的單精度浮點計算已經足夠了,對於要求精度更低的機器學習等一些應用來說,半精度16位浮點數就可以甚至8位浮點數就已經夠用了。

雖然Linpack測試里只關心雙精度的浮點計算能力,但在其他領域,有時候反而會更加關注單精度甚至是半精度的浮點計算能力。

舉個例子——

Haswell核心在配合含FMA3指令下可以提升多高的浮點性能。以下是Intel自Core

2到Haswell架構,FP性能的比較表,大家可以見到從Core 2/Nehalem架構到Sandy Bridge/Ivy Bridge架構,再到Haswell架構,每代均有2X FP性能的提升。假設是一顆8核心Haswell處理器,在4GHz工作時脈下會有 4000MHz x 8 cores x 32 SP FLOPs/cycle = 1.024 TFLOPS的Single Precision FP性能,即使是Double Precision FP也有4000MHz x 8 cores x 32 SP FLOPs/cycle = 512GFLOPS,十分可觀。若果與Radeon HD 7970 GHz Edition的4.096 TFLOPS,相比的話,CPU僅及GPU的1/4,但算上Double Precision FP的話,Radeon HD 7970 GHz Edition只有1TFLOPS,CPU與GPU性能差距縮小至1/2。Double Precision

FP因為提供更高的精度關係,目前重要性正不斷提供,因為架構的不同,CPU的Double Precision FP一般是Single

Precision FP的一半,而GPU只有高階型號才能夠提供Single Precision FP的1/3或1/4性能,主流型號僅有1/16性能

如果你需要具體數據,有一些以前的

Video Card Database - Specifications, Pictures and Comparisons - GPUReview.com?

www.gpureview.com圖標

最新的GPU,你得自己爬文每一個發布會了

程序猿需要這個??以CUDA為例——

性能參數含義(struct cudaDeviceProp)

struct cudaDeviceProp {

char name[256]; //器件的名字size_t totalGlobalMem; //Global Memory 的byte大小

size_t sharedMemPerBlock; //線程塊可以使用的共用記憶體的最大值。byte為單位,多處理器上的所有線程塊可以同時共用這些記憶體

int regsPerBlock; //線程塊可以使用的32位寄存器的最大值,多處理器上的所有線程快可以同時實用這些寄存器int warpSize; //按線程計算的wrap塊大小size_t memPitch; //做內存複製是可以容許的最大間距,允許通過cudaMallocPitch()為包含記憶體區域的記憶提複製函數的最大間距,以byte為單位。int maxThreadsPerBlock; //每個塊中最大線程數int maxThreadsDim[3]; //塊各維度的最大值int maxGridSize[3]; //Grid各維度的最大值size_t totalConstMem; //常量內存的大小int major; //計算能力的主代號int minor; //計算能力的次要代號

int clockRate; //時鐘頻率

size_t textureAlignment; //紋理的對齊要求int deviceOverlap; //器件是否能同時執行cudaMemcpy()和器件的核心代碼int multiProcessorCount; //設備上多處理器的數量int kernelExecTimeoutEnabled; //是否可以給核心代碼的執行時間設置限制int integrated; //這個GPU是否是集成的int canMapHostMemory; //這個GPU是否可以講主CPU上的存儲映射到GPU器件的地址空間int computeMode; //計算模式int maxTexture1D; //一維Textures的最大維度 int maxTexture2D[2]; //二維Textures的最大維度

int maxTexture3D[3]; //三維Textures的最大維度

int maxTexture2DArray[3]; //二維Textures陣列的最大維度int concurrentKernels; //GPU是否支持同時執行多個核心程序}

English Version:

struct __device_builtin__ cudaDeviceProp

{

char name[256]; /**&< ASCII string identifying device */

size_t totalGlobalMem; /**&< Global memory available on device in bytes */

size_t sharedMemPerBlock; /**&< Shared memory available per block in bytes */

int regsPerBlock; /**&< 32-bit registers available per block */

int warpSize; /**&< Warp size in threads */

size_t memPitch; /**&< Maximum pitch in bytes allowed by memory copies */

int maxThreadsPerBlock; /**&< Maximum number of threads per block */

int maxThreadsDim[3]; /**&< Maximum size of each dimension of a block */

int maxGridSize[3]; /**&< Maximum size of each dimension of a grid */

int clockRate; /**&< Clock frequency in kilohertz */

size_t totalConstMem; /**&< Constant memory available on device in bytes */

int major; /**&< Major compute capability */

int minor; /**&< Minor compute capability */

size_t textureAlignment; /**&< Alignment requirement for textures */

size_t texturePitchAlignment; /**&< Pitch alignment requirement for texture references bound to pitched memory */

int deviceOverlap; /**&< Device can concurrently

copy memory and execute a kernel. Deprecated. Use instead asyncEngineCount. */

int multiProcessorCount; /**&< Number of multiprocessors on device */

int kernelExecTimeoutEnabled; /**&< Specified whether there is a run time limit on kernels */

int integrated; /**&< Device is integrated as opposed to discrete */

int canMapHostMemory; /**&< Device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer */

int computeMode; /**&< Compute mode (See ::cudaComputeMode) */

int maxTexture1D; /**&< Maximum 1D texture size */

int maxTexture1DMipmap; /**&< Maximum 1D mipmapped texture size */

int maxTexture1DLinear; /**&< Maximum size for 1D textures bound to linear memory */

int maxTexture2D[2]; /**&< Maximum 2D texture dimensions */

int maxTexture2DMipmap[2]; /**&< Maximum 2D mipmapped texture dimensions */

int maxTexture2DLinear[3]; /**&< Maximum dimensions (width,

height, pitch) for 2D textures bound to pitched memory */

int

maxTexture2DGather[2]; /**&< Maximum 2D texture dimensions if texture gather operations have to be performed */

int maxTexture3D[3]; /**&< Maximum 3D texture dimensions */

int maxTexture3DAlt[3]; /**&< Maximum alternate 3D texture dimensions */

int maxTextureCubemap; /**&< Maximum Cubemap texture dimensions */

int maxTexture1DLayered[2]; /**&< Maximum 1D layered texture dimensions */

int maxTexture2DLayered[3]; /**&< Maximum 2D layered texture dimensions */

int maxTextureCubemapLayered[2];/**&< Maximum Cubemap layered texture dimensions */

int maxSurface1D; /**&< Maximum 1D surface size */

int maxSurface2D[2]; /**&< Maximum 2D surface dimensions */

int maxSurface3D[3]; /**&< Maximum 3D surface dimensions */

int maxSurface1DLayered[2]; /**&< Maximum 1D layered surface dimensions */

int maxSurface2DLayered[3]; /**&< Maximum 2D layered surface dimensions */

int maxSurfaceCubemap; /**&< Maximum Cubemap surface dimensions */

int maxSurfaceCubemapLayered[2];/**&< Maximum Cubemap layered surface dimensions */

size_t surfaceAlignment; /**&< Alignment requirements for surfaces */

int concurrentKernels; /**&< Device can possibly execute multiple kernels concurrently */

int ECCEnabled; /**&< Device has ECC support enabled */

int pciBusID; /**&< PCI bus ID of the device */

int pciDeviceID; /**&< PCI device ID of the device */

int pciDomainID; /**&< PCI domain ID of the device */

int tccDriver; /**&< 1 if device is a Tesla device using TCC driver, 0 otherwise */

int asyncEngineCount; /**&< Number of asynchronous engines */

int unifiedAddressing; /**&< Device shares a unified address space with the host */

int memoryClockRate; /**&< Peak memory clock frequency in kilohertz */

int memoryBusWidth; /**&< Global memory bus width in bits */

int l2CacheSize; /**&< Size of L2 cache in bytes */

int maxThreadsPerMultiProcessor;/**&< Maximum resident threads per multiprocessor */

int streamPrioritiesSupported; /**&< Device supports stream priorities */

int globalL1CacheSupported; /**&< Device supports caching globals in L1 */

int localL1CacheSupported; /**&< Device supports caching locals in L1 */

size_t sharedMemPerMultiprocessor; /**&< Shared memory available per multiprocessor in bytes */

int regsPerMultiprocessor; /**&< 32-bit registers available per multiprocessor */

int managedMemory; /**&< Device supports allocating managed memory on this system */

int isMultiGpuBoard; /**&< Device is on a multi-GPU board */

int multiGpuBoardGroupID; /**&< Unique identifier for a group of devices on the same multi-GPU board */

};

理論性能與實際上未必一回事。比如通用計算上,A卡理論性能高,但效率不如對手,最適合暴力破解;N卡理論性能少一些,但是運算效率高,最適合複雜些的運算

更新:最簡單的辦法,打開GPU-Z的測試,使其狀態跑滿,然後AIDA64—顯示設備—GPU——理論峰值。否則你得分是上個世紀


大家可以在智星雲租用,有很多GPU型號可選,可以根據自己的需求來選擇。


GPU Compute Capability
Tesla K80 3.7
Tesla K40 3.5
Tesla K20 3.5
Tesla C2075 2.0
Tesla C2050/C2070 2.0
Tesla M40 5.2
Tesla K80 3.7
Tesla K40 3.5
Tesla K20 3.5
Tesla K10 3.0
Tesla M20xx 2.0
Quadro M6000 24GB 5.2
Quadro M6000 5.2
Quadro K6000 3.5
Quadro M5000 5.2
Quadro K5200 3.5
Quadro K5000 3.0
Quadro M4000 5.2
Quadro K4200 3.0
Quadro K4000 3.0
Quadro M2000 5.2
Quadro K2200 5.0
Quadro K2000 3.0
Quadro K2000D 3.0
Quadro K1200 5.0
Quadro K620 5.0
Quadro K600 3.0
Quadro K420 3.0
Quadro 410 3.0
Quadro Plex 7000 2.0
Quadro K6000M 3.0
Quadro M5500M 5.0
Quadro K5200M 3.0
Quadro K5100M 3.0
Quadro M5000M 5.0
Quadro K500M 3.0
Quadro K4200M 3.0
Quadro K4100M 3.0
Quadro M4000M 5.0
Quadro K3100M 3.0
Quadro M3000M 5.0
Quadro K2200M 5.0
Quadro K2100M 3.0
Quadro M2000M 5.0
Quadro K1100M 3.0
Quadro M1000M 5.0
Quadro K620M 5.0
Quadro K610M 3.5
Quadro M600M 5.0
Quadro K510M 3.5
Quadro M500M 5.0
NVIDIA NVS 810 5.0
NVIDIA NVS 510 3.0
NVIDIA NVS 315 2.1
NVIDIA NVS 310 2.1
NVS 5400M 2.1
NVS 5200M 2.1
NVS 4200M 2.1
NVIDIA TITAN X 6.1
GeForce GTX 1080 6.1
GeForce GTX 1070 6.1
GeForce GTX 1060 6.1
GeForce GTX TITAN X 5.2
GeForce GTX TITAN Z 3.5
GeForce GTX TITAN Black 3.5
GeForce GTX TITAN 3.5
GeForce GTX 980 Ti 5.2
GeForce GTX 980 5.2
GeForce GTX 970 5.2
GeForce GTX 960 5.2
GeForce GTX 950 5.2
GeForce GTX 780 Ti 3.5
GeForce GTX 780 3.5
GeForce GTX 770 3.0
GeForce GTX 760 3.0
GeForce GTX 750 Ti 5.0
GeForce GTX 750 5.0
GeForce GTX 690 3.0
GeForce GTX 680 3.0
GeForce GTX 670 3.0
GeForce GTX 660 Ti 3.0
GeForce GTX 660 3.0
GeForce GTX 650 Ti BOOST 3.0
GeForce GTX 650 Ti 3.0
GeForce GTX 650 3.0
GeForce GTX 560 Ti 2.1
GeForce GTX 550 Ti 2.1
GeForce GTX 460 2.1
GeForce GTS 450 2.1
GeForce GTS 450* 2.1
GeForce GTX 590 2.0
GeForce GTX 580 2.0
GeForce GTX 570 2.0
GeForce GTX 480 2.0
GeForce GTX 470 2.0
GeForce GTX 465 2.0
GeForce GT 740 3.0
GeForce GT 730 3.5
GeForce GT 730 DDR3,128bit 2.1
GeForce GT 720 3.5
GeForce GT 705* 3.5
GeForce GT 640 (GDDR5) 3.5
GeForce GT 640 (GDDR3) 2.1
GeForce GT 630 2.1
GeForce GT 620 2.1
GeForce GT 610 2.1
GeForce GT 520 2.1
GeForce GT 440 2.1
GeForce GT 440* 2.1
GeForce GT 430 2.1
GeForce GT 430* 2.1
GeForce GTX 980 5.2
GeForce GTX 980M 5.2
GeForce GTX 970M 5.2
GeForce GTX 965M 5.2
GeForce GTX 960M 5.0
GeForce GTX 950M 5.0
GeForce 940M 5.0
GeForce 930M 5.0
GeForce 920M 3.5
GeForce 910M 5.2
GeForce GTX 880M 3.0
GeForce GTX 870M 3.0
GeForce GTX 860M 3.0/5.0(**)
GeForce GTX 850M 5.0
GeForce 840M 5.0
GeForce 830M 5.0
GeForce 820M 2.1
GeForce 800M 2.1
GeForce GTX 780M 3.0
GeForce GTX 770M 3.0
GeForce GTX 765M 3.0
GeForce GTX 760M 3.0
GeForce GTX 680MX 3.0
GeForce GTX 680M 3.0
GeForce GTX 675MX 3.0
GeForce GTX 675M 2.1
GeForce GTX 670MX 3.0
GeForce GTX 670M 2.1
GeForce GTX 660M 3.0
GeForce GT 750M 3.0
GeForce GT 650M 3.0
GeForce GT 745M 3.0
GeForce GT 645M 3.0
GeForce GT 740M 3.0
GeForce GT 730M 3.0
GeForce GT 640M 3.0
GeForce GT 640M LE 3.0
GeForce GT 735M 3.0
GeForce GT 635M 2.1
GeForce GT 730M 3.0
GeForce GT 630M 2.1
GeForce GT 625M 2.1
GeForce GT 720M 2.1
GeForce GT 620M 2.1
GeForce 710M 2.1
GeForce 705M 2.1
GeForce 610M 2.1
GeForce GTX 580M 2.1
GeForce GTX 570M 2.1
GeForce GTX 560M 2.1
GeForce GT 555M 2.1
GeForce GT 550M 2.1
GeForce GT 540M 2.1
GeForce GT 525M 2.1
GeForce GT 520MX 2.1
GeForce GT 520M 2.1
GeForce GTX 485M 2.1
GeForce GTX 470M 2.1
GeForce GTX 460M 2.1
GeForce GT 445M 2.1
GeForce GT 435M 2.1
GeForce GT 420M 2.1
GeForce GT 415M 2.1
GeForce GTX 480M 2.0
GeForce 710M 2.1
GeForce 410M 2.1
Tegra X1 5.3
Tegra K1 3.2
Jetson TK1 3.2

這個一般在配置階段會用到,一些cmake文件需要根據GPU的算力做修改。要是自己手裡的沒有GPU或者GPU性能不夠也可以在智星雲租用GPU,價格划算,現在還有微信小程序,可以分時租用。


如果里用nvidia的顯卡,有個簡單的跨平台工具cuda-z,可以直接查看。支持windows mac linux。


百度你的顯卡型號,會有評測,也可以使用GPU-Z,furmark之類專業軟體進行測試。


最簡單右鍵我的電腦屬性,看有個windows體驗指數,可以詳細看顯示的分數
推薦閱讀:
相关文章