[FFmpeg-devel] [PATCH 1/3][GSoC] Add mutithread function for dnn_backend_native_layer_conv2d.c
Mark Thompson
sw at jkqxz.net
Mon Aug 31 23:41:06 EEST 2020
On 31/08/2020 18:03, xujunzz at sjtu.edu.cn wrote:
> From: Xu Jun <xujunzz at sjtu.edu.cn>
>
> Use pthread to multithread dnn_execute_layer_conv2d.
> Can be tested with command "./ffmpeg_g -i input.png -vf \
> format=yuvj420p,dnn_processing=dnn_backend=native:model= \
> espcn.model:input=x:output=y -y sr_native.jpg -benchmark"
>
> before patch: utime=11.238s stime=0.005s rtime=11.248s
> after patch: utime=20.817s stime=0.047s rtime=1.051s
Can you explain why it uses almost twice as much total CPU time after the patch? That seems rather more than can be explained away as scheduling overhead.
If it's actually doing significantly more then maybe you want to document somewhere that enabling threading will improve latency at the cost of throughput.
- Mark
More information about the ffmpeg-devel
mailing list