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

StackOverflow https://stackoverflow.com/questions/21150292

  •  28-09-2022
  •  | 
  •  

Domanda

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

È stato utile?

Soluzione

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).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top