[ 仅 API 调用方式不一致 ]torch.cuda.reset_max_memory_allocated
torch.cuda.reset_max_memory_allocated
torch.cuda.reset_max_memory_allocated(device=None)
paddle.device.cuda.reset_max_memory_allocated
paddle.device.cuda.reset_max_memory_allocated(device=None)
两者功能一致,但调用方式不一致,具体如下:
转写示例
# PyTorch 写法
result = torch.cuda.reset_max_memory_allocated()
# Paddle 写法
result = paddle.device.cuda.reset_max_memory_allocated()