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

Optimize track vector data layout for particle types #1312

Closed
sethrj opened this issue Jul 9, 2024 · 0 comments
Closed

Optimize track vector data layout for particle types #1312

sethrj opened this issue Jul 9, 2024 · 0 comments
Labels
performance Changes for performance optimization physics Particles, processes, and stepping algorithms

Comments

@sethrj
Copy link
Member

sethrj commented Jul 9, 2024

I have another optimization idea related to sorting but maybe less intrusive, along the lines of how AdePT has separate state vectors for each particle type. To do something similar, what about we instantiate charged and neutral particles at opposite ends of the state vector? This will naturally partition them to some extent (though we'd need to consider cases like annihilation and pair production, where the track slot basically changes type, and how to handle when the two stacks meet in the middle). We don't have to worry about "mixing" breaking anything due to how we launch kernels.

@amandalund suggested sorting the last num_vacancies track initializers by particle type before initializing which should be equivalent.

I think there has to be an additional toggle between "filling" and "filled": that suggestion would work during the "filled" stage but we'd still have to push to opposite ends of the vector while filling.

See related work from AdePT: https://cds.cern.ch/record/2856531

@sethrj sethrj added physics Particles, processes, and stepping algorithms performance Changes for performance optimization labels Jul 9, 2024
@sethrj sethrj closed this as completed Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Changes for performance optimization physics Particles, processes, and stepping algorithms
Projects
None yet
Development

No branches or pull requests

1 participant