-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Allocator] add new allocator strategy #62638
[Allocator] add new allocator strategy #62638
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
Sorry to inform you that ec1c828's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall,但建议还是酌情考虑下新增逻辑的管理方式
namespace memory { | ||
namespace allocation { | ||
|
||
class AutoGrowthBestFitAllocatorV2 : public AutoGrowthBestFitAllocator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以 V2 为后缀命名文件和类,但其实这里并不一定能够会将其在框架默认开启吧?使用一个单独的namespace做管理是不是比V2更好一些?从之前的经验来看,涉及到V2未来就要考虑退场的问题。
PR types
Performance optimization
PR changes
Others
Description
Pcard-74613
添加新的显存策略尝试优化显存碎片。
打开方法:export FLAGS_use_auto_growth_v2=1
对外暴露了_set_warmup接口,用于应用标记warmup结束:
目前CI CE主要通过max_mem_reserved统计显存使用情况。这个策略,由于早期会申请冗余显存块,所以会显得峰值更高。