sipeed / TinyMaix

TinyMaix is a tiny inference library for microcontrollers (TinyML).
Apache License 2.0
888 stars 143 forks source link

Optimize int8 for C906 #47

Closed sunnycase closed 1 year ago

sunnycase commented 1 year ago

Benchmark:

on D1-H

TM_MDL_INT8 (ms)

config vww96 mbnet128
O1 RV64V 29.320 -> 25.6 (fps +14.5%) 58.957 -> 37.8 (fps +56%)
Zepan commented 1 year ago

还需要处理下默认的 tm_layers.c里的147~152行,因为在O0时 会重复定义 l_postprocess_sum
以及可以把 l_postprocess_sum 重命名成 tm_postprocess_sum (原来的l前缀代表的是local,剥离出来的话可以就使用一般性tm前缀)

sunnycase commented 1 year ago

还需要处理下默认的 tm_layers.c里的147~152行,因为在O0时 会重复定义 l_postprocess_sum 以及可以把 l_postprocess_sum 重命名成 tm_postprocess_sum (原来的l前缀代表的是local,剥离出来的话可以就使用一般性tm前缀)

Fixed.