参考链接:empty_cache-API文档-PaddlePaddle深度学习平台
import paddle
# required: gpu
paddle.set_device("gpu")
#tensor = paddle.randn([512, 512, 512], "float")
#del tensor
paddle.device.cuda.empty_cache()
参考链接:empty_cache-API文档-PaddlePaddle深度学习平台
import paddle
# required: gpu
paddle.set_device("gpu")
#tensor = paddle.randn([512, 512, 512], "float")
#del tensor
paddle.device.cuda.empty_cache()