XiaoMi / mace

MACE is a deep learning inference framework optimized for mobile heterogeneous computing platforms.
Apache License 2.0
4.94k stars 819 forks source link

Question about hexagon DSP libhexagon_controller.so #600

Closed huanyingjun closed 4 years ago

huanyingjun commented 4 years ago

hello Mace DSP is based on hexagon nnlib, what is libhexagon_controller.so used for? where is the source code for libhexagon_controller.so ?

thanks very much.

lee-bin commented 4 years ago

@huanyingjun libhexagon_controller.so is used to link with MACE to call stub routine of nnlib. You can find more info from here.

huanyingjun commented 4 years ago

@lee-bin 感谢您的回复 用mace跑DSP需要手机有root权限并将libhexagon_nn_skel.so push到 /system/vendor/lib/rfsa/adsp/

我对比了tflite,tflite hexagon delegate不需要手机root权限,可以将libhexagon_nn_skel.so push到手机的任意目录,然后在代码进行相应设置就可以了。 Mace是否也可以增加类似功能?这样调式DSP会方便很多。

tflite 设置DSP路径代码 dsp

lee-bin commented 4 years ago

可以的,用ADSP_LIBRARY_PATH设置libhexagon_nn_skel.so目录即可。

huanyingjun commented 4 years ago

thanks