Removing CXSparse Support

231 views
Skip to first unread message

Sameer Agarwal

unread,
May 23, 2022, 12:11:58 PM5/23/22
to ceres-...@googlegroups.com
Folks,

In an ongoing attempt to simplify the Ceres Solver code base I am considering removing support for CXSparse/CX_SPARSE from Ceres Solver. 

Today Eigen does everything that CXSparse does (at least in terms of what we need from it) and has none of the licensing problems it had in the past and has a more liberal license than CXSparse. As far as I know there is no performance difference between the two libraries either, in part because they implement many of the same algorithms. 

So unless I hear a substantial argument for why CXSparse support should continue to be included, I plan to delete it next week.

Sameer


Pierre Moulon

unread,
May 23, 2022, 10:08:51 PM5/23/22
to ceres-...@googlegroups.com
Hi Sameer,

Would it impact licensing?
As today both CXSparse and Eigen Sparse was implying a LGPL licensed ceres.
I believe that SuiteSparse is also having a different license depending on the module you use?

Is there any alternative that is not "X"GPL for sparse modules?
Or does there is path were only non XGPL sparse solve would be used (https://eigen.tuxfamily.org/dox/group__TopicSparseSystems.html)?

Maybe now the MPL2 module from Eigen is having more Sparse solver and we could compile safely Ceres with Sparse compatibility with the MPL2 restriction...?

Regards/Cordialement,
Pierre M


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUCTTna%2BzM6oCKhfaw7YZnqoDGs7StGoV7TRBKQbZN9n2A%40mail.gmail.com.

Pierre Moulon

unread,
May 23, 2022, 10:27:00 PM5/23/22
to ceres-...@googlegroups.com
Nit, not sure the doc here is accurate:
"Another thing to consider here is that the sparse Cholesky
   factorization libraries in Eigen are licensed under ``LGPL`` and
   building Ceres with support for ``EIGEN_SPARSE`` will result in an
   LGPL licensed library (since the corresponding code from Eigen is
   compiled into the library)."
From what I read here https://eigen.tuxfamily.org/dox/group__TopicSparseSystems.html and https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/SparseCholesky there is Sparse Cholesky factorization that are MPL2 supported.

Regards/Cordialement,
Pierre M

Sameer Agarwal

unread,
May 23, 2022, 10:33:25 PM5/23/22
to ceres-...@googlegroups.com
That needs to be updated. 

Eigens sparse factorization libraries are all under MPL now. 

They were not previously, they have been for a while now.

CXSparse is lgpl.

Sameer 

Pierre Moulon

unread,
May 23, 2022, 10:37:38 PM5/23/22
to ceres-...@googlegroups.com
Thank you, Sameer for the confirmation!

Wanted to be sure we update all the info with the right message (doc, code)

Happy to see that more and more code is MPL2 compatible and opens new perspective for the community!

Another way to evaluate this change could be to perform a benchmark with CXSPARSE and EIGEN_SPARSE before doing the change.
If Eigen_Sparse is on par to all the tested scene it seems obvious we can simplify and rely only on EIGEN_SPARSE ;-)


Regards/Cordialement,
Pierre M


Sameer Agarwal

unread,
May 23, 2022, 10:39:57 PM5/23/22
to ceres-...@googlegroups.com
Eigen implements the same algorithms as CXSparse. If anything I would expect Eigen to be a bit faster. 

In my own experiments I have not seen much if any performance differences. I'd be curious if anyone else has done any comparisons or they critically depend on CXSparse and can articulate why Eigen does not serve their purposes.


Sameer 

Reply all
Reply to author
Forward
0 new messages