Skip to content
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

chore: Reduce memory consumption of AMVF #2832

Merged
merged 8 commits into from
Dec 15, 2023

Conversation

paulgessinger
Copy link
Member

This pushes a number of vertex calculations to separate .cpp files so they can be compiled once and linked. This switches a couple of dimension checks to runtime checks. I didn't do a runtime test yet, but that's something I need to check.

The memory consumption goes down by around 30%, while adding two new compilation units of about 900M each.

@paulgessinger paulgessinger added this to the next milestone Dec 14, 2023
@github-actions github-actions bot added Component - Core Affects the Core module Vertexing labels Dec 14, 2023
@paulgessinger
Copy link
Member Author

paulgessinger commented Dec 14, 2023

This PR

file max_rss [M] time [s]
Tests/UnitTests/Core/Vertexing/IterativeVertexFinderTests.cpp 1344.44 15.58
Examples/Algorithms/Vertexing/src/IterativeVertexFinderAlgorithm.cpp 1280.00 12.22
Tests/UnitTests/Core/Vertexing/AdaptiveMultiVertexFinderTests.cpp 1263.67 17.66
Examples/Algorithms/Vertexing/src/AdaptiveMultiVertexFinderAlgorithm.cpp 1258.39 12.58
Examples/Algorithms/Vertexing/src/VertexFitterAlgorithm.cpp 1162.40 10.50
Tests/UnitTests/Core/Vertexing/FullBilloirVertexFitterTests.cpp 1109.15 11.16
Tests/UnitTests/Core/Vertexing/AdaptiveMultiVertexFitterTests.cpp 1047.30 10.96
Core/src/Vertexing/KalmanVertexUpdater.cpp 1013.28 7.99
Core/src/Vertexing/KalmanVertexTrackUpdater.cpp 975.01 8.22
Tests/UnitTests/Core/Vertexing/ZScanVertexFinderTests.cpp 948.68 8.34

Main

file max_rss [M] time [s]
Examples/Algorithms/Vertexing/src/AdaptiveMultiVertexFinderAlgorithm.cpp 1760.58 20.28
Tests/UnitTests/Core/Vertexing/AdaptiveMultiVertexFinderTests.cpp 1675.89 28.81
Tests/UnitTests/Core/Vertexing/AdaptiveMultiVertexFitterTests.cpp 1525.40 19.84
Tests/UnitTests/Core/Vertexing/IterativeVertexFinderTests.cpp 1334.74 15.69
Examples/Algorithms/Vertexing/src/IterativeVertexFinderAlgorithm.cpp 1249.56 12.15
Tests/UnitTests/Core/Vertexing/KalmanVertexTrackUpdaterTests.cpp 1204.06 10.18
Examples/Algorithms/Vertexing/src/VertexFitterAlgorithm.cpp 1117.44 10.58
Tests/UnitTests/Core/Vertexing/KalmanVertexUpdaterTests.cpp 1091.70 9.11
Tests/UnitTests/Core/Vertexing/FullBilloirVertexFitterTests.cpp 1038.19 10.87
Tests/UnitTests/Core/Vertexing/ZScanVertexFinderTests.cpp 889.13 9.00

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Attention: 94 lines in your changes are missing coverage. Please review.

Comparison is base (664add3) 48.82% compared to head (01533e8) 48.85%.

Files Patch % Lines
Core/src/Vertexing/KalmanVertexUpdater.cpp 32.18% 5 Missing and 54 partials ⚠️
Core/src/Vertexing/KalmanVertexTrackUpdater.cpp 25.58% 2 Missing and 30 partials ⚠️
...ore/include/Acts/Vertexing/KalmanVertexUpdater.ipp 33.33% 0 Missing and 2 partials ⚠️
...clude/Acts/Vertexing/AdaptiveMultiVertexFitter.ipp 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2832      +/-   ##
==========================================
+ Coverage   48.82%   48.85%   +0.02%     
==========================================
  Files         484      486       +2     
  Lines       28136    28178      +42     
  Branches    13278    13292      +14     
==========================================
+ Hits        13738    13766      +28     
- Misses       4792     4796       +4     
- Partials     9606     9616      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@paulgessinger
Copy link
Member Author

paulgessinger commented Dec 15, 2023

Runtime of the ckf tracking physmon workflow seems unaffected (100 events, 30 runs each, no IO, single thread).

Main

Command Mean [s] Min [s] Max [s] Relative
python CI/physmon/workflows/physmon_ckf_tracking.py /tmp/out 21.353 ± 0.591 20.423 22.697 1.00

This PR

Command Mean [s] Min [s] Max [s] Relative
python CI/physmon/workflows/physmon_ckf_tracking.py /tmp/out 21.169 ± 0.532 20.432 22.712 1.00

@paulgessinger paulgessinger marked this pull request as ready for review December 15, 2023 13:33
@kodiakhq kodiakhq bot merged commit 69290be into acts-project:main Dec 15, 2023
52 checks passed
@acts-project-service
Copy link
Collaborator

✅ Athena integration test results [69290be]

✅ All tests successful

status job report
🟢 run_unit_tests
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsBenchmarkWithSpot.sh 8 100
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsWorkflow.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateAmbiguityResolution.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateResolvedTracks.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateTracks.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateActsCoreSpacePoints.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateActsSpacePoints.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateSeeds.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateOrthogonalSeeds.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateClusters.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsPersistifyEDM.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsGSFRefitting.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsKfRefitting.sh
🟢 run_ci_tests: python3 ../athena/Tracking/Acts/ActsGeometry/test/ActsExtrapolationAlgTest.py
🟢 run_ci_tests: python3 ../athena/Tracking/Acts/ActsGeometry/test/ActsITkTest.py
🟢 run_workflow_tests_run4_mc
🟢 run_workflow_tests_run2_mc
🟢 run_workflow_tests_run2_data
🟢 run_workflow_tests_run3_mc
🟢 run_workflow_tests_run3_data
🟢 run_art_test: test_data18_13TeV_1000evt
🟢 run_art_test: test_ttbarPU40_reco

@paulgessinger paulgessinger modified the milestones: next, v32.0.0 Jan 19, 2024
LaraCalic pushed a commit to LaraCalic/acts that referenced this pull request Feb 10, 2024
This pushes a number of vertex calculations to separate `.cpp` files so they can be compiled once and linked. This switches a couple of dimension checks to runtime checks. I didn't do a runtime test yet, but that's something I need to check.

The memory consumption goes down by around 30%, while adding two new compilation units of about 900M each.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Core Affects the Core module Vertexing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants