AnsweredAssumed Answered

Huge jump in performance when increasing buffer size on Llano

Question asked by dominik_g on Aug 15, 2012

Hi everyone,

 

I noticed a very strange behaviour on a Llano device (A8-3850) under Linux. When increasing the memory size beyond a certain threshold the kernel runtime on the iGPU would suddenly jump disproportionately.

 

To investigate what's going on I wrote a simple program: Create a single buffer of size N using clCreateBuffer with only the CL_MEM_READ_WRITE flag set. Launch a kernel with a one-dimensional NDRange of size N which writes a constant to the buffer:

__kernel void foo (__global float * y, const int N) {
  int i = get_global_id(0);
  if (i >= N) return;

  y[i] = 12;
}

 

When I increase the buffer size and measure the kernel execution time (using OpenCL events) I get the following behaviour:

plot.gif

Between buffer sizes of 240 and 250 MB the run-time jumps from around 7ms to 35ms. At 470 MB it drops from 64ms to 24ms. The results are reproducible and it always occurs at the same place.

 

Has anyone else noticed something similar? Any ideas what might cause it?

 

Cheers

Dominik

Outcomes