Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求 Android GPU 支持 #8

Closed
llj098 opened this issue Sep 25, 2017 · 8 comments
Closed

求 Android GPU 支持 #8

llj098 opened this issue Sep 25, 2017 · 8 comments

Comments

@llj098
Copy link

llj098 commented Sep 25, 2017

求 Android GPU 支持。

BTW,已经看到 TODO 里面写了这个,使用什么方案支持 Android GPU 呢?

@cocodark
Copy link
Contributor

我们计划使用openCL,如果你有这方面经验,欢迎加入我们

@llj098
Copy link
Author

llj098 commented Sep 25, 2017

@cocodark renderscript 应该比 opencl 好一些吧?有些测试看,opencl 表现不稳定,不少机器要比 CPU 还差

@allonli
Copy link
Collaborator

allonli commented Sep 25, 2017

rs我们尝试过了,问题比opencl还多。opencl我们是和arm同步信息后决定的。arm的acl框架使用的cl为gpu运算。

@allonli
Copy link
Collaborator

allonli commented Sep 25, 2017

另外gpu比cpu差是大部分android机型的实际表现,其实只有少数机型gpu可以跑赢cpu

@daquexian
Copy link
Contributor

Pixel 表示不支持 OpenCL。。这个 rs 的库 自称有最高 60 倍加速,虽然这个数据肯定不能信,但 renderscript 真的会比纯 cpu 慢吗,在网上搜了一下也没有人报告用这个库比其他的 CPU 库慢🙈🙈

@xinyu391
Copy link

xinyu391 commented Sep 26, 2017

OpenCL 确实要比CPU差点,部分亲儿子手机,还不带OCL库。其他的OCL库又不一致。
手机目前最高支持OCL1.2,仍有部分手机还是1.1
Arm的ACL里面ocl计算矩阵代码没有太多优化。三大手机GPU硬件特性不一样,要性能,就得分别优化。
RS也确实比较蛋疼。

@llj098
Copy link
Author

llj098 commented Sep 26, 2017

@xinyu391 RS 蛋疼的地方有哪些?

@xinyu391
Copy link

@llj098
不支持native中调用RS,我们项目算法库都是C/C++的。如果native中调用Java的RS代码,性能就没优势了,尤其是数据量比较大时,还受Android应用内存大小的限制。
Android早期一个版本ndk中还有RS接口代码,后来又没了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants