mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user