Skip to content

Split relocation kernels#408

Merged
SeverinDiederichs merged 3 commits intoapt-sim:masterfrom
JuanGonzalezCaminero:split_relocation
Jul 7, 2025
Merged

Split relocation kernels#408
SeverinDiederichs merged 3 commits intoapt-sim:masterfrom
JuanGonzalezCaminero:split_relocation

Conversation

@JuanGonzalezCaminero
Copy link
Contributor

@JuanGonzalezCaminero JuanGonzalezCaminero commented Jul 4, 2025

Separate the Relocation kernels for Electrons and gammas into a setup kernel which decides whether a track will relocate, do an interaction, or continue to the next step, and a relocation kernel in which the actual geometry calls are performed.

The reason for this split is that the current relocation kernels, specially in the case of electrons and positrons are very divergent. Only a small portion of the tracks in a warp will do a relocation, but the geometry calls involved are costly, which can slow down the rest of the threads in that warp.

These changes haven't shown a speedup so far in runs without a B-field, but the split should improve profiling results by isolating the relocation code.

@phsft-bot
Copy link

Can one of the admins verify this patch?

Copy link
Collaborator

@SeverinDiederichs SeverinDiederichs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@SeverinDiederichs SeverinDiederichs merged commit e697cfd into apt-sim:master Jul 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants