when
x1 = torch.rand(20, 1024, 1024, device=torch.device(“cuda:0”), dtype=dtype)
x2 = torch.rand(20, 1024, 1024, device=torch.device(“cuda:1”), dtype=dtype)
y1 = torch.rand(20, 1024, 1, device=torch.device(“cuda:0”), dtype=dtype)
y2 = torch.rand(20, 1024, 1, device=torch.device(“cuda:1”), dtype=dtype)
I wonder that how can I execute following two commands simultaneously.
z1 = torch.gesv(y1, x1)
z2 = torch.gesv(y2, x2)