bug描述 Describe the Bug
将dlpack的数据循环传入paddle的Tensor,不会释放内存, torch,tensorflow均不会出现该问题
import cupy as cp
def test1():
print("using paddle")
from paddle.utils.dlpack import from_dlpack
for i in range(100):
a = cp.random.random((1024*128, 1024), dtype=cp.float32)
b = from_dlpack(a.toDlpack())
print(i)
def test0():
for i in range(100):
a = cp.random.random((1024*128, 1024), dtype=cp.float32)
def test2():
from torch import from_dlpack
print("using torch")
for i in range(100):
a = cp.random.random((1024*128, 1024), dtype=cp.float32)
b = from_dlpack(a.toDlpack())
其他补充信息 Additional Supplementary Information
paddle-gpu == 2.3.2
cupy == 11.2
torch == 1.10.0 / 1.12.0
cuda 11.2 / 11.6
GPU : 3090/ 1080Ti
Ubuntu 1804
2条答案
按热度按时间zfciruhq1#
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档 、 常见问题 、 历史Issue 、 AI社区 来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API , FAQ , Github Issue and AI community to get the answer.Have a nice day!
z4iuyo4d2#
问题已收到,相关同学会跟进