MNN icon indicating copy to clipboard operation
MNN copied to clipboard

MNN android 平台 MNN_FORWARD_OPENCL使用gpu设备, inference 时间变长

Open chdzhen opened this issue 3 years ago • 4 comments

平台(如果交叉编译请再附上交叉编译目标平台): image# Platform(Include target platform as well if cross-compiling):

mac上编译android环境的so, 提供给Android Studio使用, 编译到apk文件,在小米note3上使用. 小米note3 硬件信息: CPU型号 高通 骁龙660 GPU型号 高通 Adreno512

Github版本:

Github Version:

commit a14ef5e265cb424b9dc3bc44beb41523c99e4891

编译方式:

Compiling Method

MNN/project/android/ 目录下使用build_64.sh 编译出 run_test.out 在安卓手机上运行 run_test.out all 3 log如下:

编译日志:

Build Log:

image

另外使用MNN_FORWARD_OPENCL 在小米note3上的时间如下: xiaomi note3: mnn gpu: DvfaceQuality Inference : 4.535ms Gaze Inference: 42.051ms DvfaceDetect Inference: 5.507ms

4线程+mnn gpu: DvFaceDetect Inference Time: 3.830 ms GAZE Inference Time: 41.617 ms DvFaceQuality Inference Time: 4.024 ms

mnn cpu: DvfaceQuality Inference : 4.886ms Gaze Inference: 38.284ms DvfaceDetect Inference: 6.115ms

chdzhen avatar Dec 10 '21 13:12 chdzhen

你关注的是哪个模型?推理时间变长是指?

bitxsw93 avatar Dec 13 '21 03:12 bitxsw93

gaze视线的模型(斑马网络), 推理时间变长是指模型在gpu上的推理时间、比在cpu上的推理时间还要长.

chdzhen avatar Dec 17 '21 09:12 chdzhen

你关注的是哪个模型?推理时间变长是指?

gaze视线的模型(斑马网络), 推理时间变长是指模型在gpu上的推理时间、比在cpu上的推理时间还要长.

chdzhen avatar Dec 17 '21 09:12 chdzhen

@chdzhen 你好,我也是和你一样在android手机部署模型,不知道是手机旧了还是其他什么原因,在用opencl加载的时候出现 SVM capalibilties: SVM_FINE_GRAIN_BUFFER SVM capalibilties: SVM_ATOMICS SVM capalibilties: SVM_FINE_GRAIN_BUFFER SVM capalibilties: SVM_ATOMICS SVM capalibilties: SVM_FINE_GRAIN_BUFFER SVM capalibilties: SVM_ATOMICS SVM capalibilties: SVM_FINE_GRAIN_BUFFER SVM capalibilties: SVM_ATOMICS Segmentation fault 你知道是啥原因吗

FengMu1995 avatar Jun 28 '22 09:06 FengMu1995