Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

i7-5775c Iris Pro vs CPU performance

$
0
0

Hi,

I'm benchmarking i7-5775c's 4 CPU cores against its Iris Pro 6200 for simple OpenCL kernels. Guess you can say I want to know when it makes sense to off-load computation onto the IGP. One experiment involves each thread executing many FMA operations on a single input element to measure computational speed. I'm surprised to see the IGP outperform the CPU by nearly 9x, and by 18x with hyper-threading disabled:

OpenCL kernel:
void kernel fmaKernel(global float * out){

  float sum = out[get_global_id(0)];

  for(int i = 0; i < FMA_LOOP; i++){
     sum=fma(1.02345, FMA_LOOP.f, sum);
  };

  out[get_global_id(0)]=sum;

}

Results:
512x512 matrix, FMA_LOOP=1664

IGP ~ 1.06 ms
CPU w/ hyper threading ~9.66 ms
CPU w/o hyper threading ~19 ms

Question:
Why is the CPU so much slower than the IGP? From what I know about the hardware, I would expect the GPU to outperform the CPU by about 2x. I have this expectation because the 6200 is rated at 883 GFLOPS and I'm estimating my 4 CPU cores amount to roughly 460 GFLOPS (I can't find a spec sheet that explicitly states the CPU GFLOP rating). I recognize that these numbers are doubled since they represent FMA as being two operations in one cycle. Further, a quick (very) theoretical calculation on computation time gives me:

CPU: 512 * 512 * 1664 / 10^9 / (460 GFLOPS / 2) * 1000 ms / s = 1.9 ms
IGP: 512 * 512 * 1664 / 10^9 / (883 GFLOPS / 2) * 1000 ms / s = 0.99 ms

So I feel like the IGP is performing as it should, while the CPU isn't even close. I can't tell if this is because I don't understand how the hardware works or because there is something up with the OpenCL implementation.

Config:
Ubuntu 14.04 LTS
Intel OpenCL 1.2-5.0.0.43 (CPU-x64)
Intel OpenCL 1.2-1.0 (Graphics Driver for HD Graphics, Iris, Iris Pro)

Run benchmark:
 ./simpleOpencl <platform> 24 10 1 512

For my system platform=0=IGP and platform=1=CPU.

AttachmentSize
Downloadapplication/x-tarsimpleOcl.tar550 KB

Viewing all articles
Browse latest Browse all 1182

Trending Articles