Really appreciate a great blog and clear demo.
I implemented my own version of COCO loader based on your TorchSerializedList and the default RAM usage decreases significantly. However, when I set pin_memory=True in PyTorch dataloader, I see that USS gets increased quite a lot while the shared memory stays the same for the default COCODetection and TorchSerializedList
| |
RSS |
USS |
Shared |
| default / pin_memory=True |
7.31GB |
3.45GB |
3.87GB |
| default / pin_memory=False |
4.31GB |
455.76MB |
3.87GB |
| shm / pin_memory=True |
4.72GB |
3.65GB |
1.22GB |
| shm / pin_memory=False |
1.72GB |
508.69MB |
1.22GB |
From a quick search, the shared memory doesn't seem to work with pin_memory well according to this thread
. Detectron2 repo doesn't seem to use any pin_memory in the dataloader. Can you provide your thoughts on relationship of using the serialized dataset with pin_memory=True?
Thanks!
Really appreciate a great blog and clear demo.
I implemented my own version of COCO loader based on your
TorchSerializedListand the default RAM usage decreases significantly. However, when I setpin_memory=Truein PyTorch dataloader, I see that USS gets increased quite a lot while the shared memory stays the same for the defaultCOCODetectionandTorchSerializedListFrom a quick search, the shared memory doesn't seem to work with pin_memory well according to this thread
. Detectron2 repo doesn't seem to use any
pin_memoryin the dataloader. Can you provide your thoughts on relationship of using the serialized dataset withpin_memory=True?Thanks!