-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add new BLAS and LAPACK symbols in quadruple precision #145
base: main
Are you sure you want to change the base?
Conversation
amontoison
commented
Nov 9, 2024
•
edited
Loading
edited
- Add BLAS and LAPACK symbols in quadruple precision
- Convention for symbols in quadruple precision Reference-LAPACK/lapack#1072
ecd9f06
to
341e7e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to need a version bump. Can you increase the version number here? I think increasing the patch number should be sufficient, as this is totally backwards-compatible.
ext/gensymbol/gensymbol
Outdated
@@ -481,7 +495,7 @@ zpotri, | |||
dtptrs, | |||
dtrcon, dtrevc, dtrexc, dtrrfs, dtrsen, dtrsna, dtrsyl, | |||
dtrtrs, dtzrzf, dstemr, | |||
dsgesv, dsposv, dlag2s, slag2d, dlat2s, | |||
dsgesv, dsposv, dlag2s, dlag2d, dlat2s, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
@@ -566,6 +581,69 @@ zpotri, | |||
zgeqrt, zgeqrt2, zgeqrt3, zgemqrt, | |||
ztpqrt, ztpqrt2, ztpmqrt, ztprfb, | |||
); | |||
|
|||
@exlapackobjs2 = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is quite a lot of symbols being added; what happened here? Were we just missing these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to support quadruple-precision BLAS/LAPACK with LBT.
The symbols are not standard in quadruple precision; OpenBLAS uses the prefixes q*
or x*
, but only for the BLAS symbols and routines with real inputs.
I would like to add a similar paradigm for LAPACK symbols, but I am open to suggestions!
Integrating Fortran code compiled in quadruple precision is straightforward in Julia using the Float128
data type from Quadmath.jl
.
However, we need an efficient way to compile our library with BLAS/LAPACK libraries that have dedicated symbols for quadruple precision.
LBT is optimal because we can add a dedicated backend compiled in quadruple precision at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you're planning to have LBT redirect back to Julia code for the backing algorithms for this quadruple precision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I was planning to compile Reference-LAPACK in quadruple precision.
A simple way to do this is to use the compiler-dependent flag -freal-8-real-16
with gfortran
and some macros for the symbols.
The goal is to use it in libHSL, which is more or less similar to SuiteSparse and has some of the most robust linear solvers, such as MA27
and MA57
, available in quadruple precision.
I can easily call them later in Julia with wrappers like this.
CUTEst doesn’t have any dependencies, unlike libHSL, which requires BLAS / LAPACK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. And so you’re trying to start a new convention with this naming scheme, or is there already a naming scheme for this and you’re conforming to that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the q*
symbols, I followed what was initially established by GotoBLAS, so I’m not creating a new convention here; instead, I’m following one that already exists informally. I proposed splitting this PR into two parts, one of which would include only the quadruple symbols.
I’ll contact Julien Langou, one of the developers of Reference-LAPACK, to confirm this informal convention, and then we can decide how to proceed.
d5f56df
to
6fb30b3
Compare
6fb30b3
to
2607335
Compare