-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple blas-src from LAPACK providers #8
Comments
I am not sure I understand the decoupling you are talking about. There are those two packages for selecting sources of BLAS and LAPACK, and one can always opt out to depend on any specific directly. Would you be able to elaborate on the problem you are facing? |
So the docs (which have become inconsistent in the wiki) have been recommending that people use features to identify a provider. [dependencies]
blas-src = { version = "0.9", features = ["blis"] } But BLIS does not provide LAPACK so we currently can't use it with [dependencies]
lapack-src = { version = "0.9", features = ["what here?"] } I could make a new provider, say lapack-src = { version = "0.9", features = ["f2c-netlib"] }
blas-src = { version = "0.9", features = ["blis"] } This requires only a C compiler, will build fast, and run fast. I think it will have confusing link errors (undefined or multiply defined symbols) if someone forgets lapack-src = { version = "0.9", features = ["blis-f2c-netlib"] } This is less flexible, especially with respect to system-provided BLAS-only. As a weird example, IBM's ESSL provides BLAS along with LAPACK symbol collisions that have a different API (eyeroll justified), so it's common for apps to link |
Would a sensible choice be to use Flexiblas as generic interface and have everything else handled from there? Also, when compiling just Lapack how can you make sure that the right calling convention for complex return arguments is used? I noticed a recent PR in the f2clapack part from PETSc. Something similar may presumably need to be done here? |
It seems to me the benefit of FlexiBLAS is to delay choice of which implementation is used until runtime when linking shared libs. As such, it's great when packaged by distributions (and Rust can use system BLAS), but what is the benefit when linking statically? It takes a while to build and users just want their app to run. Regarding complex return ABI, it'd be best if this could be queried (it needs to be known to call the Fortran symbols). It is indeed an issue with f2c'd code that it only supports one convention. |
I'd like to support a dependency tree in which some packages depend on
blas-src
with featureblis
and others needlapack-src
. While some (likeopenblas-src
) bundle both the optimized BLAS and nearly-reference LAPACK, other BLAS implementations do not bundle LAPACK.I'm opening this issue to get feedback on how this should be done. I think one option is to have a new
x-lapack-src
that depends onblas-src
(so it works with any BLAS) and provides a netlib-equivalent LAPACK. My inclination is actually to do this using anf2c
'd version of netlib LAPACK that we maintain for PETSc because it removes a need for a Fortran compiler to be available, but the same could readily be done for the Fortran sources. If doing this, what should the repository and feature for this be called? Other suggestions welcome.The text was updated successfully, but these errors were encountered: