Hi,
I've tried to run snpe 1.2.2 on Snapdragon camera with Linux:
Linux apq8053 3.18.44 #1 SMP PREEMPT Thu Apr 27 09:21:52 MDT 2017 aarch64 GNU/Linux
Did run small OpenCL benchmark tool "clpeak" and OpenCL is there:
Platform: Snapdragon(TM)Device: QUALCOMM Adreno(TM)Driver version : OpenCL 2.0 QUALCOMM build: commit #e08994c changeid # Date: 04/27/17 Thu Local Branch: Remote Branch: Compiler E031.33.00.02 (Linux ARM)Compute units : 1Clock frequency : 1 MHz
error_code=809; error_message=OpenCL function has returned error. OpenCL Error (-59) CL_INVALID_OPERATION; error_component=GPU Runtime; line_no=121; thread_id=3854962688; opencl_error=-59
/usr/lib/libOpenCL.so/usr/lib64/libOpenCL.so
Hi, Thank you for the interest in Snapdragon NPE, and trying to run it on the configuration described above.
The current version of Snapdragon NPE targets Android OS. As such, it is designed to look for OpenCL in the "typical" locations for Android Drivers, which are different than Linux.
However, and this is where you may have a workaround ( :-) ) it is looking for "LD_LIBRARY_PATH" environment variable. if this environment variable exists, it will look for OpenCL library in these locations as well.
I suggest you'll try this first - define LD_LIBRARY_PATH with /usr/lib in it, or add /usr/lib to the LD_LIBRARY_PATH if its already defined.
Thank you for quick answer. Adding to LD_LIBRARY_PATH was first thing I did try. It did not help.
Checking SNPE library dependencies showed libdl.so in list. If I correctly understood it is dynamic linkage library which loads shared library at runtime. So LD_LIBRARY_PATH might not help with that. Anything else I can try?
Is there any way to get verbose log for library?
Thanks for checking it. Can you try one more option - place the OpenCL library here : "/system/vendor/lib/libOpenCL.so"
Ofer.
Thanks, already tried that.
Just discovered that depend on "/usr/lib" place in LD_LIBRARY_PATH behaviour is different. Tried demo application snpe-net-run now
Hmm, It seems found different bug. If LD_LIBRARY_PATH has more than one item in list, application will crash.
But having everything in one folder still does not help with OpenCL issue.
Thanks for making these extensive testings.
Looking at the list of experiments, i'm not clear on one scenario - what happens when LD_LIBRARY_PATH has only one item, and it is "/usr/lib" ?
I'm checking on other options to enable more information from these crashes.
<p>OK, so that's some progress. Now SNPE managed to find and load the OpenCL library - which is great :-)
BTW, I thought that you mentioned at early stages that libSNPE.so was already located under /usr/lib - was that not the case ?
Can you provide some more information using the CLpeak tool ? I would like to see the CL_DRIVER_VERSION, CL_DEVICE_VERSION, CL_DEVICE_NAME,
Thanks,
Ofer
I'm afraid I dod not see symptoms that libOpenCL.so has been found by SNPE. Error is the same as before, just no more crash in SNPE due to LD_LIBRARY_PATH parsing
Sligtly modified clpeak:
It was issue with OpenCL driver or library on camera. Rolling back to older version fixed issue.