optimize torch.gercol