Bug 773 - Device specific JOCL dynamic library look-up on Android
Summary: Device specific JOCL dynamic library look-up on Android
Status: RESOLVED FIXED
Alias: None
Product: Jocl
Classification: JogAmp
Component: opencl (show other bugs)
Version: 1
Hardware: All all
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 863
  Show dependency treegraph
 
Reported: 2013-07-03 16:38 CEST by Xerxes Rånby
Modified: 2013-10-19 07:18 CEST (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
6be41a8e457ec2881f4ce351395ba84748a737b6 51bb8b2259e8eae9f62ec7202e8b7eb934a44c85
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xerxes Rånby 2013-07-03 16:38:46 CEST
According to the aopencl project:
http://code.google.com/p/aopencl/
The OpenCL functions are found in
/system/vendor/lib/egl/libGLES_mali.so
on Nexus 10 T604 based devices
and
/system/lib/libllvm-a3xx.so
on Nexus 4 Adreno 320 based GPU's

We need to enhance the JOCL dynamic library look-up to search for OpenCL symbols in non standard locations. This will allow use of JOCL on the first generation OpenCL Android devices.

For more info see:
http://forum.jogamp.org/OpenCL-on-mobile-devices-td4028411.html
Comment 1 Xerxes Rånby 2013-07-03 16:46:19 CEST
https://developer.qualcomm.com/comment/6087#comment-6087
Some nexus 4 devices got OpenCL in:
/system/lib/libOpenCL.so
Comment 2 MichaelEGR 2013-09-17 04:08:23 CEST
I'm working with the ODROID-XU Android development board. It uses an Exynos 5410 SoC w/ PowerVR SGX544MP3 GPU supporting OpenCL 1.1 EP.

http://www.hardkernel.com/renewal_2011/products/prdt_info.php?g_code=G137510300620

The driver is located here:
/system/vendor/lib/libPVROCL.so

I have initially tested it via modifying the aopencl project mentioned in reply #1 above. I assume this is the general location for other PowerVR GPU OpenCL drivers. I'm now taking a look at getting this working with JOCL.
Comment 3 Xerxes Rånby 2013-09-17 13:53:18 CEST
(In reply to comment #2)
> I'm working with the ODROID-XU Android development board. It uses an Exynos
> 5410 SoC w/ PowerVR SGX544MP3 GPU supporting OpenCL 1.1 EP.
> 
> http://www.hardkernel.com/renewal_2011/products/prdt_info.
> php?g_code=G137510300620
> 
> The driver is located here:
> /system/vendor/lib/libPVROCL.so
> 
> I have initially tested it via modifying the aopencl project mentioned in
> reply #1 above. I assume this is the general location for other PowerVR GPU
> OpenCL drivers. I'm now taking a look at getting this working with JOCL.

The JOCL JNI Lib loader is currently located in com.jogamp.opencl.JOCLJNILibLoader

The best way to resolve this bug is to move the implementation into a new class
com.jogamp.opencl.CLDynamicLibraryBundleInfo and use the DynamicLibraryBundle helper class provided by Gluegen.
http://jogamp.org/deployment/jogamp-next/javadoc/gluegen/javadoc/com/jogamp/common/os/DynamicLibraryBundle.html
http://jogamp.org/deployment/jogamp-next/javadoc/gluegen/javadoc/com/jogamp/common/os/DynamicLibraryBundleInfo.html

I suggest to make JOCL library and symbol look-up similar to how we do dynamic library symbol look-up inside multiple librarys for the JOGL project. You may take a look at the com.jogamp.opengl.GLDynamicLibraryBundleInfo implementation to see how we prefer to do dynamic library loading and symbol look-up inside the JogAmp projects.
Comment 4 Sven Gothel 2013-10-19 06:48:22 CEST
    Bug 773 - Device specific JOCL dynamic library look-up on Android - Part 1/2
    
    Use DynamicLibraryBundleInfo w/ alternative native library names,
    drop manual coding of loading and binding, i.e. JOCLJNILibLoader.
    
    After trying opencl native libs (and failing), try GL libs ..
    
    We use a manual impl. to CL's 'clGetExtensionFunctionAddress' similar to JOAL, JOGL ...
Comment 5 Sven Gothel 2013-10-19 07:06:11 CEST
Part 2/2 would be to add a Android test activity (jocl test) similar to JOGL's test activities
and let it show some JOCL information ..

Anybody up to the task ?

Me off till Tuesday ..
Comment 6 Sven Gothel 2013-10-19 07:11:58 CEST
CLDynamicLibraryBundleInfo: Add libPVROCL.so lookup if Android ..

.. forgot that detail.
Comment 7 Sven Gothel 2013-10-19 07:18:52 CEST
Continue at Bug 863