Open Dr15Jones opened 4 years ago
A new Issue was created by @Dr15Jones Chris Jones.
@Dr15Jones, @dpiparo, @silviodonato, @smuzaffar, @makortel, @qliphy can you please review it and eventually sign/assign? Thanks.
cms-bot commands are listed here
assign reconstruction, upgrade
New categories assigned: upgrade,reconstruction
@slava77,@perrotta,@jpata,@kpedro88 you have been requested to review this Pull request/Issue and eventually sign? Thanks
@rovere can you see if it's feasible to relocate the eigen dependence for Trackster?
@VinInn @fwyzard can you look at choleskyInversion?
https://github.com/cms-sw/cmssw/pull/31722 adds a dependence DataFormats/Math/interface/choleskyInversion.h
, but the use in there does not preclude moving it to a non-DataFormat package.
@VinInn https://github.com/VinInn @fwyzard https://github.com/fwyzard can you look at choleskyInversion?
No, but feel free to make a PR, and somebody will review it.
Historically Math is in DataFormat. Was not my decision as was not my decision to swallow SMatrix in Root. Most probably we will migrate to eigen more and more, so just accept the fact that eigen is first class in cms
@davidlange6 FYI
Could someone explain why we need to reduce the dependency from Eigen?
Could someone explain why we need to reduce the dependency from Eigen?
IIUC, it's for DataFormats. To invert your question, what are the reasons a subsystem dealing with persisted data should have dependency on Eigen?
No data-type eigen-specific is used to persist anything, IIRC. Eigen is introduced via member functions, as @Dr15Jones already mentioned in his first post. So, again, can someone explain why the dependency on Eigen is something we should reduce?
Same applies to Math Geometry etc. Or even more in general to anything that can be casted to an array of float or double or to std::byte ... I think we will move to eigen as matrix class.
So, again, can someone explain why the dependency on Eigen is something we should reduce?
The request is not specific to Eigen but is true in general (you can see other recent pull requests I've done to reduce DataFormats dependencies on externals). Beyond the good practice in large scale software design to minimize dependencies in order to improve build times and eas maintenance, classes in DataFormats have some additional reasons to minimize external dependencies
@Dr15Jones do I understand your comment https://github.com/cms-sw/cmssw/issues/31735#issuecomment-712144543 correctly that once a dependency on X is added in one place of DataFormats, it roughly does not matter how many more places will depend on this X in DataFormats? Or is there a package by package burden of maintenance?
do I understand your comment #31735 (comment) correctly that once a dependency on X is added in one place of DataFormats, it roughly does not matter how many more places will depend on this X in DataFormats?
I think to first order that is correct. On a package basis, I think it just increases the time and memory needed to compile the code.
FWLite only depends on eigen because of the tenous use of that package by DataFormats/HGCalReco and DataFormats/Math.
DataFormats/HGCalReco/interface/Trackster.h uses eigen only in a member function that takes eigen classes and converts them into std::array's. This dependency could be removed either by converting that function to be templated (since it is all inlined anyway) or by using a stand alone function to do the conversion. The function in question,
Trackster::fillPCAVariables
is only ever called from RecoHGCal/TICL/plugins/TrackstersPCA.cc so the conversion could be done there.DataFormats/Math/interface/choleskyInversion.h is the only use of eigen in DataFormats/Math and the header is not used anywhere in CMSSW except in the unit test for the function. This file could either be removed entirely from CMSSW or moved to a non DataFormats package.