PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.35k stars 2.84k forks source link

pre copy pinned data to gpu #8959

Closed wanghuancoder closed 1 month ago

wanghuancoder commented 1 month ago

DataLoader产生的Tensor有很多pinned memory的,在模型训练过程中,每使用一次Dataloader的Tensor就会发生一次同步H2D拷贝,造成CPU打断,进而影响性能。 本PR集中、异步将pinned Tensor转到GPU上。

paddle-bot[bot] commented 1 month ago

Thanks for your contribution!