技術

GeForce GTX 460 と GTX 260 の CUDA 性能比較

もうすぐ誕生日ということで(泣、GTX 460を買っていただきましたので(喜、今まで使ってたGTX 260との性能比較をします。
単に3D描画のベンチとっても他で散々やられてるしつまらないので(本当はちゃんとベンチをとる堪え性がないだけw)、NVIDIAのサイトからCUDA Toolkitとサンプルコードをダウンロードして実行結果をてきとうに見ていきます。

使用した環境は以下のとおり。

  • CPU: Intel Core 2 Duo E8400
  • マザーボード: Gigabyte Technology Co., Ltd. GA-E7AUM-DS2H (NVIDIA GeForce 9400, BIOS F4)
  • メインメモリ: PC2-6400 2GB x 2
  • HDD: 型番失念(IBMの1Uサーバーから抜いた80GBの3.5インチSATAドライブ)x 2 によるソフトウェアRAID 0
  • OS: Windows 7 Ultimate 64bit
  • グラフィックスドライバ: GeForce Driver 258.96
  • CUDA Toolkit: バージョン3.1
  • GTX 260: Galaxy GF PGTX260+/896D3
  • GTX 460: ASUS ENGTX460 DirectCU/2DI/1GD5

ベースが古いですねぇ(汗 一応Clarkdale Xeon + H57のマシンもあるのですが面倒なので放置中。

Device Query

GTX 260

Device 0: "GeForce GTX 260"
  CUDA Driver Version:                           3.10
  CUDA Runtime Version:                          3.10
  CUDA Capability Major revision number:         1
  CUDA Capability Minor revision number:         3
  Total amount of global memory:                 922091520 bytes
  Number of multiprocessors:                     27
  Number of cores:                               216
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       16384 bytes
  Total number of registers available per block: 16384
  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
  Clock rate:                                    1.24 GHz
  Concurrent copy and execution:                 Yes
  Run time limit on kernels:                     Yes
  Integrated:                                    No
  Support host page-locked memory mapping:       Yes
  Compute mode:                                  Default (multiple host threads
can use this device simultaneously)
  Concurrent kernel execution:                   No
  Device has ECC support enabled:                No

GTX 460

Device 0: "GeForce GTX 460"
  CUDA Driver Version:                           3.10
  CUDA Runtime Version:                          3.10
  CUDA Capability Major revision number:         2
  CUDA Capability Minor revision number:         1
  Total amount of global memory:                 1041694720 bytes
  Number of multiprocessors:                     7
  Number of cores:                               224
  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 1
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Clock rate:                                    0.81 GHz
  Concurrent copy and execution:                 Yes
  Run time limit on kernels:                     Yes
  Integrated:                                    No
  Support host page-locked memory mapping:       Yes
  Compute mode:                                  Default (multiple host threads
can use this device simultaneously)
  Concurrent kernel execution:                   Yes
  Device has ECC support enabled:                No

コメント
shared memory や registersの増加を見る限り性能が上がってそうです。
dimension of a blockも増加しててすばらしい。ただし512 x 512 x 64以下で決め打ちで書かれた既存のプログラムは実行効率が悪くなるかも。
コア数の224というのは336の間違いだと思うんですが、この224という数字GPU-Z 0.4.4でも出てくるんですよね。
あとClock rateの0.81 GHzというのも気になりますが、負荷をかけるとちゃんと1.35GHzまで上がるようです。

Bandwidth Test

GTX 260

 Host to Device Bandwidth, 1 Device(s), Paged memory
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     1892.9

 Device to Host Bandwidth, 1 Device(s), Paged memory
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     1647.0

 Device to Device Bandwidth, 1 Device(s)
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     91015.4

GTX 460

 Host to Device Bandwidth, 1 Device(s), Paged memory
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     1826.8

 Device to Host Bandwidth, 1 Device(s), Paged memory
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     1785.1

 Device to Device Bandwidth, 1 Device(s)
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     59815.6

コメント
GTX 460は260に比べてバス幅は減ってますがメモリクロックがそれ以上に上がったため、単純計算では帯域幅は微妙に増えているはずですが、Device to Deviceがやたらと遅いですね。なんだろうこれは。

Simple Multi Copy and Conpute

GTX 260

Measured timings (throughput):
 Memcpy host to device  : 3.138688 ms (5.345296 GB/s)
 Memcpy device to host  : 3.127328 ms (5.364713 GB/s)
 Kernel                 : 1.700704 ms (98.648655 GB/s)

Theoretical limits for overlaps (* capability of this device):
          c <  1.0      : 7.966720 ms (No overlap, fully serial)
 * 1.1 <= c <  2.0      : 6.266016 ms (Compute overlaps with one memcopy)
          c >= 2.0      : 3.138688 ms (Compute overlaps with two memcopies)

Average measured timings over 10 repetitions:
 Avg. time when execution fully serialized      : 8.540992 ms
 Avg. time when overlapped using 4 streams      : 6.622292 ms
 Avg. latency hidden (serialized - overlapped)  : 1.918700 ms

Measured throughput:
 Fully serialized execution             : 3.928634 GB/s
 Overlapped using 4 streams             : 5.066891 GB/s

GTX 460

Measured timings (throughput):
 Memcpy host to device  : 3.040512 ms (5.517892 GB/s)
 Memcpy device to host  : 2.953472 ms (5.680506 GB/s)
 Kernel                 : 0.894176 ms (187.627669 GB/s)

Theoretical limits for overlaps (* capability of this device):
          c <  1.0      : 6.888160 ms (No overlap, fully serial)
 * 1.1 <= c <  2.0      : 5.993984 ms (Compute overlaps with one memcopy)
          c >= 2.0      : 3.040512 ms (Compute overlaps with two memcopies)

Average measured timings over 10 repetitions:
 Avg. time when execution fully serialized      : 6.694787 ms
 Avg. time when overlapped using 4 streams      : 5.950045 ms
 Avg. latency hidden (serialized - overlapped)  : 0.744742 ms

Measured throughput:
 Fully serialized execution             : 5.012024 GB/s
 Overlapped using 4 streams             : 5.639358 GB/s

コメント
こちらはBandwidth Testと違ってちゃんと帯域幅の机上計算値に近い差が出てるようです。

Pitch Linear Texture

GTX 260

Bandwidth (GB/s) for pitch linear: 6.35e+001; for array: 6.42e+001

Texture fetch rate (Mpix/s) for pitch linear: 7.94e+003; for array: 8.02e+003

GTX 460

Bandwidth (GB/s) for pitch linear: 2.48e+001; for array: 2.48e+001

Texture fetch rate (Mpix/s) for pitch linear: 3.10e+003; for array: 3.10e+003

コメント
GTX 460は260よりテクスチャユニット数が少ないためこれだけの差が出てしまったんでしょうか。

Simple Texture

GTX 260

Loaded 'lena_bw.pgm', 512 x 512 pixels
Processing time: 0.183976 (ms)
1424.88 Mpixels/sec

GTX 460

Loaded 'lena_bw.pgm', 512 x 512 pixels
Processing time: 0.300369 (ms)
872.74 Mpixels/sec

コメント
うん。やっぱテクスチャ系は遅いっぽいw

Aligned Types

GTX 260

CUDA device [GeForce GTX 260] has 27 Multi-Processors
SM scaling value = 1.00
> Memory Size = 49999872
Allocating memory...
Generating host input data array...
Uploading input data to GPU memory...
Testing misaligned types...
uint8...
Avg. time: 4.047190 ms / Copy throughput: 11.505764 GB/s.
        TEST OK
uint16...
Avg. time: 2.135780 ms / Copy throughput: 21.802813 GB/s.
        TEST OK
RGBA8_misaligned...
Avg. time: 5.493528 ms / Copy throughput: 8.476522 GB/s.
        TEST OK
LA32_misaligned...
Avg. time: 2.169678 ms / Copy throughput: 21.462173 GB/s.
        TEST OK
RGB32_misaligned...
Avg. time: 3.312490 ms / Copy throughput: 14.057707 GB/s.
        TEST OK
RGBA32_misaligned...
Avg. time: 4.400230 ms / Copy throughput: 10.582630 GB/s.
        TEST OK
Testing aligned types...
RGBA8...
Avg. time: 1.295567 ms / Copy throughput: 35.942574 GB/s.
        TEST OK
I32...
Avg. time: 1.266223 ms / Copy throughput: 36.775511 GB/s.
        TEST OK
LA32...
Avg. time: 1.096871 ms / Copy throughput: 42.453501 GB/s.
        TEST OK
RGB32...
Avg. time: 1.322788 ms / Copy throughput: 35.202927 GB/s.
        TEST OK
RGBA32...
Avg. time: 1.295364 ms / Copy throughput: 35.948197 GB/s.
        TEST OK
RGBA32_2...
Avg. time: 2.611731 ms / Copy throughput: 17.829558 GB/s.
        TEST OK

GTX 460

CUDA device [GeForce GTX 460] has 7 Multi-Processors
SM scaling value = 3.43
> Memory Size = 14583296
Allocating memory...
Generating host input data array...
Uploading input data to GPU memory...
Testing misaligned types...
uint8...
Avg. time: 0.907252 ms / Copy throughput: 14.970209 GB/s.
        TEST OK
uint16...
Avg. time: 0.512793 ms / Copy throughput: 26.485826 GB/s.
        TEST OK
RGBA8_misaligned...
Avg. time: 0.612984 ms / Copy throughput: 22.156784 GB/s.
        TEST OK
LA32_misaligned...
Avg. time: 0.376848 ms / Copy throughput: 36.040365 GB/s.
        TEST OK
RGB32_misaligned...
Avg. time: 0.489722 ms / Copy throughput: 27.733607 GB/s.
        TEST OK
RGBA32_misaligned...
Avg. time: 0.654871 ms / Copy throughput: 20.739572 GB/s.
        TEST OK
Testing aligned types...
RGBA8...
Avg. time: 0.364849 ms / Copy throughput: 37.225730 GB/s.
        TEST OK
I32...
Avg. time: 0.348742 ms / Copy throughput: 38.944976 GB/s.
        TEST OK
LA32...
Avg. time: 0.315452 ms / Copy throughput: 43.054914 GB/s.
        TEST OK
RGB32...
Avg. time: 0.318769 ms / Copy throughput: 42.606860 GB/s.
        TEST OK
RGBA32...
Avg. time: 0.319548 ms / Copy throughput: 42.503039 GB/s.
        TEST OK
RGBA32_2...
Avg. time: 0.518223 ms / Copy throughput: 26.208342 GB/s.
        TEST OK

コメント
このテストでは確実に460のほうが速いようです。

Post-Process In OpenGL

GTX 260

radius=16
CUDA GL Post Processing (512 x 512): 28.7 fps

GTX 460

radius=16
CUDA GL Post Processing (512 x 512): 20.1 fps

コメント
くるくる回るティーポットにポストプロセスでぼかしを入れるヤツですね。GTX 260が速いという結果に(汗

Fluids (Direct3D Version)

GTX 260

1404.2fps〜1442.9fps

GTX 460

1441.7fps〜1535.0fps

コメント
緑の粒子がうごめくヤツですね。こちらはGTX 460の勝利。

MersenneTwister

GTX 260

Initializing data for 24000000 samples...
Loading CPU and GPU twisters configurations...
Generating random numbers on GPU...

MersenneTwister, Throughput = 1.6773 GNumbers/s, Time = 0.01431 s, Size = 240025
60 Numbers, NumDevsUsed = 1, Workgroup = 128

GTX 460

Initializing data for 24000000 samples...
Loading CPU and GPU twisters configurations...
Generating random numbers on GPU...

MersenneTwister, Throughput = 2.2123 GNumbers/s, Time = 0.01085 s, Size = 240025
60 Numbers, NumDevsUsed = 1, Workgroup = 128

コメント
こちらはGTX 460が速いですね。

Mandelbrot

GTX 260

animate colors on
Hardware Single Precision 60fps前後
Emulated Double-Single Precision 32fps前後
Hardware Double Precision 56fps前後

GTX 460

animate colors on
Hardware Single Precision 68fps前後
Emulated Double-Single Precision 26fps前後
Hardware Double Precision 45fps前後

コメント
Hardware Single Precisionで勝ってるのにHardware Double Precisionで負けるのはGTX 460(GF104)の設計上、倍精度演算のピーク性能が単精度の1/12に抑えられてるからでしょうか。

まとめ

GTX 460は260に比べてテクスチャユニットが少ないせいか、テクスチャ系の処理が遅いようです。
ただしそれ以外の点では確実に性能UPし汎用計算向きになってるようです。
しかしそうは言っても元々思い切って汎用計算に振ったGF100からゲーム向きにバランスをとりなおしたのがGF104なので、GPUコンピューティング命な人はGTX 480を、財布が許せばTeslaを買ったほうがよろしいかと。

ここまで書いて思ったんですが、GTX 460(GF104)はSMあたりのCUDA Core数が従来の32個から48個へ増加してる(構成が変わってる)ので、コンパイルしなおして最適化するともっと早くなるのかもしれません。

コメントを残す

メールアドレスが公開されることはありません。



※画像をクリックして別の画像を表示

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください