JuliaLinearAlgebra / libblastrampoline

Using PLT trampolines to provide a BLAS and LAPACK demuxing library.
MIT License
66 stars 17 forks source link

Support vendor APIs #2

Closed ViralBShah closed 3 years ago

ViralBShah commented 3 years ago

What is the right way to vendor APIs, like querying number of openblas threads and such? Is it possible to add all vendor API names to the library, and then set them to a function that prints an error message if that particular vendor API doesn't exist in the forwarded BLAS?

ViralBShah commented 3 years ago

All the openblas vendor APIs are in because of the gensymbol script being pulled from openblas. Ideally, we want to keep separate files for vendor APIs so that they can be updated over time.

staticfloat commented 3 years ago

We will want to add in vendor-specific names (like openblas_get_num_threads()) which should be harmless, but we definitely want to write some generic APIs over the vendor-specific stuff so that we can, for instance, get/set the number of threads no matter whether we're using MKL or OpenBLAS, as right now it's difficult to know precisely which one we're using and you don't want to try and call the wrong one.

If we can get a list of the vendor-specific APIs that we might want, we can think about the best way to wrap them.

ViralBShah commented 3 years ago

19 adds the MKL APIs we need to make the entire Julia testsuite pass on MKL.

ViralBShah commented 3 years ago

I'm going to close this one and open up specific vendor blas related issues as they pop up.