The slowness is probably due to scipy implementation of erfcx. In colab env it’s 13x slower than torch.erfc.
You could do a naive reimplementation of erfcx, although it will have numerical precision issues
torch.manual_seed(123456)
def erfcx(A): return torch.exp(A*A)*torch.erfc(A)
A = torch.randn(50,50)
A0=A.numpy()

torch.max(abs(erfcx(A)-torch.tensor(scipy.special.erfcx(A0)))) # tensor(0.0625)