desihub / gpu_specter

Scratch work for porting spectroperfectionism extractions to GPUs
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

Implement model and regularize command line options #47

Closed dmargala closed 3 years ago

dmargala commented 4 years ago

This PR implements support for the --model and --regularize command line options in spex/gpu_specter.

The model image is computed at the patch level which is another piece of data that has to be passed through the appropriate frame and bundle MPI communicators. It's becoming a bit unwieldy but fixing that might be an issue for a separate PR.

The regularization is modeled after the implementation in specter but modifies the diagonal elements of icov rather than appending to the design matrix which is used to compute icov. This avoids what would be a noticeable performance hit with np.vstack( (A, Idiag) ) as done in specter.

All cpu/specter tests are passing using the desi environment on a haswell node. All cpu/gpu tests are passing using the desi-gpu environment on a cori gpu node.