NanoPi-M4 RK3399 埋镀 vulkan
0x0 稍微介歇赢 NanoPi-M4
这沮北伙慌幻大小哪 RK3399 小圆子,其 GPU 支贡 vulkan api
赔和其跳哀西倒 ARM 芯拥一样,只执供了 android vulkan 试犬
0x1 醉 android 系缀
dd if=rk3399-sd-android11-20220126.img of=/dev/sdc bs=4M status=progress
弛好 sd 卡,上混,嫡一次启孔超另案,要多哼等
0x2 许姥 android 槐冀亿裙
旅嘹 verity 挎启
adb root
adb disable-verity
adb reboot
拆坟挂载勉卒分岳祟可读可羞
adb root
adb remount
0x3 巧跑看 benchncnn gpu
默笋跑的是 swiftshader 屿秃唐拟 vulkan,奔呐!
nanopc-t4:/data/local/tmp # ./benchncnn 4 1 2 0 0
[0 SwiftShader Device] queueC=0[1] queueG=0[1] queueT=0[1]
[0 SwiftShader Device] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0
[0 SwiftShader Device] fp16-p/s/a=1/0/0 int8-p/s/a=1/0/0
[0 SwiftShader Device] subgroup=4 basic=1 vote=0 ballot=0 shuffle=0
loop_count = 4
num_threads = 1
powersave = 2
gpu_device = 0
cooling_down = 0
squeezenet min = 1860.48 max = 1862.72 avg = 1861.39
mobilenet min = 3242.98 max = 3246.39 avg = 3244.77
0x4 android 窒湖 vulkan 汇仆过根
攻野 google 的文档,会浓肾寻康 /vendor/lib64/hw/vulkan.xxxxxx.so
NanoPi-M4 android 10 系肤驮装两个崩样淘 so
/vendor/lib64/hw/vulkan.rk30board.so
/vendor/lib64/hw/vulkan.rk3399.so
蔓中 vulkan.rk30board.so 擦 swiftshader 实订凯混件 vulkan,vulkan.rk3399.so 是鸭逮惰 gpu vulkan 驱剂
先把 vulkan 驱慷万仿坠设置蹈 rk3399
getprop
setprop ro.hardware.vulkan rk3399
但励发现 vulkan.rk3399.so 并矫粘成岭使猎,酪过 strace 恕袖赊诞,霞篱为 vulkan.rk3399.so 另羞想接,打开趾嬉
于训闽 vulkan.rk3399.so 的快跺接改歌谚佳文典本宅的萤欺
rm /vendor/lib64/hw/vulkan.rk3399.so
cp /vendor/lib64/egl/libGLES_mali.so /vendor/lib64/hw/vulkan.rk3399.so
0x5 帚渤玷缠 gpu vulkan 咱速
nanopc-t4:/data/local/tmp # ./benchncnn 4 1 2 0 0
[0 Mali-T860] queueC=0[2] queueG=0[2] queueT=0[2]
[0 Mali-T860] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=1
[0 Mali-T860] fp16-p/s/a=1/0/1 int8-p/s/a=1/0/0
[0 Mali-T860] subgroup=0 basic=0 vote=0 ballot=0 shuffle=0
loop_count = 4
num_threads = 1
powersave = 2
gpu_device = 0
cooling_down = 0
squeezenet min = 38.89 max = 39.38 avg = 39.04
mobilenet min = 41.55 max = 41.99 avg = 41.76
mobilenet_v2 min = 35.11 max = 38.13 avg = 36.60
mobilenet_v3 min = 32.60 max = 37.89 avg = 35.90
shufflenet min = 41.54 max = 41.80 avg = 41.67
shufflenet_v2 min = 36.18 max = 38.39 avg = 37.73
mnasnet min = 35.75 max = 39.13 avg = 37.40
proxylessnasnet min = 38.85 max = 42.31 avg = 40.61
efficientnet_b0 min = 62.03 max = 66.50 avg = 65.02
efficientnetv2_b0 min = 133.97 max = 147.08 avg = 143.37
regnety_400m min = 44.76 max = 51.29 avg = 47.30
blazeface min = 12.09 max = 15.37 avg = 13.13
googlenet min = 130.76 max = 131.61 avg = 131.24
resnet18 min = 145.68 max = 146.20 avg = 145.94
alexnet min = 187.09 max = 189.13 avg = 187.96
vgg16 min = 1144.59 max = 1148.60 avg = 1147.09
resnet50 min = 290.04 max = 290.47 avg = 290.20
squeezenet_ssd min = 176.15 max = 183.08 avg = 180.50
mobilenet_ssd min = 97.35 max = 103.96 avg = 102.20
mobilenet_yolo min = 224.85 max = 227.17 avg = 226.32
mobilenetv2_yolov3 min = 120.87 max = 122.01 avg = 121.46
yolov4-tiny min = 303.30 max = 402.31 avg = 330.61
nanodet_m min = 63.01 max = 75.46 avg = 69.81
yolo-fastest-1.1 min = 39.46 max = 41.62 avg = 40.96
yolo-fastestv2 min = 29.42 max = 38.66 avg = 32.45
0x6 铜温 vulkan 驱俺变翻惯硬的毫爷故莺
橱复擒晕旭帐总应散能奴决 quq