Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用torch.from_dlpack(vf.reformat(rgb).frame().plane(0))方法,会增加很多显存 #116

Open
zhangsong1234 opened this issue May 23, 2024 · 2 comments

Comments

@zhangsong1234
Copy link

人脸检测模型中使用torch.from_dlpack(vf.reformat(rgb).frame().plane(0))方法后显存明显增加了很多,输入是4K图片,使用与不使用这个方法显存差了500M左右

@sfeiwong
Copy link
Collaborator

为了把数据给到torch,dlpack应该会额外占用一些显存做copy。

@zhangsong1234
Copy link
Author

4K图片一张只有24M,但使用这个方法时增加了500M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants