How 'uva' make dataLoader faster

Hello, I’ve been studying how to use a dataloader to load data recently. I found that when the ‘uva’ parameter is set to ‘mixed’, the loading speed is about 10 times faster compared to when ‘uva’ is set to ‘false’. Although I know it utilizes the Unified Virtual Addressing (UVA) technology, I would like to understand how DGL implements it. Which part code should I focus on?

Did you check the implementation of DGL’s DataLoader?

Yes, I have studied DGL’s DataLoader and found that UVA is used in the CollateWrapper function to wrap the sample function. Based on my understanding of the CollateWrapper function in DGL, it transfers the data to the GPU before each sampling operation. However, I’m not sure if my understanding is correct.

Yes, it is. And as the data is put in pinned memory, the transfer should be faster than normal copy.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.