“乔丹杯”第十二届中国运动装备设计大赛拉开序幕

paddle.device.cuda. empty_cache ( ) None [source]
百度 怎能去过享受的生活呢从我的身体的实际出发,不能担任繁重的脑力劳动,不能当领导干部了,回农村搞些体力劳动还是可以的,这样既不给国家增加负担,对我也是一个锻炼嘛!”他还常说:“活着就要为国家做事情,做不了大事就做小事,干不了复杂重要的工作就做简单的工作,决不能无功受禄,决不能不劳而获。

Releases idle cached memory held by the allocator so that those can be used in other GPU application and visible in nvidia-smi. In most cases you don’t need to use this function, Paddle does not release the memory back to the OS when you remove Tensors on the GPU, Because it keeps gpu memory in a pool so that next allocations can be done much faster.

Examples

>>> 
>>> import paddle
>>> paddle.device.set_device('gpu')

>>> tensor = paddle.randn([512, 512, 512], "float64")
>>> del tensor
>>> paddle.device.cuda.empty_cache()