use optmized version of torch.gercol