topic The computing power of the Vivante's GC2000 GPU in i.mx6q (more) in i.MX Processors
https://community.nxp.com/t5/i-MX-Processors/The-computing-power-of-the-Vivante-s-GC2000-GPU-in-i-mx6q-more/m-p/235306#M18565
<HTML><HEAD></HEAD><BODY><P class="discussion details full"> Here is the real power of Vivante's GC2000 GPU in i.MX6 Q<BR /> 4 Computing power tests<BR /> The matrix multiplication algorithm was used to test it power. For comparison, a Lenovo Thinkpad x200 was used, it has 64-bit Ubuntu 12.04 and Intel OpenCL driver installed, 4G memory, Core 2 Duo CPU P8600 @ 2.40GHz × 2. <BR /> <BR /> 4.1 Theoretical Power<BR /> Let's first figure out how fast the GC2000 can compute theoretically.<BR /> GC2000 has four compute units, each unit can handle four float MAD (multiply and add) operation, if every unit of GC2000 can make a MAD operation in every clock cycle, and the GPU's maximum frequency is 500MHZ, so GC2000 would have a computing power : 0.5*4*4*2 = 16GFLOPS.<BR /> We first make a kernel program with no meaningful operations, just computation<BR /> between registers of GPU. Here is one:<BR /> "__kernel void vadd (__global const float4 *a, __global const float4 *b, __global float4 *c){ \n",<BR /> " int gid = get_global_id(0); \n",<BR /> " int i; \n",<BR /> " float4 dd1, dd2, dd3, dd4, dd5; \n",<BR /> " for(i=0; i<900000; i++) { \n",<BR /> "dd3 += dd2*dd5; \n",<BR /> "dd2 += dd1*dd4; \n",<BR /> "dd4 += dd3*dd1; \n",<BR /> "dd1 += dd3*dd2; \n",<BR /> "dd3 += dd2*dd5; \n",<BR /> "dd2 += dd1*dd4; \n",<BR /> "dd4 += dd3*dd1; \n",<BR /> "dd1 += dd3*dd2; \n",<BR /> "}\n"<BR /> "}\n"<BR /> The result is 13.8GFLOPS, that is a rather reasonable figure.<BR /> <BR /> 4.2 Real power<BR /> We used the GPU to compute the multiplication of two 1000x1000 matrix. The total computation load is 2*1000^3=2GFLOPS.<BR /> Here is the kernel program:<BR /> "__kernel void mmul(const int Ndim, const int Pdim, const int Mdim, __global float4 *A, __global float4 *B, __global float *C) { \n", </P><P class="discussion details full"> "int k, kk, m1, m2; \n",<BR /> "int i = get_global_id(0); \n",<BR /> "int j = get_global_id(1); \n",<BR /> "float4 tmp=0.0; \n",<BR /> "m1 = i*(Pdim/8); m2=j*(Pdim/8); \n",<BR /> "for(k=0; k<(Pdim/8); k++, m1++, m2++) \n",<BR /> "tmp += Atmp1[kk] * tmp2[kk];\n",<BR /> "C[i*Mdim+j] = tmp.x+tmp.y+tmp.z+tmp.w; \n",<BR /> "}\n"<BR /> The program used 3.3 seconds, that is about 600MFLOPS, or 0.6GFLOPS.<BR /> For comparison, the same program ran on the X200 laptop with Intel's OpenCL driver, the result is quite surprising: 2.9GFLOPS.<BR /> <BR /> Let's figure out the reason for the difference:<BR /> First, The Cuo 2 P8600 has two CPU cores, the working frequency is 2.4G, each core has a SSE 128bit floating point processor, it can be regarded as one shader, so P8600 has two shaders working at 2.4G, GC2000 has 4 shaders working at 0.5G, the ratio of computing ability shall be 2*2.4 : 4*0.5 = 2.4 : 1.<BR /> Secondly, P8600 has 3M L2 cache, and for GC2000, as stated above, the OpenCL can only use 1k local memory and 64byte memory cache.<BR /> And further, the memory bandwidth greatly influenced the result. Intel's P8600 memory bandwith is 800Mhz 64bit, that is 6.4G. According to I.MX6's datasheet, the double 64bit AXI can run at maximum speed of 264Mhz, the bandwith is about 2.1G. As GC2000 almost has no cache, one GLOPS needs at least one new float number, that is 4 bytes, for a 2.1G bus, the maximum throughput is 500M float numbers, cache can make things a little better, so the test result 600MGLOPS is a very reasonable figure for GC2000.<BR /> <BR /> 600MFLOS is not a very bad result. Half of it is enough to drive a 720p display. So, there is plenty of room for general computing.<BR /> <BR /> As you see, the bottleneck of GPU computing is the system bus bandwidth and cache size of the GPU. I do not know why Vivante designed such a small cache for OpenCL. Maybe it is the driver's configuration, or the hardware's limitation. That tremendously limited the power of gc2000.<BR /> I hope the engineers of Vivante could make some optimization for their driver and future GPU design, so that their GPU could be better used for general computing.</P><P class="discussion details full">The test platform is a i.MX6Q TV stick Hi802 with Ubuntu 11.10 linaro and vivance opencl driver , the test platform for Lenovo X200 Laptop is Ubuntu 12.04 with Intel OpenCL driver.</P><P class="discussion details full"> <A class="showLess" href="http://www.linkedin.com/groups?displayMySubmitted=&gid=1729897&goback=%2Egmp_1729897" title="Show less">less…</A> </P><H3 class="article groups"> </H3><P><SPAN class="mce_paste_marker"><BR /></SPAN></P></BODY></HTML>Fri, 22 Mar 2013 05:15:09 GMTgranttao2013-03-22T05:15:09ZThe computing power of the Vivante's GC2000 GPU in i.mx6q (more)
https://community.nxp.com/t5/i-MX-Processors/The-computing-power-of-the-Vivante-s-GC2000-GPU-in-i-mx6q-more/m-p/235306#M18565
<HTML><HEAD></HEAD><BODY><P class="discussion details full"> Here is the real power of Vivante's GC2000 GPU in i.MX6 Q<BR /> 4 Computing power tests<BR /> The matrix multiplication algorithm was used to test it power. For comparison, a Lenovo Thinkpad x200 was used, it has 64-bit Ubuntu 12.04 and Intel OpenCL driver installed, 4G memory, Core 2 Duo CPU P8600 @ 2.40GHz × 2. <BR /> <BR /> 4.1 Theoretical Power<BR /> Let's first figure out how fast the GC2000 can compute theoretically.<BR /> GC2000 has four compute units, each unit can handle four float MAD (multiply and add) operation, if every unit of GC2000 can make a MAD operation in every clock cycle, and the GPU's maximum frequency is 500MHZ, so GC2000 would have a computing power : 0.5*4*4*2 = 16GFLOPS.<BR /> We first make a kernel program with no meaningful operations, just computation<BR /> between registers of GPU. Here is one:<BR /> "__kernel void vadd (__global const float4 *a, __global const float4 *b, __global float4 *c){ \n",<BR /> " int gid = get_global_id(0); \n",<BR /> " int i; \n",<BR /> " float4 dd1, dd2, dd3, dd4, dd5; \n",<BR /> " for(i=0; i<900000; i++) { \n",<BR /> "dd3 += dd2*dd5; \n",<BR /> "dd2 += dd1*dd4; \n",<BR /> "dd4 += dd3*dd1; \n",<BR /> "dd1 += dd3*dd2; \n",<BR /> "dd3 += dd2*dd5; \n",<BR /> "dd2 += dd1*dd4; \n",<BR /> "dd4 += dd3*dd1; \n",<BR /> "dd1 += dd3*dd2; \n",<BR /> "}\n"<BR /> "}\n"<BR /> The result is 13.8GFLOPS, that is a rather reasonable figure.<BR /> <BR /> 4.2 Real power<BR /> We used the GPU to compute the multiplication of two 1000x1000 matrix. The total computation load is 2*1000^3=2GFLOPS.<BR /> Here is the kernel program:<BR /> "__kernel void mmul(const int Ndim, const int Pdim, const int Mdim, __global float4 *A, __global float4 *B, __global float *C) { \n", </P><P class="discussion details full"> "int k, kk, m1, m2; \n",<BR /> "int i = get_global_id(0); \n",<BR /> "int j = get_global_id(1); \n",<BR /> "float4 tmp=0.0; \n",<BR /> "m1 = i*(Pdim/8); m2=j*(Pdim/8); \n",<BR /> "for(k=0; k<(Pdim/8); k++, m1++, m2++) \n",<BR /> "tmp += Atmp1[kk] * tmp2[kk];\n",<BR /> "C[i*Mdim+j] = tmp.x+tmp.y+tmp.z+tmp.w; \n",<BR /> "}\n"<BR /> The program used 3.3 seconds, that is about 600MFLOPS, or 0.6GFLOPS.<BR /> For comparison, the same program ran on the X200 laptop with Intel's OpenCL driver, the result is quite surprising: 2.9GFLOPS.<BR /> <BR /> Let's figure out the reason for the difference:<BR /> First, The Cuo 2 P8600 has two CPU cores, the working frequency is 2.4G, each core has a SSE 128bit floating point processor, it can be regarded as one shader, so P8600 has two shaders working at 2.4G, GC2000 has 4 shaders working at 0.5G, the ratio of computing ability shall be 2*2.4 : 4*0.5 = 2.4 : 1.<BR /> Secondly, P8600 has 3M L2 cache, and for GC2000, as stated above, the OpenCL can only use 1k local memory and 64byte memory cache.<BR /> And further, the memory bandwidth greatly influenced the result. Intel's P8600 memory bandwith is 800Mhz 64bit, that is 6.4G. According to I.MX6's datasheet, the double 64bit AXI can run at maximum speed of 264Mhz, the bandwith is about 2.1G. As GC2000 almost has no cache, one GLOPS needs at least one new float number, that is 4 bytes, for a 2.1G bus, the maximum throughput is 500M float numbers, cache can make things a little better, so the test result 600MGLOPS is a very reasonable figure for GC2000.<BR /> <BR /> 600MFLOS is not a very bad result. Half of it is enough to drive a 720p display. So, there is plenty of room for general computing.<BR /> <BR /> As you see, the bottleneck of GPU computing is the system bus bandwidth and cache size of the GPU. I do not know why Vivante designed such a small cache for OpenCL. Maybe it is the driver's configuration, or the hardware's limitation. That tremendously limited the power of gc2000.<BR /> I hope the engineers of Vivante could make some optimization for their driver and future GPU design, so that their GPU could be better used for general computing.</P><P class="discussion details full">The test platform is a i.MX6Q TV stick Hi802 with Ubuntu 11.10 linaro and vivance opencl driver , the test platform for Lenovo X200 Laptop is Ubuntu 12.04 with Intel OpenCL driver.</P><P class="discussion details full"> <A class="showLess" href="http://www.linkedin.com/groups?displayMySubmitted=&gid=1729897&goback=%2Egmp_1729897" title="Show less">less…</A> </P><H3 class="article groups"> </H3><P><SPAN class="mce_paste_marker"><BR /></SPAN></P></BODY></HTML>Fri, 22 Mar 2013 05:15:09 GMThttps://community.nxp.com/t5/i-MX-Processors/The-computing-power-of-the-Vivante-s-GC2000-GPU-in-i-mx6q-more/m-p/235306#M18565granttao2013-03-22T05:15:09ZRe: The computing power of the Vivante's GC2000 GPU in i.mx6q (more)
https://community.nxp.com/t5/i-MX-Processors/The-computing-power-of-the-Vivante-s-GC2000-GPU-in-i-mx6q-more/m-p/235307#M18566
<HTML><HEAD></HEAD><BODY><P>i have a gk802 (same as hi802). would you be able to provide your source code such that I could run this on my setup as well? thanks</P></BODY></HTML>Thu, 28 Mar 2013 04:30:37 GMThttps://community.nxp.com/t5/i-MX-Processors/The-computing-power-of-the-Vivante-s-GC2000-GPU-in-i-mx6q-more/m-p/235307#M18566varsmolta2013-03-28T04:30:37ZRe: The computing power of the Vivante's GC2000 GPU in i.mx6q (more)
https://community.nxp.com/t5/i-MX-Processors/The-computing-power-of-the-Vivante-s-GC2000-GPU-in-i-mx6q-more/m-p/235308#M18567
<HTML><HEAD></HEAD><BODY><P>the code is there. with a trivial opencl main function, you will get it work. But first you must get the Ubuntu work on gk802, and get the opencl driver work.</P></BODY></HTML>Thu, 28 Mar 2013 04:46:20 GMThttps://community.nxp.com/t5/i-MX-Processors/The-computing-power-of-the-Vivante-s-GC2000-GPU-in-i-mx6q-more/m-p/235308#M18567granttao2013-03-28T04:46:20Z