-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Split GainMatrixUpdater
compilation
#3486
refactor: Split GainMatrixUpdater
compilation
#3486
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this cuts the memory consumption drastically I would definitely consider putting this in. One thing I wondered is if we want to move the templated visit measurement into a detail header and also the generated source files and then only include them in the GainMatrixUpdater.cpp
@andiwand The generated source files are only in the build folder, not in the source folder at all. In terms of where exactly the template function is, I don't have a preference. We'd have to include it the |
Maybe we can just put it directly into the |
@andiwand And then include the |
Right it really should be a header file. I would put it rather in |
📊: Physics performance monitoring for 096a612physmon summary
|
Done now @andiwand. |
Quality Gate passedIssues Measures |
Once again, our compilation memory usage is out of control, among others due to
GainMatrixUpdater
. This currently takes about 1.2G peak memory.In this PR, I'm moving the function doing the heavy instantiation back into a header, but I'm suppressing the instantiation of the template via
extern template
.Then, I have CMake generate
.cpp
files where each file instantiates one dimension. The linker ultimately resolves these separate template insantiations.Now, this is a bit ugly, but it does reduce peak memory consumption to under 600M, at the cost of now having 6 instead of one compilation unit:
Not sure this is the way to go, but I wanted to suggest it.