Forums - Snapdragon OpenCL Developer Guide

9 posts / 0 new
Last post
Snapdragon OpenCL Developer Guide
Monkey
Join Date: 10 Oct 13
Posts: 11
Posted: Fri, 2013-11-22 00:19

Hi,

I downloaded Adreno SDK for Linux and was going through the OpenCL developer guide.

I am new to Android. But very familiar with OpenCL.

I am trying to interpret the following from the guide. Can someone help me?

 

Locate the following libraries:

 libOpenCL.so

 libllvm-a3xx.so

 libgsl.so

 libstlport.so

 libcutils.so

These libraries must be installed in the NDK at $ANDROID_NDK/platforms/android-14/arch-arm/usr/lib.

You can pull the libraries from your Android build distribution from out/target/product/msm8960/system/lib.

Alternatively, you can also pull the libraries from the Qualcomm development device.

adb pull /system/lib/libOpenCL.so, etc.

 

How do I get access to the "Android Build Distribution"? Will this differ from one Smartphone vendor to another - even if they all use same Android base version?

Also, Will a Qualcomm powered smartphone be considered as "Qualcomm development device"? (or) Does it refer to the Qualcomm Development board?

Please help me understand.

I see an OpenCL.lib in the SDK but this is for Windows. I dont see a similar one in the "ubuntu" folder.

Can someone help please?

Thanks,

  • Up0
  • Down0
Monkey
Join Date: 10 Oct 13
Posts: 11
Posted: Sun, 2013-11-24 23:59

Anyone there? Can one of you help?

  • Up0
  • Down0
Monkey
Join Date: 10 Oct 13
Posts: 11
Posted: Mon, 2013-11-25 20:17

Hello,

Can somebody help me out here? I am trying to build an APK for Qualcomm platform and I need to understand where I should get libOpenCL.so and friends from?

Thanks,

  • Up0
  • Down0
Monkey
Join Date: 10 Oct 13
Posts: 11
Posted: Tue, 2013-11-26 08:43

The amazingly resolute silence can mean one of the following:

1. Qualcomm does not support OpenCL developers for Smartphones.

2. This forum is not well attended and Q does not care.

3. People dont like my name and are un-willing to respond to a Smart Monkey working on Smart Phones

4. Even Qualcomm is not sure how to build OpenCL apps for its platform. For e.g. The OpenCL Sample APK file does not work on Samsung S4 (with Qualcomm chipset Adreno 330) although all 5 libraries are present on the device.

 

  • Up0
  • Down0
Dave Astle
Profile picture
Join Date: 19 Oct 12
Location: San Diego, CA
Posts: 99
Posted: Tue, 2013-11-26 09:19

5. You posted your question at a time when the person best suited to answer it is extremely busy and about to leave on vacation.

We are unable to ship the libraries as part of our SDK, but you can grab the necessary .so files from almost any recent Snapdragon powered phone. OpenCL development on Android is unfortunately not straightforward because it's not officially supported.

  • Up0
  • Down0
khawkins Moderator
Join Date: 29 Nov 12
Location: San Diego, CA
Posts: 62
Posted: Tue, 2013-11-26 09:31

It appears the OpenCL Developer Guide may have some bad instructions and references to "Android Build Distribution" are a mistake. We will need to correct that.

You will need to get the libOpenCL.so off your device and link with it. Depending on where you put the libOpenCL.so library, you may need to modify the makefile so it knows where to find it. I recommend looking at the README.txt in the SDK/Development/Samples/OpenCL directory for build instructions for the samples.

The OpenCL.lib we include in the lib directory is for Windows only in the case that you want to run a sample on your desktop. It is not for running on device, and we do not have the equivalent for Ubuntu yet in the SDK.

  • Up0
  • Down0
Monkey
Join Date: 10 Oct 13
Posts: 11
Posted: Tue, 2013-11-26 21:42

Dave and Kevin,

Thanks for stepping in to support. Appreciate it much. Sorry about the disgruntled 4-point rant above.

I am still a bit confused.

Few questions :

0) On One hand, Qualcomm is rolling out Adreno SDK with OpenCL Samples on it. On the Other hand, you say OpenCL is not officially supported on Android. So, as a serious developer, How should I look at the samples? What will be your advice to us? Should we go for OpenCL (or) Just stay away until the boat stabilizes?

1)  It would be very helpful if Qualcomm lists all Android Smart Phones with Qualcomm GPUs (in the market) that can work with OpenCL.  This will help us understand the reach of our application. This is very important for us. 

     According to the little information I have gathered, OpenCL support would depend upon

     a) GPU Driver Shipped with the SmartPhone -- I believe Qualcomm has a say in this.

     b) Placement of libraries -- Who has the say in this? Qualcomm (or) Handset Vendor?

2) The hello-cl sample APK provided in the Adreno SDK does not work with Samsung S4 I9505 device - which hosts an Adreno 3xx GPU. The device has all the libraries in place. This is scary for App developers. If something is shipped by Qualcomm, we expect that to work on a device with all the libraries in place. :-(

3) Should we download libOpenCL.so and friends for every such device having a Qualcomm Adreno 3xx GPU and build a separate APK for each smartphone?  Say - We get the libraries from latest Samsung S4 I9505 and build an APK - Will it work on all Android devices hosting an Adreno 3xx GPU?  (or) Should I pull libraries from each and every device I wish to support and build a separate APK?

Thanks for your time on this,

And, Have a great Vacation ahead! Sorry to bother you now....

Best Regards,

OMonk

  • Up0
  • Down0
oliver.reiche
Join Date: 27 Nov 13
Posts: 1
Posted: Wed, 2013-11-27 05:52

Hi,

I am also trying to run OpenCL on a recent Snapdragon device (Nexus 5 running Kit Kat). Unfortunatly this is on one of the rare devices that is shipped without any OpenCL driver (or at least I am not able to find it--tried objdump over all libs). So I was very happy to see a libOpenCL.so in the Adreno drivers package for Jelly Bean MR1 found here: https://developer.qualcomm.com/mobile-development/mobile-technologies/gaming-graphics-optimization-adreno/tools-and-resources.

After several attempts with different NDK versions (8b/8c/8d/9/9b), target platforms (14/18/19), and compilers (ndk-build/standalone toolchain), I don't get it to work. For all of these combinations, it compiles just fine but fails to execute (without even processing a single line of code) and returns code '134':

shell@hammerhead /data/local/tmp $ ./DeviceQuery
Aborted
shell@hammerhead /data/local/tmp $ echo $?
134

The same happens with root rights. Libraries are properly installed in /system/lib. Note that I am using Android Kit Kat, because earlier versions are not avaialbe for this device.

Hence, I assume the provided drivers can only be used with Jelly Bean MR1 and won't work on Kit Kat. Is this assumption correct or is there something else wrong with my setup? If so, does Qualcomm plan to release new OpenCL drivers for more recent Android versions in the future?

(It is very disappointing that Goolge pulled OpenCL support in 4.3. The more I appreciate the work of you hardware vendor guys for making OpenCL available to at least developers that really want it!)

Thanks a lot in advance,
Oliver

  • Up0
  • Down0
euge
Join Date: 4 Dec 13
Posts: 2
Posted: Wed, 2013-12-18 11:13

Hi, I am looking for a way to install openCL libs to a Samsung s4 and also Nexus 5. How can we do that?

My devices both do not have openCL libs installed. Where would they be in case they are?

We are on Kitkat 4.4 and cyanogenmod 11

Thanks a lot

E

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.