Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于推理速度 #32

Closed
anymyb opened this issue Nov 15, 2021 · 2 comments
Closed

关于推理速度 #32

anymyb opened this issue Nov 15, 2021 · 2 comments

Comments

@anymyb
Copy link

anymyb commented Nov 15, 2021

作者你好,首先感谢带来非常优秀的工作!
该项工作在理论计算量(flops)上有着非常明显的加速,但是在测试中发现,切块,判断,多分支推理的pipline实际消耗的推理时间似乎并没有优势,甚至更耗时。

  1. 切块用for循环效率最低
  2. 尝试过reshape图像[n,1,32,32]进GPU,送入网络直接获得全部分类序列,分组推理再合并,但实际耗时依旧达不到单分支的速度。

不知道作者是否有相关的优化经验可以交流下,万分感谢!

@Xiangtaokong
Copy link
Member

抱歉,我也没有相关优化经验。
可能应该建立一个缓冲池子多张图一起处理之类的,或者在一张图内做好资源的分配。这个工作主要是从研究角度提供这个思路,给出的代码是算法的原型,具体应用和优化方式按需而定。

@anymyb anymyb closed this as completed Nov 23, 2021
@anymyb
Copy link
Author

anymyb commented Nov 23, 2021

好的,感谢大佬回复!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants