This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: OpenCL compile difference ARM and Host

Part Number: AM5728

I use AM5728 and last Processor SDK (6.0.3...).

I tried to compile openCL example. For example I tried to compile float_compute example on host (x86) PC. It's successfully. I got execute file "float_compute" for ARM core and "dsp_compute.out" for C66 core. I copied it to target (AM5728). And this example hangs (I think it hang in DSP communicate).

I tried to compile absolutely similar file dsp_compute.cl using target (clocl under AM5728) and I got dsp_compute.out which compiled by AM5728. 

In this case the example works!

My question: why is a difference of result when I used clocl under x86 and under ARM? How I can compile OpenCL under x86 ( cross complilation).

ARM part (float_compute) of OpenCL are similar result when compile under x86(cross complilation) and target ARM compilation. Difference only for C66x part

  • Do anybody have same problem and solution?

  • Sorry about a late reply.  When compiling a OpenCL kernel, it needs to link against certain symbols from the C66x DSP firmware.  These symbols are encoded in dsp_syms.obj.  On AM57x target, the file is located in "/usr/share/ti/opencl".  When you cross-compile on x86-64, please make sure the "dsp_syms.obj" on PC is identical to the copy on AM57x target.  Otherwise (if your PC copy got stale/wrong address of these firmware symbols), when your kernel or OpenCL runtime make a call using the wrong address of these symbols, your program will likely crash or hang.

    -Yuan