Unnecessary copies at each iteration in HiPO
Hi,
@ZiruiZhou and I have identified some redundant matrix copying within the HiPO implementation that could be optimized, particularly for Linear Programming (LP) problems. I would be happy to do some refactoring if you are open to accepting this improvement.
Specifically, the methods FactorHiGHSSolver::factorAS and FactorHiGHSSolver::factorNE currently perform a copy of the constraint matrix $A$ every time they are called (i.e., each iteration).
While this copying mechanism may be required for Quadratic Constraint Programs or Non-Linear Programs, it appears unnecessary for standard LP problems, based on the current implementation (since the constraint matrix is not modified between iterations).
Removing this redundant copy for LPs should improve performance for all instances, but will be particularly visible for large-scale LP problems.
Would you like me to proceed with the refactoring and submit a PR for review?
Please would you look at this @filikat
I know that there are redundant copies that could be avoided. I expect this to have a small impact on most problems, so I put it quite low on my to-do list. I don't mind if you want to give it a try yourself @aasivas.
Please assign the issue to me :) I will work on it and send a PR this weekend.
I will be ready to send the MR after doing some end-to-end testing. I confirmed that normal equations (NE) path works, I am now forcing HiPO to go into the augmented system (AS) path to confirm equivalence (couldn't find any examples where HiPO chose AS over NE).
Are there other tests you require? I am doing regression tests based on log comparisons, e.g. checking whether the logs are same other than some superficial differences between two versions.
We have plenty of tests that are performed on PRs, thanks
Oh, my question was ambiguous. Sorry! I was asking if there are any tests I have to run locally before I submit a PR.
Nevertheless, I submitted the draft PR #2694 . Workflows need your approval. I will remove the draft status after the workflows are green. Thanks :)
Closed by #2706