Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AMD APP OpenCL SDK on Intel

Tags:

x86-64

gpu

opencl

I have seen that AMD APP SDK samples work on a machine having only Intel CPU. How can this happen? How does the compiler target a different machine architecture? Do I not need Intel's set of compilers for running the code on the intel CPU?

I think if we have to run an OpenCL application on a specific hardware, I have to (re)compile it using device's vendor specifics compiler.

Where is my understanding wrong?

like image 498
gpuguy Avatar asked Aug 12 '12 05:08

gpuguy


1 Answers

Firstly, OpenCL is built to work on CPU's and GPU's. You can compile and run the same source code on either type of device. However, its very likely that CPU code will be sub-optimal for a GPU and vice-versa.

AMD H/W is 7% - 14% of total x86/x64 CPU's. So AMD must develop compilers for both AMD and Intel chips to be relevant. AMD have history developing compilers for both sets of chips. Conversely, Intel have developed compilers that either don't work on AMD chips or don't work that well. That's no surprise.

With OpenCL, the AMD APP SDK is the most flexible it will work well on AMD and Intel CPU's and AMD GPUs. Intel's OpenCL SDK doesn't even install on AMD x86 H/W.

If you compile an OpenCL program to binary, you can save and reuse it as long as it matches the OpenCL Platform and Device that created it. So, if you compile for one device and use on another you are very likely to get an error.

like image 105
Tim Child Avatar answered Nov 13 '22 01:11

Tim Child