Using UnifiedTensor in DGL 1.0

Is it still possible to use UnifiedTensor as described in PyTorch Direct paper in DGL? I see in the docs that this used to be available but was recently deprecated in DGL 1.0 [RFC] API Deprecation and Removal · Issue #4693 · dmlc/dgl · GitHub. Is there still any way to use this? I have a use case where I am implementing a custom data loader and would like to reduce host CPU contention when gathering features with multiple processes.

Hi, UnifiedTensor can be substituted by the combination of pin_memory_inplace and gather_pinned_tensor_rows functions under dgl.utils, see dgl/pin_memory.py at master · dmlc/dgl · GitHub for reference.

3 Likes

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