TorchSharp icon indicating copy to clipboard operation
TorchSharp copied to clipboard

multi-gpu training

Open lindadamama opened this issue 1 year ago • 1 comments

Does it support multi-gpu training? Is there any sample code?

lindadamama avatar Aug 14 '24 04:08 lindadamama

var gpu0 = new Device(DeviceType.CUDA, 0);
var gpu1 = new Device(DeviceType.CUDA, 1);

var myTensor0 = torch.ones(3, 3).to(gpu0);
var myTensor1 = torch.ones(3, 3).to(gpu1);

...

I think this should work.

K1T00 avatar Aug 14 '24 07:08 K1T00

It should, but I haven't tested it myself.

NiklasGustafsson avatar Aug 20 '24 21:08 NiklasGustafsson