PaddlePaddle / PaddleGAN

PaddlePaddle GAN library, including lots of interesting applications like First-Order motion transfer, Wav2Lip, picture repair, image editing, photo2cartoon, image style transfer, GPEN, and so on.
Apache License 2.0
7.75k stars 1.23k forks source link

【benchmark】add max_mem_reserved for benchmark #828

Closed mmglove closed 7 months ago

mmglove commented 7 months ago

训练benchmark 使用 API paddle.device.cuda.max_memory_reserved() 收集模型训练时的显存占用,因此本PR 修改 benchmark 打印日志部分,新增 max_mem_reserved max_mem_allocated 指标打印;如下:

[11/21 14:11:43] ppgan.engine.trainer INFO: Iter: 60/60 lr: 2.000e-04 loss_pix_stage2: 0.051 loss_pix: 0.051 loss: 0.102 batch_cost: 0.87721 sec reader_cost: 0.00123 sec ips: 4.55993 images/s eta: 0:00:00 max_mem_reserved: 13111791872 max_mem_allocated: 12578333440