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

Asynchronous Thrust, main branch (2025.02.05.) #843

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

krasznaa
Copy link
Member

@krasznaa krasznaa commented Feb 5, 2025

As a follow-up to #835, I wanted to see if I could simplify the code in question a little.

I couldn't quite do that, but I did stumble across another thing. That we were not letting Thrust run asynchronously so far. With this simple update, with the command:

traccc_throughput_mt_cuda --detector-file=geometries/odd/odd-detray_geometry_detray.json \
   --material-file=geometries/odd/odd-detray_material_detray.json \
   --grid-file=geometries/odd/odd-detray_surface_grids_detray.json \
   --use-detray-detector --digitization-file=geometries/odd/odd-digi-geometric-config.json \
   --use-acts-geom-source \
   --input-directory=/data/Acts/odd-simulations-20240509/geant4_ttbar_mu140/ \
   --input-events=100 --processed-events=200 --cpu-threads=2

, we go from:

Using CUDA device: NVIDIA RTX A5000 [id: 0, bus: 1, device: 0]
Using CUDA device: NVIDIA RTX A5000 [id: 0, bus: 1, device: 0]
Using CUDA device: NVIDIA RTX A5000 [id: 0, bus: 1, device: 0]
Warm-up processing [==================================================] 100% [00m:00s]                                            
Event processing   [==================================================] 100% [00m:00s]                                            
Reconstructed track parameters: 11241101
Time totals:
                  File reading  2850 ms
            Warm-up processing  2101 ms
              Event processing  43079 ms
Throughput:
            Warm-up processing  210.183 ms/event, 4.75775 events/s
              Event processing  215.399 ms/event, 4.64254 events/s

to:

Using CUDA device: NVIDIA RTX A5000 [id: 0, bus: 1, device: 0]
Using CUDA device: NVIDIA RTX A5000 [id: 0, bus: 1, device: 0]
Using CUDA device: NVIDIA RTX A5000 [id: 0, bus: 1, device: 0]
Warm-up processing [==================================================] 100% [00m:00s]                                            
Event processing   [==================================================] 100% [00m:00s]                                            
Reconstructed track parameters: 10704497
Time totals:
                  File reading  2587 ms
            Warm-up processing  2013 ms
              Event processing  41526 ms
Throughput:
            Warm-up processing  201.325 ms/event, 4.96709 events/s
              Event processing  207.631 ms/event, 4.81624 events/s

Small, but any performance improvement is good...

Copy link

sonarqubecloud bot commented Feb 5, 2025

@krasznaa krasznaa added the performance Performance-relevant changes label Feb 5, 2025
Copy link
Member

@stephenswat stephenswat left a comment

Choose a reason for hiding this comment

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

That's a nice find!

@stephenswat
Copy link
Member

Out of curiosity, where does that 4.5 Hz figure come from? That's even slower than I was expecting. :(

@stephenswat stephenswat enabled auto-merge February 5, 2025 12:18
@stephenswat stephenswat merged commit 1f96a4e into acts-project:main Feb 5, 2025
29 checks passed
@krasznaa krasznaa deleted the AsyncThrust-main-20250205 branch February 5, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance-relevant changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants