How to move data to the cuda in customized datacollator in DDP mode #18998
Unanswered
yuzhenmao
asked this question in
DDP / multi-GPU / multi-node
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, for some reason I need to move a batch to gpu in my own datacollator function within the dataloader. Is it possible to do this in the ddp setting by pytorch-lightning? Or do I need to manually move the data by myself using “local_rank = os.environ.get(‘LOCAL_RANK’) & data.to(device)”? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions