Author Topic: OpenCL - when to use it? (help and benchmark oppose each other!)  (Read 50998 times)

ektorbarajas

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
    • DJ ektorbarajas
Hi.

I noticed that when running an OpenCL benchmark, the results are expressed in speed (ms) for example:

CPU Speed (1 Core): 281ms
OpenCL Device Speed: 78ms

According to this, then OpenCL must be enabled since openCL is faster than 1 CPU Core,

BUT the online help says the opposite:
"Don’t turn on OpenCL acceleration if the results of OpenCL benchmark are lower than processor’s benchmark, because this will increase overhead costs due to increased expenses for data transfer to the OpenCL device. "

So what is the correct statement?
Thanks

ektorbarajas

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
    • DJ ektorbarajas
Also I'd appreciate to clarify this:

On the parameter "Work Group Size", higher numbers are better? so if a device supports 1024 then it's better 1024 than 64?

Thanks

Admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • https://www.smilarityapp.com
Benchmarking doesn't count transfer time, it only shows pure math power. In your situation your OpenCL more powerful when your CPUs you can enable it.
Work size hasn't simple best value, try use different values and benchmark, some video cards hast best values in 128 some in 64.

ektorbarajas

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
    • DJ ektorbarajas
So the rule of thumb is that if a benchmark throws the OpenCL speed lower than 1 CPU cure, then OpenCL should be used?

For example:

CPU Speed (1 Core): 281ms
OpenCL Device Speed: 78ms

menas that there is a real benefit enabilg OpenCL

While

CPU Speed (1 Core): 581ms
OpenCL Device Speed: 754ms

means that OpenCL MUST NOT BE enabled?

Then indeed the help statement is wrong:
"Don’t turn on OpenCL acceleration if the results of OpenCL benchmark are lower than processor’s benchmark, because this will increase overhead costs due to increased expenses for data transfer to the OpenCL device. "

Regards


« Last Edit: March 20, 2013, 20:17:22 by ektorbarajas »

Admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • https://www.smilarityapp.com
yes, it's not fully correct "lower" in this context means higher time results. We correct it in next releases.

ektorbarajas

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
    • DJ ektorbarajas
Re: OpenCL - when to use it? (help and benchmark oppose each other!)
« Reply #5 on: October 31, 2013, 21:40:50 »
Hi. It has being a long time  :)

Just wanted to know if this minor issue has being corrected in the beta 1.9.0?

Regards

Admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • https://www.smilarityapp.com
Re: OpenCL - when to use it? (help and benchmark oppose each other!)
« Reply #6 on: November 04, 2013, 08:11:23 »
Thanks for reminder, we fixed help text:
Don’t turn on OpenCL acceleration if the results of OpenCL benchmark are longer in ms. than processor’s benchmark, because this will increase overhead costs due to increased expenses for data transfer to the OpenCL device.

ektorbarajas

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
    • DJ ektorbarajas
Re: OpenCL - when to use it? (help and benchmark oppose each other!)
« Reply #7 on: November 04, 2013, 14:41:00 »
Great!!!

Kind regards

soylentgreen

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Which would be better in this situation:

Work size= 64
CPU= 600ms
GPU= 74ms

Work size= 512
CPU= 700ms
GPU= 150ms

The 512 GPU is still much faster than CPU. So would 512 be faster than 64 in this case?

Admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • https://www.smilarityapp.com
lower values is better.
use work size 64, work size is how much separate "threads/processes" run simultaneously, it doesn't directly related to performance, different devices have different optimum value. 512 doesn't mean better 64.