未验证 提交 255890ff 编写于 作者: R Ruibiao Chen 提交者: GitHub

Release memory cache after build_op_func_list in interpretercore (#46670)

上级 136b1f42
......@@ -744,6 +744,12 @@ void build_op_func_list(const platform::Place& place,
interpreter::LogDeviceMemoryStats(place);
}
// NOTE(Ruibiao): Release memory cache to avoid memory fragments in Allocator.
// It reduce about 10% memory usage for V100 8-GPU training of
// transformer_base_bs4096_amp_fp16 and transformer_base_bs4096_pure_fp16
// model.
memory::Release(place);
}
void add_fetch(const std::vector<std::string>& fetch_names,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册