Dygraph【benchmark】add max_mem_reserved for benchmark #11284
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR 类型 PR types
Others
PR 变化内容类型 PR changes
Others
描述 Description
训练benchmark 使用 API paddle.device.cuda.max_memory_reserved() 收集模型训练时的显存占用,因此本PR 修改 benchmark 打印日志部分,新增 max_mem_reserved max_mem_allocated 指标打印;如下:
[2023/11/20 17:28:15] ppocr INFO: epoch: [5/24], global_step: 120, lr: 0.000044, loss: 0.033199, avg_reader_cost: 0.00022 s, avg_batch_cost: 0.08772 s, avg_samples: 3.0, ips: 34.19967 samples/s, eta: 0:10:28, max_mem_reserved: 13032679680 B, max_mem_allocated: 11247544832 B