ShannonAI / service-streamer

Boosting your Web Services of Deep Learning Applications.
Apache License 2.0
1.22k stars 187 forks source link

在cpu上能获得加速吗? #57

Closed gikerch closed 4 years ago

gikerch commented 4 years ago

在cpu上能获得加速吗?我打印出来的batch都是1

qiuwei commented 4 years ago

cpu 调大batch 也没啥用,离线情况下batchify以后 差不多能得到1.2的加速比,但是考虑这里你需要等一段时间凑齐batch,所以可以认为几乎没有加速。

gikerch commented 4 years ago

谢谢,我尝试过了,有一定效果,wrk 并发测下来大概有3-4倍的提升

alanwang93 commented 4 years ago

cpu 调大batch 也没啥用,离线情况下batchify以后 差不多能得到1.2的加速比,但是考虑这里你需要等一段时间凑齐batch,所以可以认为几乎没有加速。

CPU调大batch还是有用的吧,我测试的结果和batch size=10能比batch_size=1快6-7倍。