Octave Project Idea/ More Memory Efficient QR

I was checking the projects idea page and one of them was interesting to me with this title:

Make QR more memory efficient for large matrices when not all the columns of Q are required (apparently this is not handled by the lapack code yet).

Do we have an specific paper or documentation for this project?

1 Like

That’s typically called “thin QR decomposition” or “reduced QR decomposition” in the literature and refers to rectangular matrices that have more rows than columns. In that case, the excess rows of R will become zero, so those columns of Q can be ignored.

Here is some Wikipedia exposition of reduced QR for rectangular matrices: QR decomposition - Wikipedia

In Matlab 2022, this can be handled by calling qr (A, "econ") for economy mode, which will become normal QR if A is square or has more columns than rows. Octave does not accept that econ setting yet, but if you are interested in adding such reduced QR factorization then it can be called with the econ keyword.

Edit: GNU Octave - Bugs: bug #62277, QR needs to accept... [Savannah]

Edit: please pause on implementing this until you’ve read the bug discussion linked above. This functionality might already exist in Octave but only the econ input keyword isn’t recognized yet.

Edit: Turns out that Octave already had this functionality but the wiki was still listing it on the projects page. I have now updated the wiki to remove it. Sorry for the wiki sending you chasing something that had already been done. Fortunately it was caught before you spent time reimplementing it.

1 Like

Thanks for the clarification. Can other projects be defined in this area? Something about Octave and computer architecture, scientific computation, mixed precision, speed or accuracy in solving equations. Do you have a specific idea or need? Maybe I can do it as a part of my thesis.

Not sure what kind of thesis you have in mind (undergrad, masters, PhD etc). Octave could certainly use a good JIT compiler that is easy to keep current. There was one about 10 years ago on a trial basis but it couldn’t keep up with changes to the source tree. Adding a JIT is a substantial piece of thesis-defensible work. If that’s too much, go through the wiki projects list again and we can check to make sure you’re not following something that has been completed.

Btw, are you connected with GSoC? There are already several GSoC projects listed on this Discourse if you are.

I am a PhD student and I did what I had in my proposal, but my advisor asked about some extera work to add to what we have now (it is almost about LU decomposition, GPU and Computer architecture).

No I am not connected with GSoC.

Hard to define a project for you to satisfy academic requirements, other than what’s already listed at Projects - Octave (subject to making sure it’s still current). The general guideline is to scratch what itches – if you have encountered something in Octave that was too slow for you and you think you can improve it, that’s the right project for you, but most others won’t be able to predefine it with the keywords you list. If your PhD requires you to write real-world code for LU Decomposition + GPU etc, that sounds like a better fit with a linear algebra library like OpenBlas or Atlas than with Octave. But see what works better for your needs – there are always improvements to make everywhere.