bmf
bmf copied to clipboard
使用torch.from_dlpack(vf.reformat(rgb).frame().plane(0))方法,会增加很多显存
人脸检测模型中使用torch.from_dlpack(vf.reformat(rgb).frame().plane(0))方法后显存明显增加了很多,输入是4K图片,使用与不使用这个方法显存差了500M左右
为了把数据给到torch,dlpack应该会额外占用一些显存做copy。
4K图片一张只有24M,但使用这个方法时增加了500M
4K图片一张只有24M,但使用这个方法时增加了500M
Can this be asked to the upstream community(torch)?