Add mixed precision support for CPU based DenseCholesky

On problem-744-543562-pre.txt

The time spent in linear solver on my M1 Pro is

eigen        81.550970
eigen+mixed  54.107383
LAPACK       47.078127
LAPACK+mixed 28.639868

Solution quality is unaffected.

The implementation of RefinedDenseCholesky and DenseIterativeRefiner
are straightforward ports of RefinedSparseCholesky and
SparseIterativeRefiner (formerly IterativeRefiner).

It maybe possible to refactor the SparseCholesky and DenseCholesky
interfaces so that this code duplication can be removed in the
future.

Change-Id: I921334224cb97629a60390f2add822de207f7923
This commit is contained in:
Sameer Agarwal
2022-07-29 15:35:53 -07:00
parent df55682ba5
commit cb6ad463d0
13 changed files with 534 additions and 148 deletions
+4 -3
View File
@@ -84,9 +84,10 @@ class CudaBuffer {
// Perform an asynchronous copy from GPU memory using the stream provided.
void CopyFromGpuAsync(const T* data, const size_t size, cudaStream_t stream) {
Reserve(size);
CHECK_EQ(cudaMemcpyAsync(
data_, data, size * sizeof(T), cudaMemcpyDeviceToDevice, stream),
cudaSuccess);
CHECK_EQ(
cudaMemcpyAsync(
data_, data, size * sizeof(T), cudaMemcpyDeviceToDevice, stream),
cudaSuccess);
}
// Copy data from the GPU to CPU memory. This is necessarily synchronous since