如何验证Android移动设备是否支持GPU渲染脚本? [英] How can one verify whether a Android Mobile Device supports GPU renderscript or not?

查看:79
本文介绍了如何验证Android移动设备是否支持GPU渲染脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种很好的方法来验证用渲染脚本编写的算法是否受CPU或GPU约束?

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

我知道此决定是在设备上运行的,但是我发现Nexus 5和Nexus 10设备上的跟踪信息不一致.Nexus 10 logcat吐出信息说该算法已移回CPU(如果GPU无法处理内核),而在Nexus 5上则没有这种跟踪(据我所知).

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.

一种明显但不太精确的方法是使用基于rs的算法的执行时间来解决上述问题.

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

但是,最近,当我开始在Nexus 5上测试脚本时,我发现在Nexus 10(现在 APPEAR )上的GPU上运行的算法可以在Nexus 5的CPUS上运行.想更准确地确认这一点.

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.

可以想象为什么这可能是个问题.如果有人希望构建一款可在同类设备(四核,足够好的GPU-Mali6xx,Adreno3xx)上提供相似性能的应用程序,那么此类设备之间的性能将不可靠,因为算法会GPU带来的好处可能会导致CPU性能下降

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

推荐答案

Nexus 5和Nexus 10具有不同的GPU(因此,由完全不同的软件团队编写的不同的GPU驱动程序).它们不会很好地加速相同类型的代码,因为它们是非常不同的体系结构.我们正在尝试从这些驱动程序中获取一些一致的日志记录,但是很长一段时间都不会进行公共更新(因为我们不经常为AOSP推出新的GPU驱动程序).

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

这篇关于如何验证Android移动设备是否支持GPU渲染脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆