Flatten propagation loop structure#1006
Merged
stephenswat merged 1 commit intoJul 8, 2025
Merged
Conversation
stephenswat
added a commit
to stephenswat/detray
that referenced
this pull request
Jun 20, 2025
This commit, which is very similar to acts-project#1006, flattens several different calls to the navigator initialization into a single loop which reduces the amount of code inlining, improves instruction cache performance and also reducing divergence.
Member
Author
BeforeAfterSo seems to improve performance by about 5-10%. |
stephenswat
force-pushed
the
refactor/flat_propagator
branch
2 times, most recently
from
June 24, 2025 11:08
83dcbef to
edbed7f
Compare
Member
Author
|
Okay, this passes the CI now! |
stephenswat
force-pushed
the
refactor/flat_propagator
branch
from
June 26, 2025 08:32
edbed7f to
126ce60
Compare
Member
Author
|
Updated performance results (with an added clause to force the navigator update to be inlined): BeforeAfterThus the performance gain has now gone up to at least 5% and at most 43% (!). |
niermann999
reviewed
Jul 3, 2025
niermann999
approved these changes
Jul 3, 2025
This commit flattens the propagation loop structure with the primary goal of reducing the number of different call sites to the navigation update method. Currently. we update the navigator in three different places and this is expensive due to divergence. This commit puts all of those calls into one place in a loop, mirroring the same functional structure that was present before. I measure a significant performance improvement due to this in traccc, and it also greatly reduces the size of the kernels.
stephenswat
force-pushed
the
refactor/flat_propagator
branch
from
July 8, 2025 08:41
bedceef to
f7c16df
Compare
stephenswat
enabled auto-merge
July 8, 2025 08:42
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 flattens the propagation loop structure with the primary goal of reducing the number of different call sites to the navigation update method. Currently. we update the navigator in three different places and this is expensive due to divergence. This commit puts all of those calls into one place in a loop, mirroring the same functional structure that was present before.
I measure a significant performance improvement due to this in traccc, and it also greatly reduces the size of the kernels.