设备覆盖率

芯片 手机名称 ro.vendor.hiaiversion
Kirin 810
(0.8T)
nova 5 100.300.XXX.XXX
100.310.XXX.XXX
100.320.XXX.XXX
nova 5i Pro
nova 5z
nova 6 SE
荣耀20S
荣耀Play4T Pro
荣耀9X
荣耀9X Pro
华为MatePad 10.4
Kirin 820(1.7T) nova 7 SE 5G 100.320.XXX.XXX
100.330.XXX.XXX
荣耀30S
荣耀X10
Kirin 985(1.7T) nova 7 5G 100.320.XXX.XXX
100.330.XXX.XXX
nova 7 Pro 5G
荣耀30
Kirin 990(1.7T) HUAWEI Mate 30 100.310.XXX.XXX
100.320.XXX.XXX
100.330.XXX.XXX
HUAWEI Mate 30 Pro
华为P40
华为P40 Pro
华为P40 Pro+
nova 6
nova 6 5G
荣耀30 Pro
荣耀30 Pro+
荣耀Play4 Pro
荣耀V30
华为MatePad Pro
Kirin 990 5G
(3.5T)
HUAWEI Mate 30 5G 100.310.XXX.XXX
100.320.XXX.XXX
100.330.XXX.XXX
HUAWEI Mate 30 Pro 5G
荣耀V30 PRO
Kirin 990E HUAWEI Mate 30E Pro 5G
Kirin 9000E HUAWEI Mate 40 100.500.XXX.XXX
Kirin 9000
(6T)
HUAWEI Mate 40 Pro
HUAWEI Mate 40 Pro+
HUAWEI Mate 40 RS

op支持情况

非量化 量化
convolution depthwise convolution convolutionInt8
pooling softmax depthwise convolutionInt8
binary concat eltwiseInt8
convertTensor eltwise FloatToInt8
expandDims gatherV2 Int8ToFloat
InterP MatMul
NonMaxSuppressionV2 Pack
Reduction Reshape
scale slice
sliceTf squeeze
stridedSlice topkV2
unary Relu / LeaklyRelu

使用步骤

下载hiai官方ddk

  1. 从链接下载对应的ddk(https://appfile1.hicloud.com/FileServer/getFile/app/011/111/111/0000000000011111111.20200831183824.03365206280802969846501771786579:20471231000000:0001:2D8888631AD37485136063C258566ECAFD6D3127A5F44F006D53481C72A52D9C.zip?needInitFileName=true
  2. 拷贝相对应的so和include文件到hiai/3rdParty目录下

ddk目录:
image.png

hiai/3rdParty目录(注意目录+文件夹命名):
image.png

编译执行

  1. cmake 参数打开npu开关: -DMNN_NPU:BOOL=true
  2. backend type设置成:MNN_FORWARD_USER_0
  3. 执行可执行程序(需动态加载:libMNN_NPU.so, libhiai_ir_build.so, libhiai_ir.so, libhiai.so)