ロゴ メインコンテンツへ
RSSフィード
「開発記録」に関連する記事一覧

CUDA ディスプレイ機能・計算機能を分けるためにGPUを2枚差し

2011/07/12
(この記事の文字数: 3454)
CUDAでの計算機用にGeforce GTX 560 Tiを購入しました。価格はドスパラで19990円でした。
CUDAで使うということだけ考えれば値段の割に性能もそこそこでコストパフォーマンスが一番高いと思ってこれにしました。


今回購入したGeforce GTX 560 Tiはあくまで計算機用なので、ディスプレイ用は今まで通りQuadro FX 580を使います。つまり、グラボの2枚差しです。
ただでさえごちゃごちゃしていたPCケースの中身がさらに密度が上がって熱量が心配です。


PCを立ち上げてCUDA SDKの中にあるdeviceQuery.exeを実行してみるとちゃんと2枚のGPUがCUDA Deviceとして認識されていることがわかります。

[deviceQuery] starting...
deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)
Found 2 CUDA Capable device(s)

Device 0: "GeForce GTX 560 Ti"
  CUDA Driver Version / Runtime Version          4.0 / 4.0
  CUDA Capability Major/Minor version number:    2.1
  Total amount of global memory:                 962 MBytes (1008402432 bytes)
  ( 8) Multiprocessors x (48) CUDA Cores/MP:     384 CUDA Cores
  GPU Clock Speed:                               1.64 GHz
  Memory Clock rate:                             2004.00 Mhz
  Memory Bus Width:                              256-bit
  L2 Cache Size:                                 524288 bytes
  Max Texture Dimension Size (x,y,z)             1D=(65536), 2D=(65536,65535), 3D=(2048,2048,2048)
  Max Layered Texture Size (dim) x layers        1D=(16384) x 2048, 2D=(16384,16384) x 2048
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                     32
  Maximum number of threads per block:           1024
  Maximum sizes of each dimension of a block:    1024 x 1024 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 65535
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and execution:                 Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Concurrent kernel execution:                   Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support enabled:                No
  Device is using TCC driver mode:               No
  Device supports Unified Addressing (UVA):      No
  Device PCI Bus ID / PCI location ID:           4 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
Device 1: "Quadro FX 580"
  CUDA Driver Version / Runtime Version          4.0 / 4.0
  CUDA Capability Major/Minor version number:    1.1
  Total amount of global memory:                 461 MBytes (483000320 bytes)
  ( 4) Multiprocessors x ( 8) CUDA Cores/MP:     32 CUDA Cores
  GPU Clock Speed:                               1.13 GHz
  Memory Clock rate:                             800.00 Mhz
  Memory Bus Width:                              128-bit
  Max Texture Dimension Size (x,y,z)             1D=(8192), 2D=(65536,32768), 3D=(2048,2048,2048)
  Max Layered Texture Size (dim) x layers        1D=(8192) x 512, 2D=(8192,8192) x 512
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       16384 bytes
  Total number of registers available per block: 8192
  Warp size:                                     32
  Maximum number of threads per block:           512
  Maximum sizes of each dimension of a block:    512 x 512 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 1
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             256 bytes
  Concurrent copy and execution:                 Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Concurrent kernel execution:                   No
  Alignment requirement for Surfaces:            Yes
  Device has ECC support enabled:                No
  Device is using TCC driver mode:               No
  Device supports Unified Addressing (UVA):      No
  Device PCI Bus ID / PCI location ID:           3 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 4.0, CUDA Runtime Version = 4.0, NumDevs = 2, Device = GeForce GTX 560 Ti, Device = Quadro FX 580
[deviceQuery] test results...
PASSED

 


2枚のGPUの主な性能の比較表です。

  Quadro FX 580 Geforce GTX 560 Ti
CUDAプロセッサコア 32基 384基
メモリ 512  MB GDDR3 1024 MB GDDR5
メモリバンド幅(GB/sec) 25.6  128
メモリインターフェース幅 128-bit  256-bit
最大消費電力(W) 40 170

最大使用電力はQuadro FX 580が40WでGeforce GTX 560 Tiが170 Wなので合わせて210Wとなります。

もともと使っていたQuadro FX 580の消費電力が低かったおかげで大きいGPU一枚挿したのと同じくらいの消費電力で済みました。

CUDAでのデバイスの切り替えは次のようにcudaSetDevice(デバイス番号)を使えば行えるようです。

int dev=0;
CUDA_SAFE_CALL(cudaSetDevice(dev)); 
 


せっかくなのでさっそくCUDAで1000x1000の2次元拡散方程式を解かせてみました。
以下が結果です。




Quadro FX 580が26秒に対してGeforce GTX 560Tiが19秒。

しかもQuadro FX 580の方はディスプレイに表示する処理もしているのでそもそも不利な条件です。

消費電力がかなり増大した割にそんなに大して高速にはならないという結果で少し残念ですが、プログラムの書き方で処理時間もいろいろと変わってくると思うので、これからこの環境でCUDAの開発を行っていこうと思います。

  このエントリーをはてなブックマークに追加  

<<「開発記録」の記事一覧に戻る

コメント(0 件)



コンテンツロード: 0.009 sec
Copyright(C)2006-2024 puarts All Rights Reserved