News for hackers. Stuff that matters.
Re:Nvidia CEO Introduces Nvidia Ampere Architecture, Nvidia ... by pjmlp on Friday May 15, 2020 @01:31AM (#23189189)
OpenCL is only supported via hacks to install shared libraries into one own's device.

Vulkan even if optional until Android 10, it is supported by the SDK since version 7, which is something that OpenCL never had.

No serious Android developer would make their life even harder than it already is with the official APIs, by making use of an API that requires device owners to manually install libraries via ADB.

Re:Nvidia CEO Introduces Nvidia Ampere Architecture, Nvidia ... by fulafel on Friday May 15, 2020 @09:57AM (#23192210)
Hmm, is the OpenCL situation really that fringe on android? Eg this OpenCL info app[1] description says "Even though OpenCL™ isn't part of the Android platform, it's available on many recent devices. On Android it's usually used as a back-end for other frameworks like Renderscript. Some manufacturers are providing SDKs for developers to use OpenCL™ on Android. "

I addition to the mentioned PowerVR and Intel platforms there seems to be Android OpenCL also for Mali and Adreno GPUs.

[1] https://apkpure.com/opencl%E2%84%A2-info/com.xh.openclinfo

Re:Nvidia CEO Introduces Nvidia Ampere Architecture, Nvidia ... by pjmlp on Saturday May 16, 2020 @03:18AM (#23201170)
Yes it is, it is not exposed via the SDK, regardless how Renderscript ends up being compiled to machine code.

You won't find any reference to OpenCL here,

https://source.android.com/

https://developer.android.com/

So while those SDKs do exist, they aren't for application developers, rather for OEMs themselves.

You as application developer have zero control about what GPUs the customers might be using, there is no way to control it on Android manifests, only to specify what APIs are expected, which again, don't have OpenCL as part of the list.

https://developer.android.com/guide/topics/manifest/manifest...

So if you as application developer want to use said SDKs, it is only for your own device, most likely rooted, don't expect to sell applications on the store using OpenCL.

Re:Nvidia CEO Introduces Nvidia Ampere Architecture, Nvidia ... by fulafel on Saturday May 16, 2020 @04:38AM (#23201595)
Yep, you can't of course rely on OpenCL support, you have to provide a fallback. But are there any issues with including the SDK supplied OpenCL ICDs with the APK, for use with validated GPUs?
Re:Nvidia CEO Introduces Nvidia Ampere Architecture, Nvidia ... by pjmlp on Saturday May 16, 2020 @11:57AM (#23204478)
Yes, that is not how Android works.

You are not allowed to ship drivers like that, and since version 7, there is kernel validation about stable NDK APIs.

So yeah just because there is an OpenCL SDK for Mali, doesn't mean that a random Android device with Mali will have the drivers or kernel support in place, because that isn't something that Android requires.

Google has collaborated with Adobe in porting their OpenCL shaders to Vulkan.

If they actually cared, they would have made OpenCL available instead.

Re:Nvidia CEO Introduces Nvidia Ampere Architecture, Nvidia ... by fulafel on Sunday May 17, 2020 @05:14AM (#23210749)
I see, thanks for the explanation. Oh well, let's see where things go with Vulkan compute.