naibaf7 / caffe

Caffe: a fast open framework for deep learning. With OpenCL and CUDA support.
http://caffe.berkeleyvision.org/
Other
85 stars 20 forks source link

use CLBlast in arm(android) #37

Closed zazd closed 8 years ago

zazd commented 8 years ago

Follow your suggestion, I use CLBlast to instead of clBLAS. However, When I use CLBlast, it take me about 30s to run a picture(can get the right output). And during that time, the device get much stutters until finishing. So is something wrong with me? Should I tune the CLBlast manully? How to turn in android?

Thank you !

CNugteren commented 8 years ago

Which device are you running on? Mali-764? There is indeed no tuning available yet for that device. And which version of CLBlast are you running? Perhaps it is a good idea to first run CLBlast's included performance tests and then see if that's OK.

I see you also have an open issue at the CLBlast repository. Is that one fixed already?

psyhtest commented 8 years ago

Mali-764 is similar to Mali-T628, for which tuning has been done. Is is possible to force to use the Mali-T628 autotuned configuration on this device?

CNugteren commented 8 years ago

In this case it will use the 'default' settings for ARM GPUs since it doesn't recognise the device. Luckily, these default settings are computed based on other devices of the same type. Since there is only one ARM GPU with tuning data at this point (the Mali-T628), the defaults the Mali-764 uses will be exactly equal to the settings used for the Mali-T628. So the tuning shouldn't be an issue then.

zazd commented 8 years ago

@CNugteren Thanks. I use Mali-764. It seems that do the CLBlast's included performance tests in android will cost me too much time, so I do not make the tests. I will hava a mali-T628 device of linux tomorrow or later, I will do the tests. I have an open issue at the CLBlast repository, I solve it by cross compile CLBlast successfully last week. @psyhtest How can I get the tuning of Mali-T628, I use -DCL_DEVICE_NAME=ARM Mali-T628 GPU while cmake (right?) but it is not used.

zazd commented 8 years ago

@CNugteren How can I get the tuning of Mali-T628 ? Thanks.

CNugteren commented 8 years ago

@zazd See my comment above, you don't need to do anything special since the only Mali device it is tuned for is the T628. So the defaults (which you will use) are exactly the same as the T628. If you are asking how to do the tuning yourself, then I would point to the CLBlast README first. Let me know if you have any specific questions about doing the tuning if that's what you mean.

zazd commented 8 years ago

OK, I didn't understand what you means before. Thank you for your help.