简体   繁体   English

Opencl在ARM上找不到gpu

[英]Opencl can't find gpu on ARM

I'm trying to run image processing app on android/ARM, using opencv's ocl module. 我正在尝试使用opencv的ocl模块在android / ARM上运行图像处理应用程序。 In some case(android4.2.2/Qualcomm snapdragon msm8930/Adreno TM305), it runs well. 在某些情况下(android4.2.2 / Qualcomm snapdragon msm8930 / Adreno TM305),它运行良好。

But in other cases(android4.4.2/rockchip RK3288/mali-T764; android4.4/sumsung exynos5410/powerVR SGX 544mp),there are problems. 但在其他情况下(android4.4.2 / rockchip RK3288 / mali-T764; android4.4 / sumsung exynos5410 / powerVR SGX 544mp),有问题。 CV::ocl::getOpenCLDevice() shows there is no opencl platform or device. CV::ocl::getOpenCLDevice()显示没有opencl平台或设备。

I'm sure all three tested systems support opencl. 我确信所有三个经过测试的系统都支持opencl。 Could anyone tell me what's the problem here? 谁能告诉我这里的问题是什么? Thanks! 谢谢!

Well,I fixed the problem already. 好吧,我已经解决了这个问题。 The problem is some android devices don't have opencl lib file libopencl.so in file system, or the file has a different name(for example, libgles_Mali.so). 问题是一些android设备在文件系统中没有opencl lib文件libopencl.so,或者该文件有不同的名称(例如,libgles_Mali.so)。 To use opencl, we should set environment first. 要使用opencl,我们应该首先设置环境。

Specifically, add 具体来说,添加

setenv("OPENCV_OPENCL_BINARY", "libGLES_Mali.so", 0); setenv(“OPENCV_OPENCL_BINARY”,“libGLES_Mali.so”,0);

Before 之前

cv::ocl::getOpenCLDevices() CV :: OCL :: getOpenCLDevices()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM