Skip to content
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

Xorgqr #1112

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Xorgqr #1112

wants to merge 14 commits into from

Conversation

jprhyne
Copy link
Contributor

@jprhyne jprhyne commented Mar 8, 2025

Description
Hey Y'all!

I implementted some performance improvements for computing the explicit Q factor in the X{or,un}gY routines. This takes 2 forms.

  1. I added an xlarfb that takes into account the fact that we always apply to a C where C_1 is 0. This leads to some improvements in performance as well as on the first iteration assuming that C_2 is I. This also leads to some performance improvements especially as the block size increases
  2. For the routines X{or,un}gq{rl} where the T matrix returned from Xlarft is the same shape as the triangular factor, we can actually omit the workspace requirements for this routine (aside from calls to X{or,un}2{rl} which still needs that extra vector) which opens the door for some more
    improvements down the line which I am in the process of implementing.
    1. Vendors and users can investigate the blocksize (NB) increasing more freely as we no longer have the concern of memory availability.
    2. This allows for an in place panel factorization which is faster than the unblocked code for the standard blocksize of 32 on the machine I tested this on.

A more formal writeup of this can be found at my repository for my Master's Project

I compiled the tex file with the current version of pdftex on a linux machine.

In addition, I have attached some performance plots of computing the Q factor from the QR and LQ factorizations in double precision to motivate why I think it will be beneficial to refactor xLARFT to return a T matrix of the same shape as the triangular factor even before implementing the panel factorization. To see the justification of the panel factorization, see the above linked repository folder

dorgqrDorglqOptPerfExperiments.pdf
dorgqrDorglqPerfExperiments.pdf
dorgqrPerfExperiments.pdf

I ran these experiments on an AMD EPYC 7502 CPU and I ran each experiment 10 times reporting the mean of those experiments. To see the form of these experiments, see the files titled timeDorgqrVsDorglq.c, timeDorgqrVsDorglq.sh, and time_dorgqr_vs_dorglq.batch found here. The .c file is the main driver that calls our FORTRAN routines and times execution, the .sh file calls our .c file with varying inputs, and the .batch file is what is used to run the job via slurm on the HPC I used.

The main takeaway from these figures is that the slight improvements that we see in QR are not present as much in the LQ factorization so even without the more efficient panel factorization.

Checklist

  • The documentation has been updated.
  • If the PR solves a specific issue, it is set to be closed on merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant