Skip to content

Split relocation kernels #408

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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?

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.

2 participants