Jump to content

OpenCL Benchmark - CPU vs GPU / DO NOT USE ANYMORE !


  • Please log in to reply
100 replies to this topic

#21
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,880 posts
  • Gender:Male
  • Location:Stuttgart / Germany

This program seems to multi-thread very well according to SL's CPU Usage monitor.

Thanks for that detail !
I think the 10.6 changes "in the deep" will exspecially use much Cores better than 10.5 - even without special
source coding changes. But recompiling source with newest Xcode & using 10.6 dev framework needed , i think.

Also, even if the app itself is really small (< 100 KB) is uses much RAM (up to 60 MB!) and also interacts much with it.
So also the Systembus Speed and RAM Speed may be computed (in the CPU time!).
So DDR3 tripple channel vs DDR3 dual channel (2 Modules same size) vs DDR2 vs RAM Latency timings vs RAM MHz ... will give different CPU time usage. GPU time should not be so much affcted by that (RAM/Systembus speed)

#22
ugokind

ugokind

    InsanelyMac Deity

  • Donators
  • 1,712 posts
  • Gender:Male
  • Location:10100
  • Interests:Apicoltura
    Mac
    Linux
    Homebrew
    Australia
    Spremermilcervello
...................OpenCL Bench V 0.1 by mitch.............
.......C2D 3GHz = 30 sec vs Nvidia 9600GT = 3.10 sec.......
....... .......
........My test code (simple adds) is cpu friedly..........
.more gpu friedly+complexer code (raytracing/video encod.).
....may give much more speed advantage - at least on C2Ds..
...........................................................
CL_DEVICE_NAME: Intel® Core™2 Duo CPU P7350 @ 2.00GHz
CL_DEVICE_VENDOR: Intel
Now computing - please be patient....
time used: 110.848793
Number of elements computed: 2097152
CL_DEVICE_NAME: GeForce 9600M GT
CL_DEVICE_VENDOR: NVIDIA
Now computing - please be patient....
time used: 19.561712
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:thumbsup_anim: Validate results test passed - GPU=CPU :P

#23
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,880 posts
  • Gender:Male
  • Location:Stuttgart / Germany
Thanks.
Would you please run again with V015 - shows also GPU Mhz and GPU Units(Cores).
( i removed the old, V010 dl link now. No speed code changes only new output formating + gpu mhz / units shown.
I would also recommand to run the tool twice and look if there are big differences. If yes, run an third time and make an overall of times. Close all other apps before running it. Expecially if you have less or equal 2 GB of RAM.

For mobile users:
check if it makes time differences if you change powersuppy / battery. Also if you set powersettings for speed / battery safing (Energy preferences). At least orig. Macbook / Pro will throttle CPU / GPU in different sitations (powersuppy = less speed i think, energy saving settings may change also gpu(cpu throttling)

For desktop users:
If you use voodoopower (speedstep) please comment that at your posting. Also geekbench & XBench results are a bit lower / vary more between runs when using voodoopower(speedstep).


#24
ugokind

ugokind

    InsanelyMac Deity

  • Donators
  • 1,712 posts
  • Gender:Male
  • Location:10100
  • Interests:Apicoltura
    Mac
    Linux
    Homebrew
    Australia
    Spremermilcervello
ok here you are

.................. OpenCL Bench V 0.15 by mitch ...........
...... C2D 3GHz = 30 sec vs Nvidia 9600GT = 3.10 sec ......
....... .......
........My test code (simple adds) is cpu friedly..........
.more gpu friedly+complexer code (raytracing/video encod.).
... may give much more speed advantage - at least on C2Ds .
...........................................................

....CL_DEVICE_NAME: Intel® Core™2 Duo CPU P7350 @ 2.00GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 2000 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 2
Now computing - please be patient....
time used: 116.803825
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 9600M GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1250 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 32
Now computing - please be patient....
time used: 19.378469
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:) Validate results test passed - GPU=CPU -_-

#25
Embio

Embio

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 976 posts
....CL_DEVICE_NAME: Intel® Core™2 Quad CPU Q6600 @ 2.40GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 3600 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 4
Now computing - please be patient....
time used: 15.900147
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 8800 GTS .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1300 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 96
Now computing - please be patient....
time used: 2.111204
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:( Validate results test passed - GPU=CPU :D


Yes that is a highly overclocked GTS - the fan is on 85% minimum :-)

#26
elitee

elitee

    InsanelyMac Protégé

  • Members
  • PipPip
  • 99 posts
....CL_DEVICE_NAME: Intel Core™2 Duo CPU E8400 @ 3.00GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 3000 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 2
Now computing - please be patient....
time used: 36.671032
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce GTX 260 .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1242 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 216
Now computing - please be patient....
time used: 1.314976
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:) Validate results test passed - GPU=CPU :)

#27
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 585 posts
It didn't work on my ATI HD4870 after try to compute GPU. can move only mouse & got to press a reset button.

Also, see http://netkas.org/?p=164

#28
RaZZe

RaZZe

    InsanelyMac Protégé

  • Members
  • PipPip
  • 68 posts
Posted Image

#29
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,880 posts
  • Gender:Male
  • Location:Stuttgart / Germany

It didn't work on my ATI HD4870 after try to compute GPU. can move only mouse & got to press a reset button.

Also, see http://netkas.org/?p=164


Have you used the lastest V020 - which added lost of error handling code ?
Please look / write down reported errors / error messages.

#30
music-anderson

music-anderson

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 1 posts
My test
*****



Last login: Wed Aug 26 16:57:16 on console
/Users/peterdavidanderson/Desktop/OpenCLBench_as_terminal_tool/OpenCL2_Bench_V020 ; exit;
noname:~ peterdavidanderson$ /Users/peterdavidanderson/Desktop/OpenCLBench_as_terminal_tool/OpenCL2_Bench_V020 ; exit;
...........................................................
.................. OpenCL Bench V 0.15 by mitch ...........
...... C2D 3GHz = 30 sec vs Nvidia 9600GT = 3.10 sec ......
....... .......
........My test code (simple adds) is cpu friedly..........
.more gpu friedly+complexer code (raytracing/video encod.).
... may give much more speed advantage - at least on C2Ds .
...........................................................

....CL_DEVICE_NAME: Intel® Xeon® CPU 5150 @ 2.66GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 2660 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 4
Now computing - please be patient....
time used: 16.817684
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 8800 GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1500 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 112
Now computing - please be patient....
time used: 2.608059
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:( Validate results test passed - GPU=CPU :)
logout

[Prozess beendet]

#31
nofearl

nofearl

    InsanelyMac Protégé

  • Members
  • PipPip
  • 71 posts
cpu + 2xgpu

...........................................................
.................. OpenCL Bench V 0.15 by mitch ...........
...... C2D 3GHz = 30 sec vs Nvidia 9600GT = 3.10 sec ......
....... .......
........My test code (simple adds) is cpu friedly..........
.more gpu friedly+complexer code (raytracing/video encod.).
... may give much more speed advantage - at least on C2Ds .
...........................................................

....CL_DEVICE_NAME: Intel® Core™2 Quad CPU @ 2.40GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 2400 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 4
Now computing - please be patient....
time used: 28.956915
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 9600 GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1750 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 64
Now computing - please be patient....
time used: 2.694709
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 9600 GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1750 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 64
Now computing - please be patient....
time used: 2.797374
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:hysterical: Validate results test passed - GPU=CPU ;)
logout

#32
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,880 posts
  • Gender:Male
  • Location:Stuttgart / Germany
THANKS !
Question: Do you have 2 indentical GPUs´?
Also (will not change the times) always use the lastest BUILD, ist V020.
Has much error handling code for ATI users (NVIDIAs seems to run without errors so far :) )

#33
cmf

cmf

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 145 posts
mbp/late 2008 result:
....CL_DEVICE_NAME: Intel(R) Core(TM)2 Duo CPU	 P8600  @ 2.40GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 2400 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 2
Now computing - please be patient....
time used: 56.190952
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 9600M GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1250 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 32
Now computing - please be patient....
time used: 10.169043
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 9600M GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1250 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 32
Now computing - please be patient....
time used: 10.120525
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:) Validate results test passed - GPU=CPU :)

seems to be a bug, you are testing the same gpu twice (or just printing out the info of the first gpu device twice?). the second gpu should be a 9400M.


This program seems to multi-thread very well according to SL's CPU Usage monitor.

Thanks for that detail !
I think the 10.6 changes "in the deep" will exspecially use much Cores better than 10.5 - even without special
source coding changes. But recompiling source with newest Xcode & using 10.6 dev framework needed , i think.

thats an opencl feature, or the purpose of opencl :) scale a small program/kernel well to many cores - be it cpu or gpu.

#34
morfy

morfy

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 890 posts
Upgrade from Open CL Bench V 020.

...........................................................
.................. OpenCL Bench V 0.15 by mitch ...........
...... C2D 3GHz = 30 sec vs Nvidia 9600GT = 3.10 sec ......
.......											 .......
........My test code (simple adds) is cpu friedly..........
.more gpu friedly+complexer code (raytracing/video encod.).
... may give much more speed advantage - at least on C2Ds .
...........................................................

....CL_DEVICE_NAME: Pentium(R) Dual-Core  CPU	  E5200  @ 2.50GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 3129 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 2
Now computing - please be patient....
time used: 28.777699
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 8800 GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1600 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 112
Now computing - please be patient....
time used: 2.618950
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:) Validate results test passed - GPU=CPU :)


#35
netkas

netkas

    InsanelyMac Legend

  • Developers
  • 616 posts
  • Gender:Male
./OpenCL2_Bench_V020
...........................................................
.................. OpenCL Bench V 0.15 by mitch ...........
...... C2D 3GHz = 30 sec vs Nvidia 9600GT = 3.10 sec ......
....... .......
........My test code (simple adds) is cpu friedly..........
.more gpu friedly+complexer code (raytracing/video encod.).
... may give much more speed advantage - at least on C2Ds .
...........................................................

....CL_DEVICE_NAME: Intel� Core„2 Quad CPU Q9450 @ 2.66GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 3072 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 4
Now computing - please be patient....
time used: 14.658403
Number of elements computed: 2097152

....CL_DEVICE_NAME: Radeon HD 4870 .....
CL_DEVICE_VENDOR: AMD
CL_DEVICE_MAX_CLOCK_FREQUENCY: 750 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 4
Now computing - please be patient....
///here gui freezes immedeatly
time used: 27.399342
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:) Validate results test passed - GPU=CPU :)


x2000.kexts dumps ** GPU Debug Info ** to dmesg

maybe its too much loops and so too much memory used by arrays, decreased loops number to 1000(edited source inside bin), now no crash.

#36
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,880 posts
  • Gender:Male
  • Location:Stuttgart / Germany

mbp/late 2008 result:

....CL_DEVICE_NAME: Intel(R) Core(TM)2 Duo CPU	 P8600  @ 2.40GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 2400 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 2
Now computing - please be patient....
time used: 56.190952
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 9600M GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1250 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 32
Now computing - please be patient....
time used: 10.169043
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 9600M GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1250 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 32
Now computing - please be patient....
time used: 10.120525
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:) Validate results test passed - GPU=CPU :)

seems to be a bug, you are testing the same gpu twice (or just printing out the info of the first gpu device twice?). the second gpu should be a 9400M.


Thanks.
I will fix that bug soon.
A workaround for that bug:
Please post result again after you disabled the 9600M GT ( so 9400M is the alone GPU).
The 10 sec results is for the 9600MGT - 9400M will run slower.

#37
tommix1968

tommix1968

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts
This is my result:
...........................................................
.................. OpenCL Bench V 0.15 by mitch ...........
...... C2D 3GHz = 30 sec vs Nvidia 9600GT = 3.10 sec ......
.......											 .......
........My test code (simple adds) is cpu friedly..........
.more gpu friedly+complexer code (raytracing/video encod.).
... may give much more speed advantage - at least on C2Ds .
...........................................................

....CL_DEVICE_NAME: Intel(R) Core(TM)2 Quad CPU	Q9550  @ 2.83GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 2836 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 4
Now computing - please be patient....
time used: 15.836717
Number of elements computed: 2097152

....CL_DEVICE_NAME: GeForce 9600 GT .....
CL_DEVICE_VENDOR: NVIDIA
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1625 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 64
Now computing - please be patient....
time used: 2.700367
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:) Validate results test passed - GPU=CPU :)


#38
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,880 posts
  • Gender:Male
  • Location:Stuttgart / Germany

./OpenCL2_Bench_V020
...........................................................
.................. OpenCL Bench V 0.15 by mitch ...........
...... C2D 3GHz = 30 sec vs Nvidia 9600GT = 3.10 sec ......
....... .......
........My test code (simple adds) is cpu friedly..........
.more gpu friedly+complexer code (raytracing/video encod.).
... may give much more speed advantage - at least on C2Ds .
...........................................................

....CL_DEVICE_NAME: Intel� Core�„�2 Quad CPU Q9450 @ 2.66GHz .....
CL_DEVICE_VENDOR: Intel
CL_DEVICE_MAX_CLOCK_FREQUENCY: 3072 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 4
Now computing - please be patient....
time used: 14.658403
Number of elements computed: 2097152

....CL_DEVICE_NAME: Radeon HD 4870 .....
CL_DEVICE_VENDOR: AMD
CL_DEVICE_MAX_CLOCK_FREQUENCY: 750 MHz
CL_DEVICE_MAX_COMPUTE_UNITS: 4
Now computing - please be patient....
///here gui freezes immedeatly
time used: 27.399342
Number of elements computed: 2097152
Now checking if results are valid - please be patient....
:D Validate results test passed - GPU=CPU :D


x2000.kexts dumps ** GPU Debug Info ** to dmesg

maybe its too much loops and so too much memory used by arrays, decreased loops number to 1000(edited source inside bin), now no crash.



Thanks, i also thougt about this memory problem.
Will compile an ATI_debug version soon and post it below other DL Link.
Sure, if i will decrease the loop down from 5000 to 1000, the time results of very fast GPUs like GTX 285 will also decrease from 0.8 down to 0,0xy :police:
I am working on an other solution, which does more complex work but not in such an huge loop.

#39
netkas

netkas

    InsanelyMac Legend

  • Developers
  • 616 posts
  • Gender:Male
smth like

for(i=0;i<5;i++)
for(loop....

should be enough to add just one line (and one for int i;)

#40
vidkidd

vidkidd

    InsanelyMac Protégé

  • Members
  • Pip
  • 2 posts
With Version: OpenCL2_Bench_V020

Application still hangs on 4870, MacPro 1,1 3.0ghz

CPU is calculated at 15 seconds.
Application crashes at GPU Please Wait.

Thx,
Vidkidd





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy