Mathematical Interfaces in Base with Instantiations in Packages?

Excuse me if some of this sounds a little off (I am not too familiar with how Base does all of this), but could the abstract interfaces of some of these more central “Base packages” be separated from the instantiations?

For example, separating the functionality of the Base math library from the instantiations, so that way default packages implement the interface. The default could be Amal.jl or a package for OpenLibM, but then it would allow for a cleaner way for a user to replace this with their own package or something like VML.jl.

Another interface where this may be interesting do something with is all of the BLAS stuff. If that’s moved out of Base and into a package which is able to install the dependencies and then “get into the image properly”, then could we have an OpenBLAS.jl be a default, but an MKL.jl which makes it easy to swap the system BLAS?

To me, a system like this would make it much easier to swap BLAS or LibM implementations, since packages with dependency building is something I am much more comfortable with as a Julia user. If it’s possible to pair it with something like this:

then I could swap things around without having to build Julia from source.

Is there something about how Base works which makes this just a fantasy?

2 Likes