pytorch doesn’t have the erfcx(x) function implemented (https://github.com/pytorch/pytorch/issues/31945 4). However this function is available in scipy (https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erfcx.html 3). So I am trying to call the scipy version from pytorch.
I was thinking of following this tutorial: https://pytorch.org/tutorials/advanced/numpy_extensions_tutorial.html 18, to implement a pytorch version of erfcx that calls the scipy version and is automatically differentiable.
Is this the recommended approach? I would like to do something that results in the greatest performance possible here.