OpenCL SPIR (Standard Portable Intermediate Representation) is an intermediate representation for OpenCL-code, comparable to LLVM IL and HSAIL. It is a search for what would be a good representation, such that parallel software runs well on all kinds of accelerators. LLVM IL is too general, but SPIR is a subset of it. I’ll discuss HSAIL, on where it differs from SPIR – I thought SPIR was a better way to start introducing these. In my next article I’d like to give you an overview of the whole ecosphere around OpenCL (including SPIR and HSAIL), to give you an understanding what it all means and where we’re going to, and why.Know that the new SPIR-V is something completely different in implementation, and we are only discussing the old SPIR here.
[raw]
__kernel void sum(const int size, __global float * vec1, __global float * vec2){
int ii = get_global_id(0);
if(ii < size) vec2[ii] += vec1[ii];
}
[/raw]




















See the difference?


Let the competition on large memory GPUs begin!
















The past year you might not have heard much from OpenCL-on-ARM, besides the Arndale developer-board. You have heard just a small portion of what has been going on.




There is an interesting book coming up: “Numerical Computations with GPUs” – a book explaining various numerical algorithms with code in CUDA or OpenCL.