Are there C implementations of ExGaussian and Normal logcdf functions?

I am trying to use a custom model (i.e. defining a logp function for a custom pdf) in pymc3 that requires the logcdf of the ExGaussian and Normal distributions. I have written my own functions for them, using basic theano calls, however this results in lots of overflow (as discussed in another recent thread).

Conversely, I am trying to use:
pm.ExGaussian.dist().logcdf()
pm.Normal.dist().logcdf()

However, these run very slowly and give me the following warning:

WARNING (theano.tensor.opt): Optimization Warning: The Op erfcx does not provide a C implementation. As well as being potentially slow, this also disables loop fusion.

Is there any C implementations of these logcdf functions that can be used with pymc3?

2 Likes

Not yet. For numerical stability reasons we are relying on the ercfx method, which currently does not have c support. We have an open issue here: Add C implementation for I1e, I0e and erfcx Ops · Issue #267 · pymc-devs/aesara · GitHub

Great! Thanks for your work on getting the C implementation up and running.