My system :
CPU: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 4 Cores / 8 Threads
OS : Ubuntu 14.04
OpenCL drivers version: 22.214.171.124 (gathered from OpenCL info queries)
Intel SDK version : intel sdk 2014 Ubuntu 126.96.36.199_x64
I have problem of loading SPIR kernels generated by Code Builder(KernelBuilder64 when launching from terminal). The runtime builds after loading binary successfully it seems if we trust build log coming from clProgramBuildInfo (CL_PROGRAM_BUILD_LOG) but when I execute the kernel and print the buffer; it seems values inside the buffer don't change.
In the attachment, I have an example file "s.cl", also the binary generated by intel tools together with "main.cpp"(my OpenCL code). Finally, the black screenshot to show the output of the main.cpp program.
Since I failed to load SPIR, I tried the new driver (intel_sdk_for_opencl_2016_ubuntu_188.8.131.529_x64). But I couldn't even open Code Builder and OpenCL was having problems with clGetPlatfromIds. In the attachement, I also run clDevQuery (from https://gist.github.com/rmcgibbo/6314452) to show the response I got from the OpenCL runtime systems.
Could you please try the following:
ioc64 -cmd=build -input=your_kernel.cl -spir64=your_kernel_x64.spir -bo="-cl-std=CL1.2"
I wonder if the problem is that you are somehow producing a 32-bit spir instead of 64-bit version.
I tried your code and your SPIR file on Windows and SPIR file works perfectly fine there, so the problem must be with the driver.
Could you try the following driver? http://registrationcenter.intel.com/irc_nas/5193/opencl_runtime_15.1_x64_184.108.40.206.tgz
You may need to ignore the platform warnings.