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.

[参考译文] Linux/AM5728:将 IMG_LIB 添加到 OpenCL

Guru**** 2609955 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/656142/linux-am5728-adding-img_lib-to-opencl

器件型号:AM5728

工具/软件:Linux

您好!

我们参考 http://processors.wiki.ti.com/index.php/OpenCV  将我们自己的 OpenCL 内核添加到 DSP.which is successful (成功)。

我们检查 了 http://processors.wiki.ti.com/index.php/Processor_Training:_Multimedia 的源 文件、将 C66x_IMG_LIB 添加 到 OpenCL 内核(例如 Canny、Sobel)中。

但是,如果我们将这些函数添加到 OpenCL 内核中:

void IMG_sobre el 3x3_8 (const unsigned char * restrict in_data、unsigned char * restrict out_data、int rows、int cols);
内核空 maskVector (全局 const uchar4* src、全局 uchar4* dst、int rows、int cols)

Img_sobre el 3x3_8 (src、dst、rows、cols);

内核将打印:

未定义的首次引用
符号
------ --------
Img_sobre el 3x3_8 /tmp/opencl45XB7I.obj

错误#10234-D:未解析的符号仍然存在
错误#10010:链接期间遇到错误;不是"/tmp/opencl45XB7I.out
已构建

>>编译失败
错误:clBuildProgram (-11、构建程序失败)

我们如何将 C66x_IMG_LIB 添加到 OpenCL 内核中?

 此致

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    软件团队已收到通知。 他们将在这里作出回应。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    我建议查看 OpenCL 随附的 DSPLIB_FFT 示例。 它位于/usr/share/ti/examples/opencl目标文件系统的目录中。 在 OpenCL 程序构建期间、您需要指定适当的库。 在 DSPLIB_FFT 示例中、请参阅 FFT_OCL.CPP 中的第106行:

    program.build (devices、"./dsplib.ae66");

    Ajay