-
Notifications
You must be signed in to change notification settings - Fork 157
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
perf: Optimize Eigen usage in covariance engine #1183
Merged
kodiakhq
merged 2 commits into
acts-project:main
from
stephenswat:perf/covariance_engine_gemm
Mar 18, 2022
Merged
perf: Optimize Eigen usage in covariance engine #1183
kodiakhq
merged 2 commits into
acts-project:main
from
stephenswat:perf/covariance_engine_gemm
Mar 18, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stephenswat
added
Component - Core
Affects the Core module
Impact - Minor
Nuissance bug and/or affects only a single module
Improvement
Changes to an existing feature
labels
Mar 3, 2022
Codecov Report
@@ Coverage Diff @@
## main #1183 +/- ##
=======================================
Coverage 47.81% 47.81%
=======================================
Files 360 360
Lines 18591 18591
Branches 8769 8769
=======================================
Hits 8890 8890
Misses 3649 3649
Partials 6052 6052
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
On my end I see wall-time for the generic propagation example go from ~26s to 22s for 500 events. Good stuff! |
This commit optimizes some of the Eigen usage in the covariance engine, specifically in the critical path for the propagation examples. The first optimisation we make is to introduce a tiled matrix multiplication method, which takes 2i×2j matrices, and performs four i×j multiplications instead, which Eigen can optimize far more easily. Secondly, we reduce the number of floating point operations performed by working with smaller submatrices wherever possible. On my machine, the following performance is achieved in the propagation example before this patch: 53.555595 ms/event. After this patch, we take 43.750143 ms/event. This performance gain is independent from the performance gain of acts-project#1181.
stephenswat
force-pushed
the
perf/covariance_engine_gemm
branch
from
March 15, 2022 22:19
9f8f38c
to
cf24e2d
Compare
This is now ready to go in. |
paulgessinger
approved these changes
Mar 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
automerge
Component - Core
Affects the Core module
Impact - Minor
Nuissance bug and/or affects only a single module
Improvement
Changes to an existing feature
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit optimizes some of the Eigen usage in the covariance engine, specifically in the critical path for the propagation examples. The first optimisation we make is to introduce a tiled matrix multiplication method, which takes 2i×2j matrices, and performs four i×j multiplications instead, which Eigen can optimize far more easily. Secondly, we reduce the number of floating point operations performed by working with smaller submatrices wherever possible.
On my machine, the following performance is achieved in the propagation example before this patch: 53.555595 ms/event. After this patch, we take 43.750143 ms/event. This performance gain is independent from the performance gain of #1181.