QR decomposition for transposed matrices

QR decomposition for transposed matrices

Hi,

could you please help with a solution of the following issue.

There is a simple Z*beta=Y overdetermined linear system with respect to beta and I want to solve it with MKL/QR decomposition. I read manual and found two similar approaches to achieve the goal:

  1. one 'sgels(...)' call or
  2. sequence 'geqrf(...) + ormqr(...) + trsm(...)' of calls

The issue is, that matrices in my application are stored in transposed form, i.e. (X')*beta=Y system is under consideration. Is there any possibility to find QR decomposition for transposed?

Note. Solution with LQ factorization was tried, but it takes approximately 10 times longer than QR for transposed matrices.

Thank you in advance.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Dear Victor,

If you use C as programming language, you could try to call LAPACKE_dgeqrf(). Its first parameter is matrix layout and calling a LAPACKE function with row major data layout versus column major data layout is equivalent to transposing input matrices.

Also you could try transposition routines provided with MKL, you could find description of these in BLAS-like extensions chapter.

Thank you for reporting about 10x performance difference between LQ and QR factorization. Could you please let us know a bit more about input sizes of your matrices and your host configuration, so that we could reproduce this and see how we could fix it.

Thanks, Alexander

Alexander,

thanks for the detailed answer, I see the work flow now.

For random matrix 10000x10000 about 2x difference is stably observed (not sure about 10x stability now). But this is not the issue for the moment, just interesting observation, since I thought LQ problem is almost the same as QR one in algorithmic sense.

Leave a Comment

Please sign in to add a comment. Not a member? Join today