(7707,17796,'2015-02-12 16:30:51','2015-02-12 16:30:51','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<code>\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</code>\r\n\r\n\r\n\r\nFig. \\ref{fig:jitlisting} presents the code for computing the value $\\pi$ using a Monte-Carlo simulation where points\r\nare randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The \r\nratio of points within the circle and the point in the square approximate the value $\\pi$. \r\nThe accuracy of $\\pi$ improves as the number of samples are increased. \r\nThere are two implementations in the code listing. One implementation takes advantage of the JIT feature while the \r\nother implementation does not benefit from the implementation. As the JIT operations are an integral part of the \r\nArrayFire framework, the only way for a programmer to side-step the JIT operations is to manually force expressions to be\r\nevaluated as was done in the non-JIT supported implementation.\r\n\r\nFig. \\ref{fig:jitperformance} depicts the \r\nexecution time (abscissa) as a function of the number of samples (ordinate) for two implementations in Fig. \r\n\\ref{fig:jitlisting}. When the number of samples is considerably small, the execution time of the non-JIT supported function\r\nis dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the\r\ncreation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is $1.4X-2.0X$ than the non-JIT\r\nsupported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, \r\nare not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT\r\nsupported version is $2.0X-2.7X$ faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-12 16:30:51','2015-02-12 16:30:51','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7708,17796,'2015-02-12 16:32:01','2015-02-12 16:32:01','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nFig. \\ref{fig:jitlisting} presents the code for computing the value $\\pi$ using a Monte-Carlo simulation where points\r\nare randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The \r\nratio of points within the circle and the point in the square approximate the value $\\pi$. \r\nThe accuracy of $\\pi$ improves as the number of samples are increased. \r\nThere are two implementations in the code listing. One implementation takes advantage of the JIT feature while the \r\nother implementation does not benefit from the implementation. As the JIT operations are an integral part of the \r\nArrayFire framework, the only way for a programmer to side-step the JIT operations is to manually force expressions to be\r\nevaluated as was done in the non-JIT supported implementation.\r\n\r\nFig. \\ref{fig:jitperformance} depicts the \r\nexecution time (abscissa) as a function of the number of samples (ordinate) for two implementations in Fig. \r\n\\ref{fig:jitlisting}. When the number of samples is considerably small, the execution time of the non-JIT supported function\r\nis dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the\r\ncreation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is $1.4X-2.0X$ than the non-JIT\r\nsupported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, \r\nare not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT\r\nsupported version is $2.0X-2.7X$ faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-12 16:32:01','2015-02-12 16:32:01','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7709,17796,'2015-02-12 16:34:22','2015-02-12 16:34:22','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nFig. \\ref{fig:jitlisting} presents the code for computing the value $\\pi$ using a Monte-Carlo simulation where points\r\nare randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The \r\nratio of points within the circle and the point in the square approximate the value $\\pi$. \r\nThe accuracy of $\\pi$ improves as the number of samples are increased. \r\nThere are two implementations in the code listing. One implementation takes advantage of the JIT feature while the \r\nother implementation does not benefit from the implementation. As the JIT operations are an integral part of the \r\nArrayFire framework, the only way for a programmer to side-step the JIT operations is to manually force expressions to be\r\nevaluated as was done in the non-JIT supported implementation.\r\n\r\nFig. \\ref{fig:jitperformance} depicts the \r\nexecution time (abscissa) as a function of the number of samples (ordinate) for two implementations in Fig. \r\n\\ref{fig:jitlisting}. When the number of samples is considerably small, the execution time of the non-JIT supported function\r\nis dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the\r\ncreation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is $1.4X-2.0X$ than the non-JIT\r\nsupported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, \r\nare not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT\r\nsupported version is $2.0X-2.7X$ faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-12 16:34:22','2015-02-12 16:34:22','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7710,17796,'2015-02-12 16:36:13','2015-02-12 16:36:13','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nThe following code (using ArrayFire) computes the value $\\pi$ using a Monte-Carlo simulation where points\r\nare randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The \r\nratio of points within the circle and the point in the square approximate the value $\\pi$. \r\nThe accuracy of $\\pi$ improves as the number of samples are increased. \r\nThere are two implementations in the code listing. One implementation takes advantage of the JIT feature while the \r\nother implementation does not benefit from the implementation. As the JIT operations are an integral part of the \r\nArrayFire framework, the only way for a programmer to side-step the JIT operations is to manually force expressions to be\r\nevaluated as was done in the non-JIT supported implementation.\r\n\r\nFig. \\ref{fig:jitperformance} depicts the \r\nexecution time (abscissa) as a function of the number of samples (ordinate) for two implementations in Fig. \r\n\\ref{fig:jitlisting}. When the number of samples is considerably small, the execution time of the non-JIT supported function\r\nis dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the\r\ncreation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is $1.4X-2.0X$ than the non-JIT\r\nsupported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, \r\nare not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT\r\nsupported version is $2.0X-2.7X$ faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-12 16:36:13','2015-02-12 16:36:13','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7712,17729,'2015-02-17 18:13:35','2015-02-17 18:13:35','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we focus on the GPU benchmarks of <a href=\"http://www.anandtech.com/show/8291/amd-a10-7800-review-65w-kaveri\">AMD A10-7850K APU</a> &amp; <a href=\"http://www.anandtech.com/show/8227/devils-canyon-review-intel-core-i7-4790k-and-i5-4690k\">Intel i7-4790K HD 4600</a> for the following ArrayFire functions.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel system was outperformed by the AMD APU. We believe that we will be able to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell Part-1','','publish','open','open','','arrayfire-benchmarks-amd-kaveri-vs-intel-haswell-part-1','','','2015-02-17 20:08:08','2015-02-17 20:08:08','',0,'http://sandbox.arrayfire.com/?p=7712',0,'post','',10),(7713,17729,'2015-02-12 19:53:07','2015-02-12 19:53:07','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<h4>Bilateral</h4>\r\nhttps://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&amp;format=interactive','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 19:53:07','2015-02-12 19:53:07','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7714,17729,'2015-02-12 19:53:42','2015-02-12 19:53:42','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<h4>Bilateral</h4>\r\n<a href=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&amp;format=interactive\">https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&amp;format=interactive</a>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 19:53:42','2015-02-12 19:53:42','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7715,17729,'2015-02-12 19:55:59','2015-02-12 19:55:59','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<h4>Bilateral</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"792\" height=\"563\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 19:55:59','2015-02-12 19:55:59','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7716,17729,'2015-02-12 19:58:45','2015-02-12 19:58:45','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<h4>bilateral</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"792\" height=\"563\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>erode</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"792\" height=\"563\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>convolve</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"792\" height=\"563\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 19:58:45','2015-02-12 19:58:45','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7717,17729,'2015-02-12 19:59:13','2015-02-12 19:59:13','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<h4>bilateral</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"792\" height=\"428\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>erode</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"792\" height=\"428\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>convolve</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"792\" height=\"428\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 19:59:13','2015-02-12 19:59:13','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7718,17729,'2015-02-12 19:59:35','2015-02-12 19:59:35','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<h4>bilateral</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"792\" height=\"380\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>erode</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"792\" height=\"380\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>convolve</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"792\" height=\"380\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 19:59:35','2015-02-12 19:59:35','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7719,17729,'2015-02-12 19:59:55','2015-02-12 19:59:55','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<h4>bilateral</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"600\" height=\"380\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>erode</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"600\" height=\"380\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>convolve</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"600\" height=\"380\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 19:59:55','2015-02-12 19:59:55','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7720,17729,'2015-02-12 20:00:25','2015-02-12 20:00:25','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<h4>bilateral</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"256\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>erode</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"256\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n<h4>convolve</h4>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"256\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 20:00:25','2015-02-12 20:00:25','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7721,17729,'2015-02-12 20:00:51','2015-02-12 20:00:51','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 20:00:51','2015-02-12 20:00:51','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7722,17729,'2015-02-12 20:04:29','2015-02-12 20:04:29','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1164355740&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 20:04:29','2015-02-12 20:04:29','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7723,17729,'2015-02-12 20:12:32','2015-02-12 20:12:32','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1164355740&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 20:12:32','2015-02-12 20:12:32','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7724,17729,'2015-02-12 20:22:25','2015-02-12 20:22:25','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1164355740&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 20:22:25','2015-02-12 20:22:25','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7725,17729,'2015-02-12 20:22:28','2015-02-12 20:22:28','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1164355740&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 20:22:28','2015-02-12 20:22:28','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7726,17729,'2015-02-12 20:23:19','2015-02-12 20:23:19','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1164355740&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&amp;format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','AMD A10-7850K APU vs Intel HD 4600 i7-4790K','','inherit','open','open','','7712-revision-v1','','','2015-02-12 20:23:19','2015-02-12 20:23:19','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7727,17729,'2015-02-12 20:33:02','2015-02-12 20:33:02','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1164355740&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&amp;format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','ArrayFire: AMD Kaveri GPU vs Intel Haswell HD Graphics','','inherit','open','open','','7712-revision-v1','','','2015-02-12 20:33:02','2015-02-12 20:33:02','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7728,17729,'2015-02-12 20:36:41','2015-02-12 20:36:41','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&amp;format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','ArrayFire: AMD Kaveri GPU vs Intel Haswell HD Graphics','','inherit','open','open','','7712-revision-v1','','','2015-02-12 20:36:41','2015-02-12 20:36:41','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7729,17796,'2015-02-13 14:22:26','2015-02-13 14:22:26','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nThe above code (using ArrayFire) computes the value &pi; using a Monte-Carlo simulation where points\r\nare randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The \r\nratio of points within the circle and the point in the square approximate the value &pi;. \r\nThe accuracy of $\\pi$ improves as the number of samples are increased. \r\nThere are two implementations in the code listing. One implementation takes advantage of the JIT feature while the \r\nother implementation does not benefit from the implementation. As the JIT operations are an integral part of the \r\nArrayFire framework, the only way for a programmer to side-step the JIT operations is to manually force expressions to be\r\nevaluated as was done in the non-JIT supported implementation.\r\n\r\nFig. \\ref{fig:jitperformance} depicts the \r\nexecution time (abscissa) as a function of the number of samples (ordinate) for two implementations in Fig. \r\n\\ref{fig:jitlisting}. When the number of samples is considerably small, the execution time of the non-JIT supported function\r\nis dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the\r\ncreation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is $1.4X-2.0X$ than the non-JIT\r\nsupported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, \r\nare not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT\r\nsupported version is $2.0X-2.7X$ faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-13 14:22:26','2015-02-13 14:22:26','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7730,17796,'2015-02-13 14:28:54','2015-02-13 14:28:54','','Performance of JIT and Non-JIT implementations','','inherit','open','open','','jit_cuda','','','2015-02-13 14:29:30','2015-02-13 14:29:30','',7702,'http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png',0,'attachment','image/png',0),(7731,17796,'2015-02-13 14:30:55','2015-02-13 14:30:55','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nThe above code (using ArrayFire) computes the value &pi; using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value &pi;. The accuracy of &pi; improves as the number of samples are increased, which motivates using additional sample.\r\nThere are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"alignnone size-full wp-image-7730\" /></a>\r\n\r\nThe above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function\r\nis dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the\r\ncreation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT\r\nsupported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, \r\nare not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT\r\nsupported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-13 14:30:55','2015-02-13 14:30:55','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7732,17796,'2015-02-13 14:31:47','2015-02-13 14:31:47','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nThe above code (using ArrayFire) computes the value &pi; using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value &pi;. The accuracy of &pi; improves as the number of samples are increased, which motivates using additional sample.\r\nThere are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"alignnone size-full wp-image-7730\" /></a>\r\n\r\nThe above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the\r\ncreation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, \r\nare not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-13 14:31:47','2015-02-13 14:31:47','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7733,17796,'2015-02-13 14:32:17','2015-02-13 14:32:17','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nThe above code (using ArrayFire) computes the value &pi; using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value &pi;. The accuracy of &pi; improves as the number of samples are increased, which motivates using additional sample.\r\nThere are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"alignnone size-full wp-image-7730\" /></a>\r\n\r\nThe above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-13 14:32:17','2015-02-13 14:32:17','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7734,17796,'2015-02-13 18:29:46','2015-02-13 18:29:46','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nThe above code (using ArrayFire) computes the value &pi; using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value &pi;. The accuracy of &pi; improves as the number of samples are increased, which motivates using additional sample.\r\nThere are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"alignnone size-full wp-image-7730\" /></a>\r\n\r\nThe above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\nThe number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past. In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Part 2</a>, we showed how to implement Conway\'s Game of Life in several lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-13 18:29:46','2015-02-13 18:29:46','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7735,17796,'2015-02-13 18:34:41','2015-02-13 18:34:41','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nThe above code (using ArrayFire) computes the value &pi; using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value &pi;. The accuracy of &pi; improves as the number of samples are increased, which motivates using additional sample.\r\nThere are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"alignnone size-full wp-image-7730\" /></a>\r\n\r\nThe above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\nThe number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past. In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement Conway\'s Game of Life in several lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-13 18:34:41','2015-02-13 18:34:41','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7736,17796,'2015-02-13 18:35:53','2015-02-13 18:35:53','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nThe above code (using ArrayFire) computes the value &pi; using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value &pi;. The accuracy of &pi; improves as the number of samples are increased, which motivates using additional sample.\r\nThere are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"alignnone size-full wp-image-7730\" /></a>\r\n\r\nThe above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\nThe number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past. In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-13 18:35:53','2015-02-13 18:35:53','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7738,17729,'2015-02-13 19:00:53','2015-02-13 19:00:53','In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.\r\n<ul>\r\n	<li>Bilateral Filter</li>\r\n	<li>Erosion/Dilation</li>\r\n	<li>2D Convolution</li>\r\n	<li>2D Fast Fourier Transform for double precision numbers</li>\r\n	<li>2D Fast Fourier Transform for single precision numbers</li>\r\n	<li>Median Filter</li>\r\n	<li>Resize</li>\r\n	<li>Rotate</li>\r\n	<li>Scan 1D Array</li>\r\n	<li>Reduction of 1D Array</li>\r\n	<li>Sort</li>\r\n	<li>Matrix Transpose</li>\r\n</ul>\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&amp;format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&amp;format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>','ArrayFire: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 19:00:53','2015-02-13 19:00:53','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7739,18528,'2015-02-16 19:51:59','2015-02-16 19:51:59','Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben-yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or 5th <a href=\"http://ark.intel.com/\">generation Intel processor</a>. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.\r\n\r\nThere are several little caveats which need to be discussed up front. Foremost, the Beignet project supports the following hardware:\r\n<ul>\r\n	<li>3rd Generation Intel Core Processors</li>\r\n	<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\r\n	<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\r\n	<li>5th Generation Intel Core Processors \"Broadwell\".</li>\r\n</ul>\r\nThere are also a few noteworthy issues of which you should be aware:\r\n<ul>\r\n	<li>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</li>\r\n	<li>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</li>\r\n	<li>There is no double precision support</li>\r\n	<li>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</li>\r\n</ul>\r\nThere are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.\r\n<h3>Installing prerequisites</h3>\r\n<pre><code>sudo apt-get install build-essential g++ cmake \r\nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\r\nsudo apt-get install ocl-icd-opencl-dev ocl-icd-libopencl1</code></pre>\r\nNote, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead, then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:\r\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\r\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \r\n</code></pre>\r\nIf you want to use the standard OpenCL ICD loader, you will also need to install these packages:\r\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \r\n</code></pre>\r\nI would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:\r\n<pre><code>sudo apt-get install clinfo    \r\n</code></pre>\r\n<h3>Check out and compile Beignet</h3>\r\n<pre><code>git clone git://anongit.freedesktop.org/beignet\r\ncd beignet\r\ngit checkout Release_v1.0.0\r\nmkdir build\r\ncd build\r\ncmake ..   \r\n</code></pre>\r\nNOTE: There may be newer releases of Beinget. To find releases type <span class=\"lang:default decode:true crayon-inline\">git branch -a </span>on the console and pick the highest release version number.\r\n\r\nDuring the CMake stage, ensure that the OCL ICD header file is installed, otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source using\r\n<pre><code>make    \r\n</code></pre>\r\n(Note, you can do make -jN with N &gt; 1 to do a parallel build.)\r\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:\r\n<pre><code>cd utests\r\nsource setenv.sh\r\n./utest_run   \r\n</code></pre>\r\nIf a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:\r\n<pre><code>sudo su\r\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\r\nexit    \r\n</code></pre>\r\nand try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.\r\n\r\nIf most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.\r\n\r\nIf all was well, install Beignet to your system:\r\n<pre><code>sudo make install   \r\n</code></pre>\r\nYou can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.\r\n<h3>Verify Beignet is installed</h3>\r\nIn a terminal run the <code>clinfo</code> program. You should see something like this:\r\n<pre><code>$ clinfo\r\n...      \r\nPlatform Name:              Intel Gen OCL Driver\r\nNumber of devices:          1\r\nDevice Type:                CL_DEVICE_TYPE_GPU\r\n...\r\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\r\nVendor:                     Intel\r\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\r\nDriver version:             0.9.1\r\nProfile:                    FULL_PROFILE\r\nVersion:                    OpenCL 1.2 beignet 0.9.1\r\nExtensions:                 cl_khr_global_int32_base_atomics \r\n                            cl_khr_global_int32_extended_atomics \r\n                            cl_khr_local_int32_base_atomics \r\n                            cl_khr_local_int32_extended_atomics \r\n                            cl_khr_byte_addressable_store cl_khr_icd   \r\n</code></pre>\r\nTake note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.\r\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\r\nIf you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.\r\n\r\nIn the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the <a href=\"https://help.ubuntu.com/community/Kernel/Compile\">kernel compilation instructions for Ubuntu</a>. Instructions for other variants of Linux will be significantly different.\r\n\r\nInstall prerequisites:\r\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \r\n</code></pre>\r\nMake a working directory for the kernel somewhere and download the source\r\n<pre><code>mkdir kernel\r\ncd kernel\r\napt-get source linux-image-`uname -r`    \r\n</code></pre>\r\nNext we see if we can automatically apply the patch. First download the patch:\r\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \r\n</code></pre>\r\nNow <code>cd</code> into the kernel directory:\r\n<pre><code>cd linux-3.16.0    \r\n</code></pre>\r\nCheck some details about the patch\r\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \r\n</code></pre>\r\nTry automatically applying the patch:\r\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \r\n</code></pre>\r\nIf it automatically applies with no errors, just apply it:\r\n<pre><code>git apply ../disable-batchbuffer-security.patch    \r\n</code></pre>\r\nIf it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:\r\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \r\n</code></pre>\r\nIn the <code>i915_gem_do_execbuffer</code> function, find the following code:\r\n<pre><code>flags = 0;\r\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\r\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\r\n        return -EPERM;    \r\n</code></pre>\r\nAnd add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:\r\n<pre><code>flags = 0;\r\nflags |= I915_DISPATCH_SECURE;\r\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\r\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\r\n        return -EPERM;  \r\n</code></pre>\r\nThis was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.\r\n\r\nNow we build the new kernel. Run the following commands from within the kernel source directory:\r\n<pre><code>fakeroot debian/rules clean\r\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \r\n</code></pre>\r\nThis will build some Debian packages and place them in the directory <em>above</em> the kernel source root.\r\n\r\nAfter the kernel has compiled, install it:\r\n<pre><code>cd ../ (or go back into the kernel directory)\r\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \r\nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \r\n</code></pre>\r\n(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:\r\n<pre><code>sudo update-grub\r\nsudo reboot    \r\n</code></pre>\r\nNow go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.','OpenCL on Intel HD / Iris graphics on Linux','','publish','open','open','','opencl-on-intel-hd-iris-graphics-on-linux','','','2015-12-04 15:30:03','2015-12-04 15:30:03','',0,'http://sandbox.arrayfire.com/?p=7739',0,'post','',17),(7740,17796,'2015-02-13 19:07:07','2015-02-13 19:07:07','','jit_cuda','Performance of JIT and Non-JIT implementations','inherit','open','open','','jit_cuda-2','','','2015-02-13 19:07:12','2015-02-13 19:07:12','',7702,'http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png',0,'attachment','image/png',0),(7741,17796,'2015-02-13 19:07:21','2015-02-13 19:07:21','The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions,  comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is ``met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (``function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.\r\n\r\nThis JIT compilation technique has multiple benefits:\r\n<ul>\r\n<li>\r\nA reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets.\r\n</li>\r\n<li>\r\nBetter cache performance - there are many instances in which the memory required by a \r\nsingle element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \r\n</li>\r\n<li>\r\nTemporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.\r\n</li>\r\n<li>\r\nAvoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \r\n</li>\r\n<li>\r\nBetter performance - all the above in fact can help reduce the total execution time.\r\n</li>\r\n</ul>\r\n\r\n\r\n\r\n<pre>\r\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\r\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\r\nstatic double pi_no_jit(array x, array y, array temp, int samples){\r\n        temp=x*x;\r\n        temp.eval();\r\n        temp+=y*y;\r\n        temp.eval();\r\n        temp=sqrt(temp);\r\n        temp.eval();\r\n        temp=temp<1;\r\n        temp.eval();\r\n        return 4.0 sum<float>(temp)/samples;\r\n}\r\n\r\nstatic double pi_jit(array x, array y, array temp,int samples){\r\n        temp = (sqrt(x*x+y*y)<1); \r\n        temp.eval();\r\n        return 4.0*sum<float>(temp)/samples;\r\n}\r\n</pre>\r\n\r\n\r\n\r\n\r\nThe above code (using ArrayFire) computes the value &pi; using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value &pi;. The accuracy of &pi; improves as the number of samples are increased, which motivates using additional sample.\r\nThere are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.\r\n\r\n[caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"]<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" /></a> Performance of JIT and Non-JIT implementations[/caption]\r\n\r\nThe above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses.\r\n\r\nThe number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past. In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?\r\n\r\n\r\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-13 19:07:21','2015-02-13 19:07:21','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7744,18528,'2015-02-13 19:26:11','2015-02-13 19:26:11','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on\nLinux OpenCL on Intel GPUs is implemented through an open source project called \n<a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> \n(pronnounced like \"ben yay\", a type of French pastry akin to a what we would \ncall a \"fritter\" in English). Below I have written a step-by-step guide\non how you can get Beignet running on an Ubuntu 14.10 system which has an\nIntel 3rd, 4th, or fifth generation Intel processor.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost\nthe Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you \nwill need to disable some register whitelist functionality every time you \nreboot your system. This can be accomplished by running \n<code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch\nfor shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is hopelessly broken.</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the \n<a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h2>Installing prerequisites</h2>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code>\ninstead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to\nthe correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to\ninstall these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify\nthat your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h2>Round 1: checkout and compile Beignet</h2>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure the following items are found otherwise the\nlibrary will not compile with the required components:</p>\n\n<ul>\n<li>OCL ICD header file</li>\n</ul>\n\n<p>If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running\nunit tests. These can be found in the <code>utest</code> folder. The unit tests require\nsome enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16\nkernel, you need to disable register whitelisting using a command similar to the\nfollowing:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that you will <em>always</em> need to run\nthis command after you reboot your system. The Beignet release notes mention\nthere is a kernel patch to fix this issue.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of\nthe tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a>\nlisted below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file\nin the build directory.</p>\n\n<h2>Verify <code>Beignet</code> is installed</h2>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using\n<code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly\ninstalled. Also note the extensions listed.</p>\n\n<h2>Applying the kernel patch to enable OpenCL shared local memory.</h2>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need\nto apply a kernel patch to enable shared/local memory. This is a fairly lengthy\nprocess that will require at least 70 GB of hard disk space and perhaps an\nhour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel\npatch. I have based my instructions on the \n[kernel compliation instructions for Ubuntu] (https://help.ubuntu.com/community/Kernel/Compile). \nInstructions for different OSes will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the\npatch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly\nsimple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an\neditor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and\ninstall the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel\nsource directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em>\nthe kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled)\nNow add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any\nluck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Ubuntu Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:26:11','2015-02-13 19:26:11','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7745,18528,'2015-02-13 19:26:16','2015-02-13 19:26:16','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of French pastry akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is hopelessly broken.</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h2>Installing prerequisites</h2>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h2>Round 1: checkout and compile Beignet</h2>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure the following items are found otherwise the library will not compile with the required components:</p>\n\n<ul>\n<li>OCL ICD header file</li>\n</ul>\n\n<p>If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that you will <em>always</em> need to run this command after you reboot your system. The Beignet release notes mention there is a kernel patch to fix this issue.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h2>Verify <code>Beignet</code> is installed</h2>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h2>Applying the kernel patch to enable OpenCL shared local memory.</h2>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for different OSes will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:26:16','2015-02-13 19:26:16','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7747,18528,'2015-02-13 19:34:15','2015-02-13 19:34:15','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of French pastry akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-<em>4</em>xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library \nwill not create an installable client driver.\nIf everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify <code>Beignet</code> is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for different OSes will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:34:15','2015-02-13 19:34:15','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7748,18528,'2015-02-13 19:34:47','2015-02-13 19:34:47','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of French pastry akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-<em>4</em>xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<p><code>sudo apt-get install build-essential g++ cmake \n    sudo apt-get install clang libclang-3.5-dev libclang-dev libclang1</code></p>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify <code>Beignet</code> is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for different OSes will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:34:47','2015-02-13 19:34:47','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7749,18528,'2015-02-13 19:35:26','2015-02-13 19:35:26','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of French pastry akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-<em>4</em>xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify <code>Beignet</code> is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for different OSes will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:35:26','2015-02-13 19:35:26','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7750,18528,'2015-02-13 19:35:56','2015-02-13 19:35:56','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of French pastry akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-<em>4</em>xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<p><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1</code></p>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify <code>Beignet</code> is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for different OSes will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:35:56','2015-02-13 19:35:56','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7751,18528,'2015-02-13 19:39:09','2015-02-13 19:39:09','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of French pastry akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-<em>4</em>xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify <code>Beignet</code> is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for different OSes will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:39:09','2015-02-13 19:39:09','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7752,18528,'2015-02-13 19:39:36','2015-02-13 19:39:36','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of French pastry akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-<em>4</em>xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify <code>Beignet</code> is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for different OSes will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:39:36','2015-02-13 19:39:36','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7753,18528,'2015-02-13 19:41:53','2015-02-13 19:41:53','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of French pastry akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-<em>4</em>xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:41:53','2015-02-13 19:41:53','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7754,18528,'2015-02-13 19:42:35','2015-02-13 19:42:35','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-<em>4</em>xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:42:35','2015-02-13 19:42:35','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7755,18528,'2015-02-13 19:43:18','2015-02-13 19:43:18','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4XXX) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:43:18','2015-02-13 19:43:18','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7756,18528,'2015-02-13 19:43:25','2015-02-13 19:43:25','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Round 1: checkout and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:43:25','2015-02-13 19:43:25','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7757,18528,'2015-02-13 19:46:29','2015-02-13 19:46:29','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34\n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1\n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo\n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..\n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make\n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run\n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit\n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install\n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd\n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`\n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`\n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.13.0\n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch\n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c\n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;\n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic\n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb\n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot\n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:46:29','2015-02-13 19:46:29','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7758,18528,'2015-02-13 19:49:11','2015-02-13 19:49:11','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make    \n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install   \n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.15.0    \n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:49:11','2015-02-13 19:49:11','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7759,18528,'2015-02-13 19:52:44','2015-02-13 19:52:44','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make    \n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install   \n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.16.0    \n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:52:44','2015-02-13 19:52:44','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7761,18528,'2015-02-13 19:55:26','2015-02-13 19:55:26','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<p><code>bash\nsudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1</code></p>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make    \n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install   \n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.16.0    \n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:55:26','2015-02-13 19:55:26','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7762,18528,'2015-02-13 19:55:44','2015-02-13 19:55:44','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or fifth generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source and install the library</p>\n\n<pre><code>make    \n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install   \n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.16.0    \n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 19:55:44','2015-02-13 19:55:44','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7763,17728,'2015-02-13 20:24:40','2015-02-13 20:24:40','<p>Development through a C++ interpreter (Cling) as opposed to a standard compiler is an amazing leap in productivity and a window into the newest features of C++. This post tells you how to get your own bleeding-edge C++ interpreter built right on top of the development version of LLVM. We give you a repeatable procedure via Amazon EC2. With our prescribed steps in place, you can always have an up-to-date development version of Cling. This allows quick testing and investigation of LLVM\'s newest features. You will also possess a development environment as a path to contributing to Cling or learning how Cling\'s innards push C++ code along.</p>\n\n<h3>Background Astoundingly, there</h3>\n\n<p><strong>is</strong> such a thing as a C++ interpreter! Thus, if you\'re interested in sticking to C for speed and efficiency, you\'re not confined to the code-compile-run-debug workflow. Living outside such a workflow lends jumps in productivity and a unique angle through which to see C++. Development of a serious C++ interpreter <a href=\"http://www.linuxjournal.com/article/2895\" target=\"_blank\">was undertaken by the wizards at CERN</a> starting at around 1995. (You might recognize this group as searchers <a href=\"http://home.web.cern.ch/topics/higgs-boson\" target=\"_blank\">for the Higgs Boson</a>). The C++ interpreter was dubbed <a href=\"https://root.cern.ch/drupal/content/cint\" target=\"_blank\">CINT</a> and was designed to support a major data analysis and visualization package known as <a href=\"https://root.cern.ch/drupal/\" target=\"_blank\">ROOT</a> (screenshot below). The system is certainly serious as it is giving researchers a way to investigate the ver fabric of the universe! <img src=\"http://root.cern.ch/drupal/sites/default/files/images/alieve-esd-pbpb.png\" alt=\"A ROOT screenshot being driven by a C++ interpreter (CINT). CINT is not a toy implementation - rather it is used to investigate the fabric of the universe.\" /> Over the last 20 years, CINT fell behind the evolving C++ language. In response, individuals at CERN began work on a replacement for CINT dubbed Cling with the strategy of leveraging LLVM to stay up to date with the growing C++ specification. Up until recently, the project has been rather nascent, but now is at the point where its functionality and build system make Cling worthwhile for use and contribution.</p>\n\n<h3>Building for x86 We present a build procedure leveraging Amazon EC2. By using the cloud, you are guaranteed to use the exact Linux version and hardware capabilities that we did in testing. We assume that you have an Amazon EC2 account and that you are willing to spend around two dollars on compute resources. 1. Create an</h3>\n\n<p><strong>m3.xlarge</strong> instance with the <a href=\"http://thecloudmarket.com/image/ami-aae18fc2--debian-jessie-amd64-hvm-2014-12-25-13-19-ebs\" target=\"_blank\">Debian Jessie AMI (ami-aae18fc2)</a>. Be sure to grab at least <strong>32Gb</strong> of storage along with the instance. 2. Boot the instance and login as <strong>admin</strong>. 3. Install required build packages on the instance,</p>\n\n<pre>sudo apt-get update\nsudo apt-get install build-essential git\n</pre>\n\n<ol>\n<li>Use </li>\n</ol>\n\n<p><a href=\"https://raw.githubusercontent.com/karies/cling-all-in-one/master/clone.sh\" target=\"_blank\">the distributed build script</a> from the Cling project to clone required source code and build an x86 version of Cling with all available cores.</p>\n\n<pre># perform this work with sufficient disk space\nwget https://raw.githubusercontent.com/karies/cling-all-in-one/master/clone.sh\nchmod +x clone.sh\n./clone.sh       # will require a few minutes to finish\n</pre>\n\n<p>...this will take quite a few minutes to finish...</p>\n\n<p><img style=\"padding: 20px\" src=\"https://dl.dropboxusercontent.com/u/96059047/cling_build.png\" alt=\"Building cling on an x86 EC2 instance\" /> 5. Take Cling for a spin!</p>\n\n<h3>Building for ARM Whereas an x86 build is readily supported by the Cling developers, building for ARM is not a standard build path. Thus, ARM build instructions are a bit more involved. 1. Log in as</h3>\n\n<p><strong>admin</strong> to the instance described, above, in the x86 instructions. 2. Install ARM hard-float compilation tools.</p>\n\n<pre># add Embedian as an installation source\nsudo bash -c \'echo deb http://emdebian.org/tools/debian/ jessie main > /etc/apt/sources.list.d/crosstools.list\'\nsudo apt-get install -y curl\ncurl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -\n\n# add arm hard-float as a supported architecture\nsudo dpkg --add-architecture armhf\nsudo apt-get update\n\n# install an ARM targeted cross compiler\nsudo apt-get install crossbuild-essential-armhf\n</pre>\n\n<ol>\n<li>Install QEMU-based ARM emulation. This is a fantastic feature of newer linux kernels: ARM executables are registered with the system so that under a normal invocation, QEMU is invoked under the hood so that it seems as though ARM binaries are native. </li>\n</ol>\n\n<pre># install QEMU emulation for ARM executables\nsudo apt-get install qemu binfmt-support qemu-user-static\nsudo update-binfmts --display\nsudo apt-get install libc6:armhf\n\n# compile an ARM executable\ncat > hello.c &lt;&lt; EOF\n \n#include &lt;stdio.h>\nint main(void) { return printf(\"Hello ARM!\\n\"); }\nEOF\narm-linux-gnueabihf-gcc -static -ohello hello.c\n\n# the following should indicate an ARM exe\nfile hello\n\n# running the executable with no fanfare should \n# invoke QEMU transparently to print \"Hello ARM!\"\n./hello\n</pre>\n\n<p>Having ARM emulation on our fast build machine makes debugging amazingly faster. 4. Install build tools: cmake and ninja.</p>\n\n<pre># cmake\nsudo apt-get install cmake\n\n# ninja requires a build\ngit clone git://github.com/martine/ninja.git && cd ninja\ngit checkout release\n./configure.py --bootstrap\nchmod +x ninja build.ninja\nsudo cp ninja build.ninja /usr/bin\n</pre>\n\n<ol>\n<li>Clone LLVM, Clang, and Cling to the </li>\n</ol>\n\n<p><strong>llvm</strong> directory. This directory differs from the instructions, above, so no worries if you\'re following these steps in the order of the blog post.</p>\n\n<pre># the following steps aasume this is done in the home directory\n# and therefore yielding ~/llvm \ngit clone http://root.cern.ch/git/llvm.git src\ncd src\ngit checkout cling-patches\ncd tools\ngit clone http://root.cern.ch/git/cling.git\ngit clone http://root.cern.ch/git/clang.git\ncd clang\ngit checkout cling-patches\n</pre>\n\n<ol>\n<li>Configure a build in the new </li>\n</ol>\n\n<p><strong>build</strong> directory using cmake. Note the intense and carefully crafted build flags required to do a successful cross compilation. <em>This took quite a bit of debugging to lock down.</em></p>\n\n<pre>mkdir -p build && cd build\n\ncmake -G Ninja ~/llvm -DCMAKE_CROSSCOMPILING=True -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=armv7 -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_INSTALL_PREFIX=/home/admin/build/install -DLLVM_TABLEGEN=/usr/bin/llvm-tblgen-3.5 -DCLANG_TABLEGEN=/usr/bin/clang-tblgen-3.5 -DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf -DLLVM_HOST_TRIPLE=arm--linux-gnueabihf -DLLVM_TARGET_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS=\'-mcpu=cortex-a9 -I/usr/include/arm-linux-gnueabihf/c++/4.9 -I/usr/lib/gcc/arm-linux-gnueabihf/4.9/include -mfloat-abi=hard\'\n</pre>\n\n<ol>\n<li>Do a build with ninja and install to the </li>\n</ol>\n\n<p><strong>install</strong> subdirectory.</p>\n\n<pre>mkdir -p install\nninja && ninja install     # this will take some time\n</pre>\n\n<ol>\n<li>Fire up Cling! </li>\n</ol>\n\n<pre>cd install/bin\n./cling\n</pre>\n','Building a C++ Interpreter (Cling) for x86 and ARM','','inherit','open','open','','7681-revision-v1','','','2015-02-13 20:24:40','2015-02-13 20:24:40','',7681,'http://sandbox.arrayfire.com/7681-revision-v1/',0,'revision','',0),(7764,17728,'2015-02-13 20:25:06','2015-02-13 20:25:06','<p>Coffeescript can be a great alternative to bash scripting when you need a prototype to run across many platforms (especially windows) without a ton of fuss.</p>\n','Coffeescript as a Cross-Platform BASH Standin','','inherit','open','open','','6501-revision-v1','','','2015-02-13 20:25:06','2015-02-13 20:25:06','',6501,'http://sandbox.arrayfire.com/6501-revision-v1/',0,'revision','',0),(7766,18528,'2015-02-13 21:09:37','2015-02-13 21:09:37','<p>The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions, comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is &#96;`met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (&#96;`function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed. This JIT compilation technique has multiple benefits: \n*   A reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets. \n*   Better cache performance - there are many instances in which the memory required by a single element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \n*   Temporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory. \n*   Avoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \n*   Better performance - all the above in fact can help reduce the total execution time.</p>\n\n<pre>// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\nstatic double pi_no_jit(array x, array y, array temp, int samples){\n        temp=x*x;\n        temp.eval();\n        temp+=y*y;\n        temp.eval();\n        temp=sqrt(temp);\n        temp.eval();\n        temp=temp&lt;1;\n        temp.eval();\n        return 4.0 sum&lt;float>(temp)/samples;\n}\n\nstatic double pi_jit(array x, array y, array temp,int samples){\n        temp = (sqrt(x*x+y*y)&lt;1); \n        temp.eval();\n        return 4.0*sum&lt;float>(temp)/samples;\n}\n</pre>\n\n<p>The above code (using ArrayFire) computes the value π using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value π. The accuracy of π improves as the number of samples are increased, which motivates using additional sample. There are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation. [caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"]</p>\n\n<p><a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" /></a> Performance of JIT and Non-JIT implementations[/caption] The above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses. The number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past. In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?</p>\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-autosave-v1','','','2015-02-13 21:09:37','2015-02-13 21:09:37','',7702,'http://sandbox.arrayfire.com/7702-autosave-v1/',0,'revision','',0),(7767,17729,'2015-02-13 21:36:37','2015-02-13 21:36:37','<p>In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600. \n*   Bilateral Filter\n*   Erosion/Dilation\n*   2D Convolution\n*   2D Fast Fourier Transform for double precision numbers\n*   2D Fast Fourier Transform for single precision numbers\n*   Median Filter\n*   Resize\n*   Rotate\n*   Scan 1D Array\n*   Reduction of 1D Array\n*   Sort\n*   Matrix Transpose</p>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n','ArrayFire: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 21:36:37','2015-02-13 21:36:37','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7768,18528,'2015-02-13 21:37:58','2015-02-13 21:37:58','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben-yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or 5th generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost, the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead, then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed, otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source using</p>\n\n<pre><code>make    \n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install   \n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the &#91;kernel compliation instructions for Ubuntu&#93; (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different.</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.16.0    \n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 21:37:58','2015-02-13 21:37:58','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7769,17729,'2015-02-13 21:43:16','2015-02-13 21:43:16','<p>In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600. * Bilateral Filter * Erosion/Dilation * 2D Convolution * 2D Fast Fourier Transform for double precision numbers * 2D Fast Fourier Transform for single precision numbers * Median Filter * Resize * Rotate * Scan 1D Array * Reduction of 1D Array * Sort * Matrix Transpose</p>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n','ArrayFire: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 21:43:16','2015-02-13 21:43:16','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7770,18528,'2015-02-13 21:43:42','2015-02-13 21:43:42','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben-yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or 5th generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost, the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead, then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed, otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source using</p>\n\n<pre><code>make    \n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install   \n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the [kernel compliation instructions for Ubuntu] (https://help.ubuntu.com/community/Kernel/Compile). Instructions for other variants of Linux will be significantly different.</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.16.0    \n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 21:43:42','2015-02-13 21:43:42','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7771,18528,'2015-02-13 21:44:14','2015-02-13 21:44:14','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben-yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or 5th generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost, the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead, then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed, otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source using</p>\n\n<pre><code>make    \n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install   \n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the \n<a href=\"https://help.ubuntu.com/community/Kernel/Compile\">kernel compliation instructions for Ubuntu</a>. Instructions for other variants of Linux will be significantly different.</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.16.0    \n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 21:44:14','2015-02-13 21:44:14','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7772,17729,'2015-02-13 21:44:23','2015-02-13 21:44:23','<p>In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600. * Bilateral Filter * Erosion/Dilation * 2D Convolution * 2D Fast Fourier Transform for double precision numbers * 2D Fast Fourier Transform for single precision numbers * Median Filter * Resize * Rotate * Scan 1D Array * Reduction of 1D Array * Sort * Matrix Transpose</p>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 21:44:23','2015-02-13 21:44:23','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7773,18528,'2015-02-13 21:45:14','2015-02-13 21:45:14','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben-yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or 5th generation Intel processor. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost, the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead, then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed, otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source using</p>\n\n<pre><code>make    \n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install   \n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the <a href=\"https://help.ubuntu.com/community/Kernel/Compile\">kernel compilation instructions for Ubuntu</a>. Instructions for other variants of Linux will be significantly different.</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.16.0    \n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-13 21:45:14','2015-02-13 21:45:14','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7774,17729,'2015-02-13 21:50:37','2015-02-13 21:50:37','<p>In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600. \n* Bilateral Filter \n* Erosion/Dilation \n* 2D Convolution \n* 2D Fast Fourier Transform for double precision numbers \n* 2D Fast Fourier Transform for single precision numbers \n* Median Filter \n* Resize \n* Rotate \n* Scan 1D Array \n* Reduction of 1D Array \n* Sort \n* Matrix Transpose</p>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 21:50:37','2015-02-13 21:50:37','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7775,17729,'2015-02-13 21:50:40','2015-02-13 21:50:40','<p>In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600. * Bilateral Filter * Erosion/Dilation * 2D Convolution * 2D Fast Fourier Transform for double precision numbers * 2D Fast Fourier Transform for single precision numbers * Median Filter * Resize * Rotate * Scan 1D Array * Reduction of 1D Array * Sort * Matrix Transpose</p>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 21:50:40','2015-02-13 21:50:40','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7776,17729,'2015-02-13 21:54:18','2015-02-13 21:54:18','<p>In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li>Bilateral Filter</li>\n<li>Erosion/Dilation </li>\n<li>2D Convolution</li>\n<li>2D Fast Fourier Transform for double precision numbers</li>\n<li>2D Fast Fourier Transform for single precision numbers</li>\n<li>Median Filter</li>\n<li>Resize</li>\n<li>Rotate</li>\n<li>Scan 1D Array</li>\n<li>Reduction of 1D Array</li>\n<li>Sort</li>\n<li>Matrix Transpose</li>\n</ul>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 21:54:18','2015-02-13 21:54:18','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7777,17729,'2015-02-13 21:56:34','2015-02-13 21:56:34','<p>In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li>Bilateral Filter</li>\n<li>Erosion/Dilation </li>\n<li>2D Convolution</li>\n<li>2D Fast Fourier Transform for single precision numbers</li>\n<li>Median Filter</li>\n<li>Resize</li>\n<li>Rotate</li>\n<li>Scan 1D Array</li>\n<li>Reduction of 1D Array</li>\n<li>Sort</li>\n<li>Matrix Transpose</li>\n</ul>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1123885560&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 21:56:34','2015-02-13 21:56:34','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7778,17729,'2015-02-13 22:04:37','2015-02-13 22:04:37','<p>In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li>Bilateral Filter</li>\n<li>Erosion/Dilation </li>\n<li>2D Convolution</li>\n<li>2D Fast Fourier Transform for single precision numbers</li>\n<li>Median Filter</li>\n<li>Resize</li>\n<li>Rotate</li>\n<li>Scan 1D Array</li>\n<li>Reduction of 1D Array</li>\n<li>Sort</li>\n<li>Matrix Transpose</li>\n</ul>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 22:04:37','2015-02-13 22:04:37','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7779,17729,'2015-02-13 22:09:55','2015-02-13 22:09:55','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600. As we get our hands on additional hardware, we will keep posting you guys with comparison benchmarks.</p>\n\n<ul>\n<li>Bilateral Filter</li>\n<li>Erosion/Dilation </li>\n<li>2D Convolution</li>\n<li>2D Fast Fourier Transform for single precision numbers</li>\n<li>Median Filter</li>\n<li>Resize</li>\n<li>Rotate</li>\n<li>Scan 1D Array</li>\n<li>Reduction of 1D Array</li>\n<li>Sort</li>\n<li>Matrix Transpose</li>\n</ul>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-13 22:09:55','2015-02-13 22:09:55','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7781,18132,'2015-02-14 18:03:32','2015-02-14 18:03:32','<p>Development through a C++ interpreter (Cling) as opposed to a standard compiler is an amazing leap in productivity and a window into the newest features of C++. This post tells you how to get your own bleeding-edge C++ interpreter built right on top of the development version of LLVM on EC2.</p>\n\n<p>With our prescribed steps in place, you can always have an up-to-date development version of Cling. This allows quick testing and investigation of LLVM\'s newest features. You will also possess a development environment as a path to contributing to Cling or learning how Cling\'s innards push C++ code along.</p>\n\n<h3>Background</h3>\n\n<p>Astoundingly, there <strong>is</strong> such a thing as a C++ interpreter! Thus, if you\'re interested in sticking to C for speed and efficiency, you\'re not confined to the code-compile-run-debug workflow. Living outside such a workflow lends jumps in productivity and a unique angle through which to see C++. Development of a serious C++ interpreter <a href=\"http://www.linuxjournal.com/article/2895\" target=\"_blank\">was undertaken by the wizards at CERN</a> starting at around 1995. (You might recognize this group as searchers <a href=\"http://home.web.cern.ch/topics/higgs-boson\" target=\"_blank\">for the Higgs Boson</a>). The C++ interpreter was dubbed <a href=\"https://root.cern.ch/drupal/content/cint\" target=\"_blank\">CINT</a> and was designed to support a major data analysis and visualization package known as <a href=\"https://root.cern.ch/drupal/\" target=\"_blank\">ROOT</a> (screenshot below). The system is certainly serious as it is giving researchers a way to investigate the ver fabric of the universe! <img src=\"http://root.cern.ch/drupal/sites/default/files/images/alieve-esd-pbpb.png\" alt=\"A ROOT screenshot being driven by a C++ interpreter (CINT). CINT is not a toy implementation - rather it is used to investigate the fabric of the universe.\" /> Over the last 20 years, CINT fell behind the evolving C++ language. In response, individuals at CERN began work on a replacement for CINT dubbed Cling with the strategy of leveraging LLVM to stay up to date with the growing C++ specification. Up until recently, the project has been rather nascent, but now is at the point where its functionality and build system make Cling worthwhile for use and contribution.</p>\n\n<h3>Building for x86 We present a build procedure leveraging Amazon EC2. By using the cloud, you are guaranteed to use the exact Linux version and hardware capabilities that we did in testing. We assume that you have an Amazon EC2 account and that you are willing to spend around two dollars on compute resources. 1. Create an</h3>\n\n<p><strong>m3.xlarge</strong> instance with the <a href=\"http://thecloudmarket.com/image/ami-aae18fc2--debian-jessie-amd64-hvm-2014-12-25-13-19-ebs\" target=\"_blank\">Debian Jessie AMI (ami-aae18fc2)</a>. Be sure to grab at least <strong>32Gb</strong> of storage along with the instance. 2. Boot the instance and login as <strong>admin</strong>. 3. Install required build packages on the instance,</p>\n\n<pre>sudo apt-get update\nsudo apt-get install build-essential git\n</pre>\n\n<ol>\n<li>Use </li>\n</ol>\n\n<p><a href=\"https://raw.githubusercontent.com/karies/cling-all-in-one/master/clone.sh\" target=\"_blank\">the distributed build script</a> from the Cling project to clone required source code and build an x86 version of Cling with all available cores.</p>\n\n<pre># perform this work with sufficient disk space\nwget https://raw.githubusercontent.com/karies/cling-all-in-one/master/clone.sh\nchmod +x clone.sh\n./clone.sh       # will require a few minutes to finish\n</pre>\n\n<p>...this will take quite a few minutes to finish...</p>\n\n<p><img style=\"padding: 20px\" src=\"https://dl.dropboxusercontent.com/u/96059047/cling_build.png\" alt=\"Building cling on an x86 EC2 instance\" /> 5. Take Cling for a spin!</p>\n\n<h3>Building for ARM Whereas an x86 build is readily supported by the Cling developers, building for ARM is not a standard build path. Thus, ARM build instructions are a bit more involved. 1. Log in as</h3>\n\n<p><strong>admin</strong> to the instance described, above, in the x86 instructions. 2. Install ARM hard-float compilation tools.</p>\n\n<pre># add Embedian as an installation source\nsudo bash -c \'echo deb http://emdebian.org/tools/debian/ jessie main > /etc/apt/sources.list.d/crosstools.list\'\nsudo apt-get install -y curl\ncurl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -\n\n# add arm hard-float as a supported architecture\nsudo dpkg --add-architecture armhf\nsudo apt-get update\n\n# install an ARM targeted cross compiler\nsudo apt-get install crossbuild-essential-armhf\n</pre>\n\n<ol>\n<li>Install QEMU-based ARM emulation. This is a fantastic feature of newer linux kernels: ARM executables are registered with the system so that under a normal invocation, QEMU is invoked under the hood so that it seems as though ARM binaries are native. </li>\n</ol>\n\n<pre># install QEMU emulation for ARM executables\nsudo apt-get install qemu binfmt-support qemu-user-static\nsudo update-binfmts --display\nsudo apt-get install libc6:armhf\n\n# compile an ARM executable\ncat > hello.c &lt;&lt; EOF\n \n#include &lt;stdio.h>\nint main(void) { return printf(\"Hello ARM!\\n\"); }\nEOF\narm-linux-gnueabihf-gcc -static -ohello hello.c\n\n# the following should indicate an ARM exe\nfile hello\n\n# running the executable with no fanfare should \n# invoke QEMU transparently to print \"Hello ARM!\"\n./hello\n</pre>\n\n<p>Having ARM emulation on our fast build machine makes debugging amazingly faster. 4. Install build tools: cmake and ninja.</p>\n\n<pre># cmake\nsudo apt-get install cmake\n\n# ninja requires a build\ngit clone git://github.com/martine/ninja.git && cd ninja\ngit checkout release\n./configure.py --bootstrap\nchmod +x ninja build.ninja\nsudo cp ninja build.ninja /usr/bin\n</pre>\n\n<ol>\n<li>Clone LLVM, Clang, and Cling to the </li>\n</ol>\n\n<p><strong>llvm</strong> directory. This directory differs from the instructions, above, so no worries if you\'re following these steps in the order of the blog post.</p>\n\n<pre># the following steps aasume this is done in the home directory\n# and therefore yielding ~/llvm \ngit clone http://root.cern.ch/git/llvm.git src\ncd src\ngit checkout cling-patches\ncd tools\ngit clone http://root.cern.ch/git/cling.git\ngit clone http://root.cern.ch/git/clang.git\ncd clang\ngit checkout cling-patches\n</pre>\n\n<ol>\n<li>Configure a build in the new </li>\n</ol>\n\n<p><strong>build</strong> directory using cmake. Note the intense and carefully crafted build flags required to do a successful cross compilation. <em>This took quite a bit of debugging to lock down.</em></p>\n\n<pre>mkdir -p build && cd build\n\ncmake -G Ninja ~/llvm -DCMAKE_CROSSCOMPILING=True -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=armv7 -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_INSTALL_PREFIX=/home/admin/build/install -DLLVM_TABLEGEN=/usr/bin/llvm-tblgen-3.5 -DCLANG_TABLEGEN=/usr/bin/clang-tblgen-3.5 -DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf -DLLVM_HOST_TRIPLE=arm--linux-gnueabihf -DLLVM_TARGET_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS=\'-mcpu=cortex-a9 -I/usr/include/arm-linux-gnueabihf/c++/4.9 -I/usr/lib/gcc/arm-linux-gnueabihf/4.9/include -mfloat-abi=hard\'\n</pre>\n\n<ol>\n<li>Do a build with ninja and install to the </li>\n</ol>\n\n<p><strong>install</strong> subdirectory.</p>\n\n<pre>mkdir -p install\nninja && ninja install     # this will take some time\n</pre>\n\n<ol>\n<li>Fire up Cling! </li>\n</ol>\n\n<pre>cd install/bin\n./cling\n</pre>\n','Building a C++ Interpreter (Cling) for x86 and ARM','','inherit','open','open','','7681-revision-v1','','','2015-02-14 18:03:32','2015-02-14 18:03:32','',7681,'http://sandbox.arrayfire.com/7681-revision-v1/',0,'revision','',0),(7783,18132,'2015-02-14 18:47:32','2015-02-14 18:47:32','<p>Development through a C++ interpreter (Cling) as opposed to a standard compiler is an amazing leap in productivity and a window into the newest features of C++. This post tells you how to get your own bleeding-edge C++ interpreter built right on top of the development version of LLVM. We give you a repeatable procedure via Amazon EC2.</p>\n\n<p>With our prescribed steps in place, you can always have an up-to-date development version of Cling. This allows quick testing and investigation of LLVM\'s newest features. You will also possess a development environment as a path to contributing to Cling or learning how Cling\'s innards push C++ code along.</p>\n\n<h3>Background</h3>\n\n<p>Astoundingly, there <strong>is</strong> such a thing as a C++ interpreter! Thus, if you\'re interested in sticking to C for speed and efficiency, you\'re not confined to the code-compile-run-debug workflow. Living outside such a workflow lends jumps in productivity and a unique angle through which to see C++.</p>\n\n<p>Development of a serious C++ interpreter <a href=\"http://www.linuxjournal.com/article/2895\" target=\"_blank\">was undertaken by the wizards at CERN</a> starting at around 1995. (You might recognize this group as searchers <a href=\"http://home.web.cern.ch/topics/higgs-boson\" target=\"_blank\">for the Higgs Boson</a>). The C++ interpreter was dubbed <a href=\"https://root.cern.ch/drupal/content/cint\" target=\"_blank\">CINT</a> and was designed to support a major data analysis and visualization package known as <a href=\"https://root.cern.ch/drupal/\" target=\"_blank\">ROOT</a> (screenshot below). The system is certainly serious as it is giving researchers a way to investigate the ver fabric of the universe!</p>\n\n<p><img src=\"http://root.cern.ch/drupal/sites/default/files/images/alieve-esd-pbpb.png\" alt=\"A ROOT screenshot being driven by a C++ interpreter (CINT). CINT is not a toy implementation - rather it is used to investigate the fabric of the universe.\" /></p>\n\n<p>Over the last 20 years, CINT fell behind the evolving C++ language. In response, individuals at CERN began work on a replacement for CINT dubbed Cling with the strategy of leveraging LLVM to stay up to date with the growing C++ specification. Up until recently, the project has been rather nascent, but now is at the point where its functionality and build system make Cling worthwhile for use and contribution.</p>\n\n<h3>Building for x86</h3>\n\n<p>We present a build procedure leveraging Amazon EC2. By using the cloud, you are guaranteed to use the exact Linux version and hardware capabilities that we did in testing. We assume that you have an Amazon EC2 account and that you are willing to spend around two dollars on compute resources.</p>\n\n<ol>\n<li><p>Create an <strong>m3.xlarge</strong> instance with the <a href=\"http://thecloudmarket.com/image/ami-aae18fc2--debian-jessie-amd64-hvm-2014-12-25-13-19-ebs\" target=\"_blank\">Debian Jessie AMI (ami-aae18fc2)</a>. Be sure to grab at least <strong>32Gb</strong> of storage.</p></li>\n<li><p>Boot the instance and login as <strong>admin</strong>.</p></li>\n<li><p>Install required build packages on the instance,</p></li>\n</ol>\n\n<pre>\nsudo apt-get update\nsudo apt-get install build-essential git\n</pre>\n\n<ol>\n<li>Use <a href=\"https://raw.githubusercontent.com/karies/cling-all-in-one/master/clone.sh\" target=\"_blank\">the distributed build script</a> from the Cling project to clone required source code and build an x86 version of Cling with all available cores.</li>\n</ol>\n\n<pre>\nwget https://raw.githubusercontent.com/karies/cling-all-in-one/master/clone.sh\nchmod +x clone.sh\n./clone.sh       # will require a few minutes to finish\n</pre>\n\n<p>...this will take quite a few minutes to finish...</p>\n\n<p><img style=\"padding: 20px\" src=\"https://dl.dropboxusercontent.com/u/96059047/cling_build.png\" alt=\"Building cling on an x86 EC2 instance\" /></p>\n\n<ol>\n<li>Take Cling for a spin!</li>\n</ol>\n\n<h3>Building for ARM</h3>\n\n<p>Whereas an x86 build is readily supported by the Cling developers, building for ARM is not a standard build path. Thus, ARM build instructions are a bit more involved.</p>\n\n<ol>\n<li><p>Log in as <strong>admin</strong> to the instance described, above, in the x86 instructions.</p></li>\n<li><p>Install ARM hard-float compilation tools.</p></li>\n</ol>\n\n<pre>\n# add Embedian as an installation source\nsudo bash -c \'echo deb http://emdebian.org/tools/debian/ jessie main > /etc/apt/sources.list.d/crosstools.list\'\nsudo apt-get install -y curl\ncurl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -\n\n# add arm hard-float as a supported architecture\nsudo dpkg --add-architecture armhf\nsudo apt-get update\n\n# install an ARM targeted cross compiler\nsudo apt-get install crossbuild-essential-armhf\n</pre>\n\n<ol>\n<li>Install QEMU-based ARM emulation. This is a fantastic feature of newer linux kernels: ARM executables are registered with the system so that under a normal invocation, QEMU is invoked under the hood so that it seems as though ARM binaries are native.</li>\n</ol>\n\n<pre>\n# install QEMU emulation for ARM executables\nsudo apt-get install qemu binfmt-support qemu-user-static\nsudo update-binfmts --display\nsudo apt-get install libc6:armhf\n\n# compile an ARM executable\ncat > hello.c << EOF\n \n#include <stdio.h>\nint main(void) { return printf(\"Hello ARM!\\n\"); }\nEOF\narm-linux-gnueabihf-gcc -static -ohello hello.c\n\n# the following should indicate an ARM exe\nfile hello\n\n# running the executable with no fanfare should \n# invoke QEMU transparently to print \"Hello ARM!\"\n./hello\n</pre>\n\n<p>Having ARM emulation on our fast build machine makes debugging amazingly faster.</p>\n\n<ol>\n<li>Install build tools: cmake and ninja.</li>\n</ol>\n\n<pre>\n# cmake\nsudo apt-get install cmake\n\n# ninja requires a build\ngit clone git://github.com/martine/ninja.git && cd ninja\ngit checkout release\n./configure.py --bootstrap\nchmod +x ninja build.ninja\nsudo cp ninja build.ninja /usr/bin\n</pre>\n\n<ol>\n<li>Clone LLVM, Clang, and Cling to the <strong>llvm</strong> directory. This directory differs from the instructions, above, so no worries if you\'re following these steps in the order of the blog post.</li>\n</ol>\n\n<pre>\n# the following steps aasume this is done in the home directory\n# and therefore yielding ~/llvm \ngit clone http://root.cern.ch/git/llvm.git src\ncd src\ngit checkout cling-patches\ncd tools\ngit clone http://root.cern.ch/git/cling.git\ngit clone http://root.cern.ch/git/clang.git\ncd clang\ngit checkout cling-patches\n</pre>\n\n<ol>\n<li>Configure a build in the new <strong>build</strong> directory using cmake. Note the intense and carefully crafted build flags required to do a successful cross compilation. <em>This took quite a bit of debugging to lock down.</em></li>\n</ol>\n\n<pre>\nmkdir -p build && cd build\ncmake -G Ninja ~/llvm -DCMAKE_CROSSCOMPILING=True -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=armv7 -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_INSTALL_PREFIX=/home/admin/build/install -DLLVM_TABLEGEN=/usr/bin/llvm-tblgen-3.5 -DCLANG_TABLEGEN=/usr/bin/clang-tblgen-3.5 -DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf -DLLVM_HOST_TRIPLE=arm--linux-gnueabihf -DLLVM_TARGET_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DCMAKE_CXX_FLAGS=\'-mcpu=cortex-a9 -I/usr/include/arm-linux-gnueabihf/c++/4.9 -I/usr/lib/gcc/arm-linux-gnueabihf/4.9/include -mfloat-abi=hard\'\n</pre>\n\n<ol>\n<li>Do a build with ninja and install to the <strong>install</strong> subdirectory.</li>\n</ol>\n\n<pre>\n# ninja here\n</pre>\n\n<ol>\n<li>Fire up Cling!</li>\n</ol>\n','Building a C++ Interpreter (Cling) for x86 and ARM','','inherit','open','open','','7681-revision-v1','','','2015-02-14 18:47:32','2015-02-14 18:47:32','',7681,'http://sandbox.arrayfire.com/7681-revision-v1/',0,'revision','',0),(7786,18528,'2015-02-15 16:35:19','2015-02-15 16:35:19','<p>Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben-yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or 5th <a href=\"http://ark.intel.com/\">generation Intel processor</a>. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.</p>\n\n<p>There are several little caveats which need to be discussed up front. Foremost, the Beignet project supports the following hardware:</p>\n\n<ul>\n<li>3rd Generation Intel Core Processors</li>\n<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\n\n<p>There are also a few noteworthy issues of which you should be aware:</p>\n\n<ul>\n<li><p>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</p></li>\n<li><p>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</p></li>\n<li><p>There is no double precision support</p></li>\n<li><p>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</p></li>\n</ul>\n\n<p>There are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.</p>\n\n<h3>Installing prerequisites</h3>\n\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\n</code></pre>\n\n<p>Note, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead, then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:</p>\n\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\n\n<p>If you want to use the standard OpenCL ICD loader, you will also need to install these packages:</p>\n\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\n\n<p>I would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:</p>\n\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n\n<h3>Check out and compile Beignet</h3>\n\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\n\n<p>During the CMake stage, ensure that the OCL ICD header file is installed, otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source using</p>\n\n<pre><code>make    \n</code></pre>\n\n<p>(Note, you can do make -jN with N > 1 to do a parallel build.)<br />\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:</p>\n\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\n\n<p>If a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:</p>\n\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\n\n<p>and try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.</p>\n\n<p>If most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.</p>\n\n<p>If all was well, install Beignet to your system:</p>\n\n<pre><code>sudo make install   \n</code></pre>\n\n<p>You can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.</p>\n\n<h3>Verify Beignet is installed</h3>\n\n<p>In a terminal run the <code>clinfo</code> program. You should see something like this:</p>\n\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\n\n<p>Take note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.</p>\n\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\n\n<p>If you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.</p>\n\n<p>In the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the <a href=\"https://help.ubuntu.com/community/Kernel/Compile\">kernel compilation instructions for Ubuntu</a>. Instructions for other variants of Linux will be significantly different.</p>\n\n<p>Install prerequisites:</p>\n\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\n\n<p>Make a working directory for the kernel somewhere and download the source</p>\n\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\n\n<p>Next we see if we can automatically apply the patch. First download the patch:</p>\n\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Now <code>cd</code> into the kernel directory:</p>\n\n<pre><code>cd linux-3.16.0    \n</code></pre>\n\n<p>Check some details about the patch</p>\n\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>Try automatically applying the patch:</p>\n\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it automatically applies with no errors, just apply it:</p>\n\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\n\n<p>If it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:</p>\n\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\n\n<p>In the <code>i915_gem_do_execbuffer</code> function, find the following code:</p>\n\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\n\n<p>And add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:</p>\n\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\n\n<p>This was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.</p>\n\n<p>Now we build the new kernel. Run the following commands from within the kernel source directory:</p>\n\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\n\n<p>This will build some Debian packages and place them in the directory <em>above</em> the kernel source root.</p>\n\n<p>After the kernel has compiled, install it:</p>\n\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n\n<p>(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:</p>\n\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\n\n<p>Now go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.</p>\n','OpenCL on Intel HD / Iris graphics on Linux','','inherit','open','open','','7739-revision-v1','','','2015-02-15 16:35:19','2015-02-15 16:35:19','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(7788,17729,'2015-02-17 16:58:43','2015-02-17 16:58:43','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600. As we get our hands on additional hardware, we will keep posting you guys with comparison benchmarks.</p>\n\n<ul>\n<li>Bilateral Filter</li>\n<li>Erosion/Dilation </li>\n<li>2D Convolution</li>\n<li>2D Fast Fourier Transform for single precision numbers</li>\n<li>Median Filter</li>\n<li>Resize</li>\n<li>Rotate</li>\n<li>Scan 1D Array</li>\n<li>Reduction of 1D Array</li>\n<li>Sort</li>\n<li>Matrix Transpose</li>\n</ul>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<p>We might be able to boost the performance on Intel integrated graphics a little if we modify the kernel algorithms to use vector types. Keep an eye out for a post with updated benchmarks where Intel processors use vectorized kernels.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 16:58:43','2015-02-17 16:58:43','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7789,17729,'2015-02-17 17:23:02','2015-02-17 17:23:02','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li>Bilateral Filter</li>\n<li>Erosion/Dilation </li>\n<li>2D Convolution</li>\n<li>2D Fast Fourier Transform</li>\n<li>Median Filter</li>\n<li>Resize</li>\n<li>Rotate</li>\n<li>Scan 1D Array</li>\n<li>Reduction of 1D Array</li>\n<li>Sort</li>\n<li>Matrix Transpose</li>\n</ul>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<p>We might be able to boost the performance on Intel integrated graphics a little if we modify the kernel algorithms to use vector types. Keep an eye out for a post with updated benchmarks where Intel processors use vectorized kernels.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 17:23:02','2015-02-17 17:23:02','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7790,17729,'2015-02-17 17:38:52','2015-02-17 17:38:52','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li>[Rotate]#(rotate)</li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe name=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"340\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel systems was outperformed by the AMD APU. We believe that we will be to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 17:38:52','2015-02-17 17:38:52','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7792,17729,'2015-02-17 17:41:59','2015-02-17 17:41:59','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe name=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel systems was outperformed by the AMD APU. We believe that we will be to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 17:41:59','2015-02-17 17:41:59','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7793,17729,'2015-02-17 17:43:21','2015-02-17 17:43:21','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe name=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel systems was outperformed by the AMD APU. We believe that we will be to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 17:43:21','2015-02-17 17:43:21','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7794,17729,'2015-02-17 17:47:08','2015-02-17 17:47:08','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe name=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel systems was outperformed by the AMD APU. We believe that we will be to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 17:47:08','2015-02-17 17:47:08','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7795,17729,'2015-02-17 17:48:54','2015-02-17 17:48:54','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"480\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel systems was outperformed by the AMD APU. We believe that we will be to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 17:48:54','2015-02-17 17:48:54','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7796,17729,'2015-02-17 17:49:16','2015-02-17 17:49:16','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against Intel i7-4790K HD 4600.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel systems was outperformed by the AMD APU. We believe that we will be to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 17:49:16','2015-02-17 17:49:16','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7797,17729,'2015-02-17 17:53:07','2015-02-17 17:53:07','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a AMD A10-7850K APU against <a href=\"http://ark.intel.com/products/80807/Intel-Core-i7-4790K-Processor-8M-Cache-up-to-4_40-GHz\">Intel i7-4790K HD 4600</a>.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel systems was outperformed by the AMD APU. We believe that we will be to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 17:53:07','2015-02-17 17:53:07','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7798,17729,'2015-02-17 17:57:18','2015-02-17 17:57:18','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a <a href=\"http://www.cpu-world.com/CPUs/Bulldozer/AMD-A10-Series%20A10-7850K.html\">AMD A10-7850K APU</a> against <a href=\"http://ark.intel.com/products/80807/Intel-Core-i7-4790K-Processor-8M-Cache-up-to-4_40-GHz\">Intel i7-4790K HD 4600</a>.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel systems was outperformed by the AMD APU. We believe that we will be to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 17:57:18','2015-02-17 17:57:18','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7799,17729,'2015-02-17 18:01:53','2015-02-17 18:01:53','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a <a href=\"http://www.anandtech.com/show/8291/amd-a10-7800-review-65w-kaveri\">AMD A10-7850K APU</a> against <a href=\"http://www.anandtech.com/show/8227/devils-canyon-review-intel-core-i7-4790k-and-i5-4690k\">Intel i7-4790K HD 4600</a>.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel systems was outperformed by the AMD APU. We believe that we will be to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 18:01:53','2015-02-17 18:01:53','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7800,17729,'2015-02-17 18:12:12','2015-02-17 18:12:12','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we pitch the benchmarks of the following ArrayFire functions on a <a href=\"http://www.anandtech.com/show/8291/amd-a10-7800-review-65w-kaveri\">AMD A10-7850K APU</a> against <a href=\"http://www.anandtech.com/show/8227/devils-canyon-review-intel-core-i7-4790k-and-i5-4690k\">Intel i7-4790K HD 4600</a>.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel system was outperformed by the AMD APU. We believe that we will be able to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell','','inherit','open','open','','7712-revision-v1','','','2015-02-17 18:12:12','2015-02-17 18:12:12','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7801,17729,'2015-02-17 20:07:27','2015-02-17 20:07:27','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we focus on the GPU benchmarks of <a href=\"http://www.anandtech.com/show/8291/amd-a10-7800-review-65w-kaveri\">AMD A10-7850K APU</a> &amp; <a href=\"http://www.anandtech.com/show/8227/devils-canyon-review-intel-core-i7-4790k-and-i5-4690k\">Intel i7-4790K HD 4600</a> for the following ArrayFire functions.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel system was outperformed by the AMD APU. We believe that we will be able to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell Part-1','','inherit','open','open','','7712-autosave-v1','','','2015-02-17 20:07:27','2015-02-17 20:07:27','',7712,'http://sandbox.arrayfire.com/7712-autosave-v1/',0,'revision','',0),(7802,17729,'2015-02-17 20:08:08','2015-02-17 20:08:08','<p>We have had queries in the past requesting benchmarks on integrated GPUs of Intel and AMD processors. This post is a modest attempt to answer those questions. In this post, we focus on the GPU benchmarks of <a href=\"http://www.anandtech.com/show/8291/amd-a10-7800-review-65w-kaveri\">AMD A10-7850K APU</a> &amp; <a href=\"http://www.anandtech.com/show/8227/devils-canyon-review-intel-core-i7-4790k-and-i5-4690k\">Intel i7-4790K HD 4600</a> for the following ArrayFire functions.</p>\n\n<ul>\n<li><a href=\"#bilateral\">Bilateral Filter</a></li>\n<li><a href=\"#erode\">Erosion/Dilation</a></li>\n<li><a href=\"#conv\">2D Convolution</a></li>\n<li><a href=\"#fft\">2D Fast Fourier Transform</a></li>\n<li><a href=\"#medfilt\">Median Filter</a></li>\n<li><a href=\"#resize\">Resize</a></li>\n<li><a href=\"#rotate\">Rotate</a></li>\n<li><a href=\"#scan\">Scan 1D Array</a></li>\n<li><a href=\"#reduce\">Reduction of 1D Array</a></li>\n<li><a href=\"#sort\">Sort</a></li>\n<li><a href=\"#transpose\">Matrix Transpose</a></li>\n</ul>\n\n<iframe id=\"bilateral\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1537662500&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"erode\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1481074704&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"conv\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1755110442&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"fft\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=650389043&format=interactive\" width=\"512\" height=\"320\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"medfilt\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1753028849&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"resize\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=437858968&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"rotate\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=474673156&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"scan\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1614566778&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"reduce\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=1060520634&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"sort\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=65950565&format=interactive\" width=\"512\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<iframe id=\"transpose\" src=\"https://docs.google.com/spreadsheets/d/1FPmiA62xmvSQEzyUbGmi8QXcDBxDkgkCap-ecCCoRu4/pubchart?oid=281596675&format=interactive\" width=\"640\" height=\"360\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\n\n<h4>Remarks</h4>\n\n<p>For most of the benchmarks the Intel system was outperformed by the AMD APU. We believe that we will be able to get more performance from the Intel system by modifying the kernels to use vector operations which will increase the resource utilization. Keep an eye out for a follow up post.</p>\n','ArrayFire Benchmarks: AMD Kaveri vs Intel Haswell Part-1','','inherit','open','open','','7712-revision-v1','','','2015-02-17 20:08:08','2015-02-17 20:08:08','',7712,'http://sandbox.arrayfire.com/7712-revision-v1/',0,'revision','',0),(7803,17796,'2015-02-18 20:29:04','2015-02-18 20:29:04','<p>The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions, comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is &#96;`met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (&#96;`function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed. This JIT compilation technique has multiple benefits: \n*   A reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets. \n*   Better cache performance - there are many instances in which the memory required by a single element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. \n*   Temporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory. \n*   Avoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. \n*   Better performance - all the above in fact can help reduce the total execution time.</p>\n\n<pre>// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\nstatic double pi_no_jit(array x, array y, array temp, int samples){\n        temp=x*x;\n        temp.eval();\n        temp+=y*y;\n        temp.eval();\n        temp=sqrt(temp);\n        temp.eval();\n        temp=temp&lt;1;\n        temp.eval();\n        return 4.0 sum&lt;float>(temp)/samples;\n}\n\nstatic double pi_jit(array x, array y, array temp,int samples){\n        temp = (sqrt(x*x+y*y)&lt;1); \n        temp.eval();\n        return 4.0*sum&lt;float>(temp)/samples;\n}\n</pre>\n\n<p>The above code (using ArrayFire) computes the value π using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value π. The accuracy of π improves as the number of samples are increased, which motivates using additional sample. There are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation. [caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"]</p>\n\n<p><a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" /></a> Performance of JIT and Non-JIT implementations[/caption] The above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses. The number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past. In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?</p>\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-18 20:29:04','2015-02-18 20:29:04','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7804,17796,'2015-02-18 20:31:11','2015-02-18 20:31:11','<p>The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions, comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is \'\'met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (&#96;`function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed. This JIT compilation technique has multiple benefits: * A reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets. * Better cache performance - there are many instances in which the memory required by a single element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. * Temporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory. * Avoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. * Better performance - all the above in fact can help reduce the total execution time.</p>\n\n<pre>// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\nstatic double pi_no_jit(array x, array y, array temp, int samples){\n        temp=x*x;\n        temp.eval();\n        temp+=y*y;\n        temp.eval();\n        temp=sqrt(temp);\n        temp.eval();\n        temp=temp&lt;1;\n        temp.eval();\n        return 4.0 sum&lt;float>(temp)/samples;\n}\n\nstatic double pi_jit(array x, array y, array temp,int samples){\n        temp = (sqrt(x*x+y*y)&lt;1); \n        temp.eval();\n        return 4.0*sum&lt;float>(temp)/samples;\n}\n</pre>\n\n<p>The above code (using ArrayFire) computes the value π using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value π. The accuracy of π improves as the number of samples are increased, which motivates using additional sample. There are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation. [caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"]</p>\n\n<p><a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" /></a> Performance of JIT and Non-JIT implementations[/caption] The above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses. The number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past. In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?</p>\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-18 20:31:11','2015-02-18 20:31:11','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7805,17796,'2015-02-18 20:31:28','2015-02-18 20:31:28','<p>The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions, comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is \'\'met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the $eval()$ function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (\'\'function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed. This JIT compilation technique has multiple benefits: * A reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets. * Better cache performance - there are many instances in which the memory required by a single element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. * Temporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory. * Avoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. * Better performance - all the above in fact can help reduce the total execution time.</p>\n\n<pre>// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\nstatic double pi_no_jit(array x, array y, array temp, int samples){\n        temp=x*x;\n        temp.eval();\n        temp+=y*y;\n        temp.eval();\n        temp=sqrt(temp);\n        temp.eval();\n        temp=temp&lt;1;\n        temp.eval();\n        return 4.0 sum&lt;float>(temp)/samples;\n}\n\nstatic double pi_jit(array x, array y, array temp,int samples){\n        temp = (sqrt(x*x+y*y)&lt;1); \n        temp.eval();\n        return 4.0*sum&lt;float>(temp)/samples;\n}\n</pre>\n\n<p>The above code (using ArrayFire) computes the value π using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value π. The accuracy of π improves as the number of samples are increased, which motivates using additional sample. There are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation. [caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"]</p>\n\n<p><a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" /></a> Performance of JIT and Non-JIT implementations[/caption] The above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses. The number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past. In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?</p>\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-18 20:31:28','2015-02-18 20:31:28','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7807,17796,'2015-02-18 20:32:41','2015-02-18 20:32:41','<p>The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions, comparisons, and element-wise operations. At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is \'\'met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met: 1) an explication evaluation is required by the programmer using the eval() function member or 2) the variable is required for the computation of a different variable that is not-JIT supported it. When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (\'\'function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed. This JIT compilation technique has multiple benefits: 1) A reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets. 2) Better cache performance - there are many instances in which the memory required by a single element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. 3) Temporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory. 4) Avoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided. 5) Better performance - all the above in fact can help reduce the total execution time.</p>\n\n<pre>// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\nstatic double pi_no_jit(array x, array y, array temp, int samples){\n        temp=x*x;\n        temp.eval();\n        temp+=y*y;\n        temp.eval();\n        temp=sqrt(temp);\n        temp.eval();\n        temp=temp&lt;1;\n        temp.eval();\n        return 4.0 sum&lt;float>(temp)/samples;\n}\n\nstatic double pi_jit(array x, array y, array temp,int samples){\n        temp = (sqrt(x*x+y*y)&lt;1); \n        temp.eval();\n        return 4.0*sum&lt;float>(temp)/samples;\n}\n</pre>\n\n<p>The above code (using ArrayFire) computes the value π using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value π. The accuracy of π improves as the number of samples are increased, which motivates using additional sample. There are two implementations in the code listing: 1) an implementation that takes advantage of the JIT feature and 2) an implementation that does not benefit from the JIT. Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation. [caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"]</p>\n\n<p><a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" /></a> Performance of JIT and Non-JIT implementations[/caption] The above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses. The number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past. In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?</p>\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-18 20:32:41','2015-02-18 20:32:41','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7808,17728,'2015-03-04 18:27:08','2015-03-04 18:27:08','<p>The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions, comparisons, and element-wise operations.</p>\n\n<p>At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is \'\'met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met:</p>\n\n<ul>\n<li>an explication evaluation is required by the programmer using the eval() function member or</li>\n<li>the variable is required for the computation of a different variable that is not-JIT supported it. </li>\n</ul>\n\n<p>When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (\'\'function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.</p>\n\n<p>This JIT compilation technique has multiple benefits:</p>\n\n<ul>\n<li>A reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets. </li>\n<li>Better cache performance - there are many instances in which the memory required by a single element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. </li>\n<li>Temporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.</li>\n<li>Avoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided.</li>\n<li>Better performance - all the above in fact can help reduce the total execution time.</li>\n</ul>\n\n<pre>// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\nstatic double pi_no_jit(array x, array y, array temp, int samples){\n        temp=x*x;\n        temp.eval();\n        temp+=y*y;\n        temp.eval();\n        temp=sqrt(temp);\n        temp.eval();\n        temp=temp < 1;\n        temp.eval();\n        return 4.0 sum<float>(temp)/samples;\n}\n\nstatic double pi_jit(array x, array y, array temp,int samples){\n        temp = (sqrt(x*x+y*y) < 1); \n        temp.eval();\n        return 4.0*sum<float>(temp)/samples;\n}\n</pre>\n\n<p>The above code (using ArrayFire) computes the value π using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value π. The accuracy of π improves as the number of samples are increased, which motivates using additional sample.</p>\n\n<p>There are two implementations in the code listing: - an implementation that takes advantage of the JIT feature (<code>pi_jit</code>) - an implementation that does not benefit from the JIT (<code>pi_no_jit</code>).</p>\n\n<p>Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.</p>\n\n<p>[caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"] [<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" />]<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\">1</a> Performance of JIT and Non-JIT implementations[/caption]</p>\n\n<p>The above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU.</p>\n\n<p>When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is <strong>1.4X-2.0X</strong> than the non-JIT supported function.</p>\n\n<p>In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is <strong>2.0X-2.7X</strong> faster than the non-JIT support function due to the reduced number of cache-misses.</p>\n\n<p>The number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past.In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?</p>\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-autosave-v1','','','2015-03-04 18:27:08','2015-03-04 18:27:08','',7702,'http://sandbox.arrayfire.com/7702-autosave-v1/',0,'revision','',0),(7809,17728,'2015-02-18 22:08:53','2015-02-18 22:08:53','<p>The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions, comparisons, and element-wise operations.</p>\n\n<p>At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is \'\'met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met:</p>\n\n<ul>\n<li>an explication evaluation is required by the programmer using the eval() function member or</li>\n<li>the variable is required for the computation of a different variable that is not-JIT supported it. </li>\n</ul>\n\n<p>When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (\'\'function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.</p>\n\n<p>This JIT compilation technique has multiple benefits:</p>\n\n<ul>\n<li>A reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets. </li>\n<li>Better cache performance - there are many instances in which the memory required by a single element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. </li>\n<li>Temporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.</li>\n<li>Avoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided.</li>\n<li>Better performance - all the above in fact can help reduce the total execution time.</li>\n</ul>\n\n<pre>\n// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\nstatic double pi_no_jit(array x, array y, array temp, int samples){\n        temp=x*x;\n        temp.eval();\n        temp+=y*y;\n        temp.eval();\n        temp=sqrt(temp);\n        temp.eval();\n        temp=temp<1;\n        temp.eval();\n        return 4.0 sum<float>(temp)/samples;\n}\n\nstatic double pi_jit(array x, array y, array temp,int samples){\n        temp = (sqrt(x*x+y*y)<1); \n        temp.eval();\n        return 4.0*sum<float>(temp)/samples;\n}\n</pre>\n\n<p>The above code (using ArrayFire) computes the value π using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value π. The accuracy of π improves as the number of samples are increased, which motivates using additional sample.</p>\n\n<p>There are two implementations in the code listing:\n- an implementation that takes advantage of the JIT feature (<code>pi_jit</code>)\n- an implementation that does not benefit from the JIT (<code>pi_no_jit</code>).</p>\n\n<p>Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.</p>\n\n<p>[caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"] [<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" />]<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\">1</a> Performance of JIT and Non-JIT implementations[/caption]</p>\n\n<p>The above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU. When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is 1.4X-2.0X than the non-JIT supported function. In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is 2.0X-2.7X faster than the non-JIT support function due to the reduced number of cache-misses. The number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past.</p>\n\n<p>In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?</p>\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-18 22:08:53','2015-02-18 22:08:53','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7810,17728,'2015-02-18 22:10:29','2015-02-18 22:10:29','<p>The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions, comparisons, and element-wise operations.</p>\n\n<p>At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is \'\'met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met:</p>\n\n<ul>\n<li>an explication evaluation is required by the programmer using the eval() function member or</li>\n<li>the variable is required for the computation of a different variable that is not-JIT supported it. </li>\n</ul>\n\n<p>When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (\'\'function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.</p>\n\n<p>This JIT compilation technique has multiple benefits:</p>\n\n<ul>\n<li>A reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets. </li>\n<li>Better cache performance - there are many instances in which the memory required by a single element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. </li>\n<li>Temporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.</li>\n<li>Avoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided.</li>\n<li>Better performance - all the above in fact can help reduce the total execution time.</li>\n</ul>\n\n<pre>// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\nstatic double pi_no_jit(array x, array y, array temp, int samples){\n        temp=x*x;\n        temp.eval();\n        temp+=y*y;\n        temp.eval();\n        temp=sqrt(temp);\n        temp.eval();\n        temp=temp&lt;1;\n        temp.eval();\n        return 4.0 sum&lt;float>(temp)/samples;\n}\n\nstatic double pi_jit(array x, array y, array temp,int samples){\n        temp = (sqrt(x*x+y*y)&lt;1); \n        temp.eval();\n        return 4.0*sum&lt;float>(temp)/samples;\n}\n</pre>\n\n<p>The above code (using ArrayFire) computes the value π using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value π. The accuracy of π improves as the number of samples are increased, which motivates using additional sample.</p>\n\n<p>There are two implementations in the code listing: - an implementation that takes advantage of the JIT feature (<code>pi_jit</code>) - an implementation that does not benefit from the JIT (<code>pi_no_jit</code>).</p>\n\n<p>Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.</p>\n\n<p>[caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"] [<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" />]<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\">1</a> Performance of JIT and Non-JIT implementations[/caption]</p>\n\n<p>The above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU.</p>\n\n<p>When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is <strong>1.4X-2.0X</strong> than the non-JIT supported function.</p>\n\n<p>In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is <strong>2.0X-2.7X</strong> faster than the non-JIT support function due to the reduced number of cache-misses. The number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past.</p>\n\n<p>In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?</p>\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-18 22:10:29','2015-02-18 22:10:29','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7811,17728,'2015-02-18 22:11:13','2015-02-18 22:11:13','<p>The ArrayFire library offers JIT (Just In Time) compiling for standard arithmetic operations. This includes trigonometric functions, comparisons, and element-wise operations.</p>\n\n<p>At run-time, ArrayFire aggregates these function calls using an Abstract Syntax Tree (AST) data structure such that when ever a JIT supported function is \'\'met\'\' it is added into the AST for a given variable instance. The AST of the variable is computed if one of the following conditions is met:</p>\n\n<ul>\n<li>an explication evaluation is required by the programmer using the eval() function member or</li>\n<li>the variable is required for the computation of a different variable that is not-JIT supported it. </li>\n</ul>\n\n<p>When the above occurs and the variable needs to be evaluated, the functions and variables in the AST data structure are used to create a single kernel (\'\'function-call\'\'). This is done by a creating a customized kernel on-the-fly that is made up of all the functions in the AST - the customized function is then executed.</p>\n\n<p>This JIT compilation technique has multiple benefits:</p>\n\n<ul>\n<li>A reduced number of kernel calls - a kernel call can be a significant overhead for small data-sets. </li>\n<li>Better cache performance - there are many instances in which the memory required by a single element in the array can be reused multiple or the temporary value of a computation can be stored in the cache and reused by future computations. </li>\n<li>Temporary memory allocation and write-back can be reduced - when multiple expressions are evaluated and stored into temporary arrays, these arrays need to be allocated and the results written back to the main memory.</li>\n<li>Avoid computing elements that are not used - there are cases in which the AST is created for a variable, however the expression is not used later in the computation. Thus, it evaluation can be avoided.</li>\n<li>Better performance - all the above in fact can help reduce the total execution time.</li>\n</ul>\n\n<pre>// As JIT is automatically enabled in ArrayFire, this version of the function forces each expression to be evaluated.\n// If the eval() function calls are removed, then the execution of this code would be equivalent to the following function.\nstatic double pi_no_jit(array x, array y, array temp, int samples){\n        temp=x*x;\n        temp.eval();\n        temp+=y*y;\n        temp.eval();\n        temp=sqrt(temp);\n        temp.eval();\n        temp=temp&lt;1;\n        temp.eval();\n        return 4.0 sum&lt;float>(temp)/samples;\n}\n\nstatic double pi_jit(array x, array y, array temp,int samples){\n        temp = (sqrt(x*x+y*y)&lt;1); \n        temp.eval();\n        return 4.0*sum&lt;float>(temp)/samples;\n}\n</pre>\n\n<p>The above code (using ArrayFire) computes the value π using a Monte-Carlo simulation where points are randomly generated within the unit-square.Each point is then tested to see if it is within the unit-circle. The ratio of points within the circle and the point in the square approximate the value π. The accuracy of π improves as the number of samples are increased, which motivates using additional sample.</p>\n\n<p>There are two implementations in the code listing: - an implementation that takes advantage of the JIT feature (<code>pi_jit</code>) - an implementation that does not benefit from the JIT (<code>pi_no_jit</code>).</p>\n\n<p>Specifically, as JIT as an integral feature of the ArrayFire framework, it cannot simply be turned on and off. The only way for a programmer to side-step the JIT operations is to manually force the evaluation of expressions. This is done in the non-JIT supported implementation.</p>\n\n<p>[caption id=\"attachment_7740\" align=\"alignnone\" width=\"716\"] [<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\" alt=\"Performance of JIT and Non-JIT implementations\" width=\"716\" height=\"371\" class=\"size-full wp-image-7740\" />]<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/02/jit_cuda1.png\">1</a> Performance of JIT and Non-JIT implementations[/caption]</p>\n\n<p>The above figure depicts the execution time (abscissa) as a function of the number of samples (ordinate) for the two implementations discussed above. These tests were conducted on NVIDIA K20 GPU.</p>\n\n<p>When the number of samples is considerably small, the execution time of the non-JIT supported function is dominated by the launch of multiple kernels. While the JIT supported function only has a single kernel to launch, the creation of the JIT-code dominates the execution time. Nonetheless, the JIT supported function is <strong>1&#46;4X-2.0X</strong> than the non-JIT supported function.</p>\n\n<p>In the case of the large number of samples, both the kernel launch overhead and the JIT-code creation, are not the limiting factor - the execution time is dominated by the functionality of the kernel. Specifically, the JIT supported version is <strong>2&#46;0X-2.7X</strong> faster than the non-JIT support function due to the reduced number of cache-misses.</p>\n\n<p>The number of applications that benefit from the JIT code generation are large. The actual performance benefits are also application dependent though we have a seen similar performance curves in the past.In a recent blog, <a href=\"http://sandbox.arrayfire.com/conways-game-of-life-using-arrayfire/\" title=\"Conway\'s Game of Life\" target=\"_blank\"> Conway\'s Game of Life</a>, we showed how to implement the \"Game\" in a handful of lines of code. Now that you know about the JIT and what to look for, can you see how JIT is applied to the Game of Life?</p>\n','Performance of ArrayFire JIT Code Generation','','inherit','open','open','','7702-revision-v1','','','2015-02-18 22:11:13','2015-02-18 22:11:13','',7702,'http://sandbox.arrayfire.com/7702-revision-v1/',0,'revision','',0),(7812,17728,'2015-02-20 15:57:46','2015-02-20 15:57:46','<p>Welcome to ArrayFire\'s home page for GSOC 2015. Please read this document and <a href=\"http://www.google-melange.com/gsoc/document/show/gsoc_program/google/gsoc2014/help_page#1._Are_there_any_age_restrictions_on\">GSOC\'s FAQ</a> before making a proposal. You can contact ArrayFire developers and mentors using our <a href=\"https://groups.google.com/forum/#!forum/arrayfire-users\">mailing list</a> for more information.</p>\r\n\r\n<h2>Information for students</h2>\r\n\r\n<h4>About ArrayFire</h4>\r\n\r\n<p><a href=\"https://github.com/arrayfire/arrayfire\">ArrayFire</a> is a high performance software library for parallel computing with an easy-to-use API. Its array based function set makes parallel programming simple.</p>\r\n\r\n<p>ArrayFire\'s multiple backends (CUDA, OpenCL and native CPU) make it platform independent and highly portable. A few lines of code in ArrayFire can replace dozens of lines of parallel computing code.</p>\r\n\r\n<h4>Requirements</h4>\r\n\r\n<p>While none of the following requirements are mandatory, we do a lot of development in <strong>C</strong> and <strong>C++</strong>. Familiarity with those languages would go a long way in addition to the following domains.</p>\r\n\r\n<ul>\r\n<li>Statistics / Machine Learning tools and libraries (e.g. R, scikit, numpy, etc.)</li>\r\n<li>Image processing and Computer Vision</li>\r\n<li>Experience programming on GPUs (CUDA / OpenCL, or OpenGL / DirectX)</li>\r\n<li>Version Control systems (git)</li>\r\n<li>Or a general interest in scientific computing.</li>\r\n</ul>\r\n\r\n<h4>Guidelines</h4>\r\n\r\n<p>If a project listed here interests you, or if you want to propose a new project, contact the mentors using our <a href=\"https://groups.google.com/forum/#!forum/arrayfire-users\">mailing list</a> with your project proposal.</p>\r\n\r\n<h2>ArrayFire Projects and Ideas</h2>\r\n\r\n<p>We will provide remote access to the hardware relevant to the project if necessary.</p>\r\n\r\n<h4>Improvements to the ArrayFire Library</h4>\r\n\r\n<p><strong>Mentors:</strong> Pavan Yalamanchili, Pradeep Garigipati, Shehzan Mohammed</p>\r\n\r\n<p>ArrayFire aims to be a portable, high performance scientific computing library. Key areas in ArrayFire can be improved include:</p>\r\n\r\n<ul>\r\n<li>Improving the performance of existing functions</li>\r\n<li>Adding support for more hardware and backends</li>\r\n<li>Adding a new domain of functions</li>\r\n</ul>\r\n\r\n<p>With these in mind, we suggest the follow ideas for prospective GSOC15 students.</p>\r\n\r\n<h6>Implement parallel version of ArrayFire\'s CPU backend.</h6>\r\n\r\n<p>This project focuses on performance improvements to ArrayFire\'s CPU backend. This is done by adding both vectorization and multi-threading support.</p>\r\n\r\n<p>A successful project will implement the following tasks.</p>\r\n\r\n<ul>\r\n<li>Use existing libraries (MKL, ACML, IPP etc) to accelerate when possible.</li>\r\n<li>Use SSE instructions to vectorize key algorithms</li>\r\n<li>Use OpenMP to enable multi-threading support.</li>\r\n</ul>\r\n\r\n<h6>Porting ArrayFire OpenCL backend to work on Mobile Platforms</h6>\r\n\r\n<p>ArrayFire\'s OpenCL backend is portable across a variety of OpenCL devices. However it has been developed and tested primarily on desktop GPUs. This project focuses on porting the OpenCL backend to mobile GPUs. Platforms of particular interest include ARM Mali GPUs, and Qualcomm\'s Adreno GPUs. The necessary hardware will be provided by us.</p>\r\n\r\n<p>A successful project will implement the following tasks:</p>\r\n\r\n<ul>\r\n<li>Setup cmake framework to work on ArrayFire for Android devices</li>\r\n<li>Make changes to ArrayFire\'s OpenCL backend to work on mobile devices</li>\r\n<li>Make changes to ArrayFire\'s Java wrapper necessary for Android</li>\r\n</ul>\r\n\r\n<h6>Machine learning algorithms for ArrayFire</h6>\r\n\r\n<p>These algorithms will be written using existing functionality. While no knowledge of CUDA or OpenCL is necessary, familiarity with vectorization concepts important. A successful project will implement any three of the following tasks using ArrayFire.</p>\r\n\r\n<ul>\r\n<li>Logistic and Linear regression</li>\r\n<li>Expectation Maximization </li>\r\n<li>Principal Component Analysis</li>\r\n<li>Support Vector Machines</li>\r\n<li>Hidden Markov Models</li>\r\n<li>Self Organizing Maps</li>\r\n<li>Performance improvements to existing Machine Learning algorithms</li>\r\n</ul>\r\n\r\n<h6>Computer vision algorithms for ArrayFire</h6>\r\n\r\n<p>These algorithms will be written in CUDA or OpenCL, along with a CPU implementation (serial), using ArrayFire existing functionality when available. A successful project will implement any one of the following tasks in CUDA or OpenCL plus a CPU implementation in C++:</p>\r\n\r\n<ul>\r\n<li><a href=\"http://personal.ee.surrey.ac.uk/Personal/Z.Kalal/tld.html\">Tracking-Learning-Detection</a> (TLD)</li>\r\n<li><a href=\"http://www.robesafe.com/personal/pablo.alcantarilla/kaze.html\">Accelerated-KAZE Features</a> (AKAZE)</li>\r\n</ul>\r\n\r\n<h4>Language Bindings for ArrayFire</h4>\r\n\r\n<p>There are a lot of Scientists and Engineers using higher level languages for scientific computing. ArrayFire\'s C API allows us to write wrappers for high level languages fairly easily. GSOC students can pick a language of their choice and wrap ArrayFire in that language. Our suggestions include the following.</p>\r\n\r\n<h6>Java Wrapper for ArrayFire</h6>\r\n\r\n<p>A Java wrapper already exists for ArrayFire. However it does not have feature parity with the C/C++ version. A successful project will implement the following.</p>\r\n\r\n<ul>\r\n<li>Get feature parity with ArrayFire C/C++.</li>\r\n<li>Test the wrapper on Linux, Windows and OSX.</li>\r\n<li>Write two new examples demonstrating the wrapper.</li>\r\n</ul>\r\n\r\n<h6>R wrapper for ArrayFire</h6>\r\n\r\n<p>As with the Java wrapper, the R wrapper does not have feature parity. A successful project will implement the following.</p>\r\n\r\n<ul>\r\n<li>Get feature parity with ArrayFire C/C++</li>\r\n<li>Test the wrapper on Linux and OSX</li>\r\n<li>Benchmark ArrayFire\'s algorithms with standard implementations in R.</li>\r\n</ul>\r\n\r\n<h6>Other language wrappers.</h6>\r\n\r\n<p>Suggested languages include: C#, lua and rust. If you prefer a different language, contact us. A successful project will implement the following.</p>\r\n\r\n<ul>\r\n<li>implement functions from <a href=\"https://github.com/arrayfire/arrayfire/blob/devel/include/af/algorithm.h\">arith.h</a>, <a href=\"https://github.com/arrayfire/arrayfire/blob/devel/include/af/arith.h\">algorithm.h</a> and <a href=\"https://github.com/arrayfire/arrayfire/blob/devel/include/af/blas.h\">blas.h</a>.</li>\r\n<li>Test the wrapper on Linux.</li>\r\n<li>Write at least one example demonstrating the wrapper.</li>\r\n</ul>\r\n\r\n<h4>The ArrayFire Graphics Library - High performance visualizations</h4>\r\n\r\n<p><strong>Mentors:</strong> Shehzan Mohammed, Pradeep Garigipati</p>\r\n\r\n<p>The ArrayFire Graphics library is a set of visualization API that is targeted towards giving users a range of High performance visualization options.</p>\r\n\r\n<p>The core ideas behind this library are as follows:</p>\r\n\r\n<ul>\r\n<li>Provide a robust, yet flexible, API that allows users to display their data.</li>\r\n<li>Visualization options include, but are not limited to: \r\n\r\n<ul>\r\n<li>Display 2D images</li>\r\n<li>Display 2D and 3D Graphs using lines, points, sprites, surfaces and volumes</li>\r\n<li>Display 3D voxel and voxel-like visualizations</li>\r\n<li>Display 3D geometry</li>\r\n</ul></li>\r\n<li>Allow interop capabilities for both CUDA and OpenCL. This is essential as copying data from GPU to CPU and back to GPU for rendering is a whole lot of waste of performance.</li>\r\n<li>Provide a set of useful keyboard and mouse interaction options.</li>\r\n</ul>\r\n\r\n<h6>Suggested ideas for GSOC15 for this project include:</h6>\r\n\r\n<p>A successful project will include any one of the following:</p>\r\n\r\n<ul>\r\n<li>Create new visualization API. 2D Sprites based UI, 3D voxels, 3D graphs, and 3D geometry are favorites.</li>\r\n<li>Performance improvements to existing API. This includes \r\n\r\n<ul>\r\n<li>improvements to OpenGL code.</li>\r\n<li>data copy performance in ArrayFire.</li>\r\n</ul></li>\r\n<li>Using multi-threading to run OpenGL on an independent thread.</li>\r\n<li>Porting the library to OpenGL ES and/or WebGL.</li>\r\n</ul>\r\n\r\n<h6>Requirements for these project are as follows:</h6>\r\n\r\n<ul>\r\n<li>Extremely good knowledge of OpenGL, GLFW.</li>\r\n<li>Experience with 3D Rendering using OpenGL.</li>\r\n<li>Strong understanding of CUDA-OpenGL and/or OpenCL-OpenGL interop.</li>\r\n<li>Knowledge of game and/or rendering engines is a bonus.</li>\r\n</ul>\r\n','Google Summer Of Code 2015','','pending','open','open','','gsoc','','','2015-03-02 23:40:27','2015-03-02 23:40:27','',0,'http://sandbox.arrayfire.com/?page_id=7812',0,'page','',0),(7813,17728,'2015-02-19 21:51:02','2015-02-19 21:51:02','\n','GSOC','','inherit','open','open','','7812-revision-v1','','','2015-02-19 21:51:02','2015-02-19 21:51:02','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7814,17728,'2015-02-19 22:46:26','2015-02-19 22:46:26','<h1>Google Summer Of Code 2015</h1>\n\n<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li>[List of Ideas][#List of Ideas]</li>\n</ul>\n\n<h2>Introduction to ArrayFire</h2>\n\n<h2>Requirements for Students</h2>\n\n<h2>List of Ideas</h2>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:46:26','2015-02-19 22:46:26','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7815,17728,'2015-02-19 22:47:00','2015-02-19 22:47:00','<h2>Google Summer Of Code 2015</h2>\n\n<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li>[List of Ideas][#List of Ideas]</li>\n</ul>\n\n<h3>Introduction to ArrayFire</h3>\n\n<h3>Requirements for Students</h3>\n\n<h3>List of Ideas</h3>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:47:00','2015-02-19 22:47:00','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7816,17728,'2015-02-19 22:47:21','2015-02-19 22:47:21','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li>[List of Ideas][#List of Ideas]</li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:47:21','2015-02-19 22:47:21','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7817,17728,'2015-02-19 22:47:50','2015-02-19 22:47:50','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li>[List of Ideas][#List_of_Ideas]</li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:47:50','2015-02-19 22:47:50','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7818,17728,'2015-02-19 22:48:01','2015-02-19 22:48:01','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li>[List of Ideas][#list_of_ideas]</li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:48:01','2015-02-19 22:48:01','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7819,17728,'2015-02-19 22:48:14','2015-02-19 22:48:14','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li><a href=\"#list_of_ideas\">List of Ideas</a></li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:48:14','2015-02-19 22:48:14','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7820,17728,'2015-02-19 22:48:28','2015-02-19 22:48:28','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li>[List of Ideas](#List of Ideas)</li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:48:28','2015-02-19 22:48:28','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7821,17728,'2015-02-19 22:48:35','2015-02-19 22:48:35','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li><a href=\"#list_of_ideas\">List of Ideas</a></li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:48:35','2015-02-19 22:48:35','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7822,17728,'2015-02-19 22:49:15','2015-02-19 22:49:15','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li><a href=\"#list_of_ideas\">List of Ideas</a></li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<h4>Requirements for Students</h4>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<h4>List of Ideas</h4>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:49:15','2015-02-19 22:49:15','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7823,17728,'2015-02-19 22:50:05','2015-02-19 22:50:05','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire][1]</li>\n<li>[Requirements for Students][2]</li>\n<li><a href=\"#list\">List of Ideas</a></li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<h4>Requirements for Students</h4>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<h4>list</h4>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n\n<p>a\naaaaaaaaaa\na\na\na\na\na\na\na\na\na\na</p>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:50:05','2015-02-19 22:50:05','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7824,17728,'2015-02-19 22:50:16','2015-02-19 22:50:16','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>&#91;Introduction to ArrayFire&#93;&#91;1&#93;</li>\n<li>&#91;Requirements for Students&#93;&#91;2&#93;</li>\n<li><a href=\"#list\">List of Ideas</a></li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<h4>Requirements for Students</h4>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<h4>list</h4>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n\n<p>a aaaaaaaaaa a a a a a a a a a a</p>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:50:16','2015-02-19 22:50:16','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7825,17728,'2015-02-19 22:53:02','2015-02-19 22:53:02','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire]</li>\n<li>[Requirements for Students]</li>\n<li><a href=\"#list-of-ideas\">List of Ideas</a></li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:53:02','2015-02-19 22:53:02','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7826,17728,'2015-02-19 22:54:08','2015-02-19 22:54:08','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire]</li>\n<li>[Requirements for Students]</li>\n<li>[List of Ideas][#ideas]</li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\"/></p>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:54:08','2015-02-19 22:54:08','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7827,17728,'2015-02-19 22:54:10','2015-02-19 22:54:10','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire]</li>\n<li>[Requirements for Students]</li>\n<li>[List of Ideas][#ideas]</li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:54:10','2015-02-19 22:54:10','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7828,17728,'2015-02-19 22:54:24','2015-02-19 22:54:24','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire]</li>\n<li>[Requirements for Students]</li>\n<li><a href=\"#ideas\">List of Ideas</a></li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:54:24','2015-02-19 22:54:24','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7829,17728,'2015-02-19 22:54:50','2015-02-19 22:54:50','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire]</li>\n<li>[Requirements for Students]</li>\n<li><a href=\"#ideas\">List of Ideas</a></li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n\n<p>test\ntest\ntest\ntest\ntest\ntest</p>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:54:50','2015-02-19 22:54:50','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7830,17728,'2015-02-19 22:55:24','2015-02-19 22:55:24','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li>[Introduction to ArrayFire]</li>\n<li>[Requirements for Students]</li>\n<li><a href=\"#ideas\">List of Ideas</a></li>\n</ul>\n\n<h4>Introduction to ArrayFire</h4>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:55:24','2015-02-19 22:55:24','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7831,17728,'2015-02-19 22:56:06','2015-02-19 22:56:06','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li><a href=\"#intro\">Introduction to ArrayFire</a></li>\n<li><a href=\"#require\">Requirements for Students</a></li>\n<li><a href=\"#ideas\">List of Ideas</a></li>\n</ul>\n\n<p><a name=\"intro\" /></p>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p><a name=\"require\" /></p>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:56:06','2015-02-19 22:56:06','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7832,17728,'2015-02-19 22:57:35','2015-02-19 22:57:35','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li><a href=\"#intro\">Introduction to ArrayFire</a></li>\n<li><a href=\"#require\">Requirements for Students</a></li>\n<li><a href=\"#ideas\">List of Ideas</a></li>\n</ul>\n\n<p><a name=\"intro\" /></p>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p><a name=\"require\" /></p>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n','Google Summer Of Code 2015','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:57:35','2015-02-19 22:57:35','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7833,17728,'2015-02-19 22:59:08','2015-02-19 22:59:08','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li><a href=\"#intro\">Introduction to ArrayFire</a></li>\n<li><a href=\"#require\">Requirements for Students</a></li>\n<li><a href=\"#ideas\">List of Ideas</a>\n\n<ul>\n<li><a href=\"#graphics\">Something about graphics</a></li>\n</ul></li>\n</ul>\n\n<p><a name=\"intro\" /></p>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p><a name=\"require\" /></p>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n\n<p><a name=\"graphics\" /></p>\n\n<h5>Graphics</h5>\n','Google Summer Of Code 2015','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:59:08','2015-02-19 22:59:08','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7834,17728,'2015-02-19 22:59:11','2015-02-19 22:59:11','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li><a href=\"#intro\">Introduction to ArrayFire</a></li>\n<li><a href=\"#require\">Requirements for Students</a></li>\n<li><a href=\"#ideas\">List of Ideas</a> \n\n<ul>\n<li><a href=\"#graphics\">Something about graphics</a></li>\n</ul></li>\n</ul>\n\n<p><a name=\"intro\" /></p>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p><a name=\"require\" /></p>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n\n<p><a name=\"graphics\" /></p>\n\n<h5>Graphics</h5>\n','Google Summer Of Code 2015','','inherit','open','open','','7812-revision-v1','','','2015-02-19 22:59:11','2015-02-19 22:59:11','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7835,17728,'2015-02-19 23:01:24','2015-02-19 23:01:24','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li><a href=\"#intro\">Introduction to ArrayFire</a></li>\n<li><a href=\"#require\">Requirements for Students</a></li>\n<li><a href=\"#ideas\">List of Ideas</a>\n\n<ul>\n<li><a href=\"#bindings\">Language bindings for ArrayFire</a></li>\n<li><a href=\"#graphics\">Visualization using OpenGL</a></li>\n</ul></li>\n</ul>\n\n<p><a name=\"intro\" /></p>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p><a name=\"require\" /></p>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n\n<p><a name=\"graphics\" /></p>\n\n<h5>Visualization using OpenGL</h5>\n\n<p><a name=\"bindings\" /></p>\n\n<h5>Language bindings for ArrayFire</h5>\n','Google Summer Of Code 2015','','inherit','open','open','','7812-revision-v1','','','2015-02-19 23:01:24','2015-02-19 23:01:24','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7836,17728,'2015-02-19 23:01:27','2015-02-19 23:01:27','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li><a href=\"#intro\">Introduction to ArrayFire</a></li>\n<li><a href=\"#require\">Requirements for Students</a></li>\n<li><a href=\"#ideas\">List of Ideas</a> \n\n<ul>\n<li><a href=\"#bindings\">Language bindings for ArrayFire</a></li>\n<li><a href=\"#graphics\">Visualization using OpenGL</a></li>\n</ul></li>\n</ul>\n\n<p><a name=\"intro\" /></p>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p><a name=\"require\" /></p>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n\n<p><a name=\"graphics\" /></p>\n\n<h5>Visualization using OpenGL</h5>\n\n<p><a name=\"bindings\" /></p>\n\n<h5>Language bindings for ArrayFire</h5>\n','Google Summer Of Code 2015','','inherit','open','open','','7812-revision-v1','','','2015-02-19 23:01:27','2015-02-19 23:01:27','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),(7837,17728,'2015-02-19 23:03:08','2015-02-19 23:03:08','<p>Welcome to ArrayFire\'s home page for GSOC 2015. This page is organized into the following sections:</p>\n\n<ul>\n<li><a href=\"#intro\">Introduction to ArrayFire</a></li>\n<li><a href=\"#require\">Requirements for Students</a></li>\n<li><a href=\"#ideas\">List of Ideas</a>\n\n<ul>\n<li><a href=\"#ml\">GPU accelerated Machine Learning</a></li>\n<li><a href=\"#bindings\">Language bindings for ArrayFire</a></li>\n<li><a href=\"#graphics\">Visualization using OpenGL</a></li>\n</ul></li>\n</ul>\n\n<p><a name=\"intro\" /></p>\n\n<h4>Introduction to ArrayFire</h4>\n\n<p><a name=\"require\" /></p>\n\n<h4>Requirements for Students</h4>\n\n<p><a name=\"ideas\" /></p>\n\n<h4>List of Ideas</h4>\n\n<p><a name=\"ml\" /></p>\n\n<h5>GPU accelerated Machine Learning</h5>\n\n<p><a name=\"graphics\" /></p>\n\n<h5>Visualization using OpenGL</h5>\n\n<p><a name=\"bindings\" /></p>\n\n<h5>Language bindings for ArrayFire</h5>\n','Google Summer Of Code 2015','','inherit','open','open','','7812-revision-v1','','','2015-02-19 23:03:08','2015-02-19 23:03:08','',7812,'http://sandbox.arrayfire.com/7812-revision-v1/',0,'revision','',0),