How to split a list of strings to multiple gpus


(Jialin Wu) #1

I have a list of strings, say 512 strings. (data)

I want to separate them to 4 gpus as other tensors but the result is each gpu gets these 512 strings.

How can I split the list of string to multiple gpus


#2

There are a lot of ways of doing this. But if you mean how to split a batch of data to multiple GPUs you can use nn.DataParallel, this might give you some insights on how to do it properly in PyTorch.