Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
24 Views

Questions about ioc64 and Intel compiler icc in regard of OpenCL

Hi, It is known that, to get a GPU device associated with a platform, CL_DEVICE_TYPE_GPU is used in clGetDeviceIDs; So my first question is: Is it necessary when using ioc64, to specify as device gpu? And if yes, what is the difference in term of code generated between -device=cpu and -device=gpu? My second question is: Is there any particular reason why the Intel c compiler does not support OpenCL? Thanks
0 Kudos
4 Replies
Highlighted
24 Views

If ioc64 is used without specifying a device, the default is GPU.  The CPUs and GPUs have different instruction sets.  

Here is more info on Gen assembly: https://software.intel.com/en-us/articles/introduction-to-gen-assembly

And more about the underlying architecture: https://software.intel.com/en-us/file/the-compute-architecture-of-intel-processor-graphics-gen9-v1d...

While I'm not an expert on why the Intel compiler doesn't have more OpenCL integration, I agree that it is a very interesting idea.  For now though, the rich set of abstractions for memory management in OpenCL make it a great choice for taking advantage of Gen GPU hardware.  You can of course use both together: icc for host-side code, ioc64 for device-side.

 

0 Kudos
Highlighted
Beginner
24 Views

Hi,

Thanks for that. You said: "You can of course use both together: icc for host-side code, ioc64 for device-side."

How would that be possible if icc does not have an OpencCL switch?

 

0 Kudos
Highlighted
24 Views

OpenCL does not need to be compiled from source at runtime.  You can also load several forms of pre-compiled kernels.  The kernel (pre)compiles would happen as a separate step.

https://software.intel.com/en-us/articles/using-spir-for-fun-and-profit-with-intel-opencl-code-build...

Developer guide: https://software.intel.com/en-us/node/539388

 

0 Kudos
Highlighted
Beginner
24 Views

Hi,

Thanks. My mistake, the Intel compiler does indeed have the -lOpenCL switch, is just not documented. Mystery solved.

 

0 Kudos