M
M
mrgloom2014-06-11 09:42:49
Python
mrgloom, 2014-06-11 09:42:49

Is LAPACK based on BLAS?

Let's say we have a wrapper around BLAS in python (i.e. we have numpy), can we write functions from LAPACK with our hands? (at a minimum, I need eig, svd.)
I know about numpy.linalg.svd and numpy.linalg.eig also there you can see the sorts that show in the case of svd

The decomposition is performed using LAPACK routine _gesdd
, and in the case of eig
implemented using the _geev LAPACK routines

but there is a link to
References
----------
G. Strang, * Linear Algebra and Its Applications *, 2nd Ed., Orlando, FL,
Academic Press, Inc., 1980, Various pp.

Why all this is needed:
rewrite the standard functions from numpy (svd and eig) using numpy.memmap and cudamat (the same blas wrapper around cublas as I understand it).
Also, to support large matrices, you can use block multiplication of matrices (although maybe some other blas functions will have to be redone? and I didn’t take into account something?)
What is needed more precisely:
maybe there is a lapack assembled only from blas calls? (Is this true and is it possible?)
maybe there are examples in other languages? (since there is no desire to understand Fortran code and functions with names like dgemm)
which books on linear algebra (for engineers, rather than for mathematicians) are better to read, which are closer to reality and talk about pitfalls (for example, degenerate cases (such as a singular matrix) or there is a loss of accuracy (nobody considers such a method, but here is a more accurate one), etc.), again considering that we already have blas and wrappers and only need to write high-level algorithms.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question