How can one verify whether a Android Mobile Device supports GPU renderscript or not?

女生的网名这么多〃 提交于 2019-12-04 01:34:17

问题


Is there a good way to verify whether algorithms written in renderscript are CPU or GPU bound?

I understand that this decision is made runtime on the device, however, I see inconsistent trace information on Nexus 5 and Nexus 10 devices. Nexus 10 logcat spits out info saying that the algorithm is moved back to CPU (if GPU cant handle the kernels), while there is no such trace (as far as I have seen) on Nexus 5.

One obvious, but less precise way, is to use execution time of rs based algorithms to address the above question.

However, lately, when I started testing my scripts on Nexus 5, I see that algorithms that are running on GPU on Nexus 10, now APPEAR to be running on CPUS on Nexus 5. I would like to confirm this more precisely.

One can imagine why this could be a problem. If one aims to build an app that is expected to give a similar performance across the same class of devices (quad cores, good enough GPU - Mali6xx, Adreno3xx), then the performance across these class of devices will not be reliable, since algorithms that benefit from GPU will likely have bad performances on CPU


回答1:


Nexus 5 and Nexus 10 have different GPUs (and thus different GPU drivers written by completely different software teams). They are not going to accelerate the same kinds of code well, because they are very different architectures. We are trying to get some consistent logging from those drivers, but there won't be public updates for quite a while (since we don't push out new GPU drivers for AOSP very often).



来源:https://stackoverflow.com/questions/21150292/how-can-one-verify-whether-a-android-mobile-device-supports-gpu-renderscript-or

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!