ceres-solver / ceres-solver

A large scale non-linear optimization library

Home Page:http://ceres-solver.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to check that I am correctly using CUDA to accelerate the dense solver

green-slime opened this issue · comments

Sorry I've encountered a similar question as #921 . I am using ceres 2.1.0#4 with cuda 10.1.

The summary.FullReport() indicates that the 'dense linear algebra library' used is indeed CUDA, as shown in Figure 2. It appears to provide some acceleration, but not so prominent as I anticipated . However,although I can observe GPU usage from nvidia-smi, the task manager consistently shows that the GPU usage by the process remains almost at 0%. Furthermore, based on the results, it seems that the time taken for dense normal Cholesky with CUDA is longer than sparse normal Cholesky. (The Jacobian matrix is indeed a sparse matrix.) Is it possible for such a situation to occur? Could it be that I have not correctly invoked the CUDA methods?

Figure 1 represents the dense linear algebra computation without CUDA, Figure 2 represents the dense computation with CUDA, and Figure 3 represents the sparse computation.

Thanks so much for any help.

dense

dense_cuda
sparse

i meet the same problem, did you solve this?

This is a tiny problem, using CUDA is actually going to be worse because of the overhead of transferring data between the CPU and the GPU. The problem is so small that the GPU does not have to do any real work.