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

Split AdePT kernels to separate physics from geometry #313

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

JuanGonzalezCaminero
Copy link
Contributor

@JuanGonzalezCaminero JuanGonzalezCaminero commented Sep 24, 2024

Adds the option to use a split version of the Electrons and Gammas transport kernels. The main motivation for this is to split geometry calls from physics as much as possible, to allow for better device occupancy.

The gammas kernel is split in:

  • First physics call to get the distance to the interaction
  • Propagation
  • Relocation
  • Interactions

The electrons kernel is split in:

  • First physics call to get the distance to interaction and MSC's restricted geometrical length
  • Propagation
  • Second MSC call to recompute the physical length if needed
  • Relocation
  • Interactions

Splitting the kernels means that we now need to carry over some information from one kernel to the next. Part of this information, related to scoring and navigation, is stored as part of the AdePT track. In order to keep track of the information needed for physics we add 3 arrays keeping a G4HepEM track of the corresponding type per AdePT track.

This means that the memory needed per track increases:

  • Single kernel:
    AdePT Track: 264B

  • Split kernels:
    AdePT Track: 512B
    HepEM Electron: 328B
    HepEM Gamma: 176B

On average we need 789B per track when using split kernels

This is the simplest implementation of a split kernels approach, and can be optimized further

@phsft-bot
Copy link

Can one of the admins verify this patch?

@agheata agheata merged commit d0ea7e2 into apt-sim:master Nov 6, 2024
2 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