Skip to content

Add grid_constant qualifier to finding kernels#1266

Merged
stephenswat merged 1 commit intoacts-project:mainfrom
stephenswat:perf/grid_constant
Feb 24, 2026
Merged

Add grid_constant qualifier to finding kernels#1266
stephenswat merged 1 commit intoacts-project:mainfrom
stephenswat:perf/grid_constant

Conversation

@stephenswat
Copy link
Copy Markdown
Member

This commit adds the __grid_constant__ qualifier to the CUDA track finding kernel, allowing the compiler to make some additional optimisations. This should also help us better understand performance issues such as the ones in #1259.

This commit adds the `__grid_constant__` qualifier to the CUDA track
finding kernel, allowing the compiler to make some additional
optimisations. This should also help us better understand performance
issues such as the ones in acts-project#1259.
@stephenswat stephenswat added cuda Changes related to CUDA performance Performance-relevant changes labels Feb 24, 2026
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@krasznaa krasznaa left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

Does it affect the build or the runtime performance?

@stephenswat
Copy link
Copy Markdown
Member Author

Physics performance summary

Here is a summary of the physics performance effects of this PR. Command used:

traccc_seeding_example_cuda --input-directory=/data/Acts/odd-simulations-20240506/geant4_ttbar_mu200 --digitization-file=geometries/odd/odd-digi-geometric-config.json --detector-file=geometries/odd/odd-detray_geometry_detray.json --grid-file=geometries/odd/odd-detray_surface_grids_detray.json --material-file=geometries/odd/odd-detray_material_detray.json --input-events=10 --use-acts-geom-source=on --check-performance --truth-finding-min-track-candidates=5 --truth-finding-min-pt=1.0 --truth-finding-min-z=-150 --truth-finding-max-z=150 --truth-finding-max-r=10 --seed-matching-ratio=0.99 --track-matching-ratio=0.5 --track-candidates-range=5:100 --seedfinder-vertex-range=-150:150

Seeding performance

Total number of seeds went from 298341 to 298340 (-0.0%)

Seeding plots



Track finding performance

Total number of found tracks went from 50224 to 50222 (-0.0%)

Finding plots









Track fitting performance

Fitting plots














Seeding to track finding relative performance

Seeding to track finding plots



Note

This is an automated message produced on the explicit request of a human being.

@stephenswat
Copy link
Copy Markdown
Member Author

Performance summary

Here is a summary of the performance effects of this PR:

Graphical

Tabular

KernelReciprocal ThroughputParallelism
3ab5c4fe7e96b0Delta3ab5c4fe7e96b0
propagate_to_next_surface7.82 ms7.82 ms0.0%3.463.45
find_tracks1.74 ms1.73 ms-0.3%1.831.83
ccl_kernel825.74 μs826.94 μs0.1%1.371.37
count_doublets813.39 μs815.23 μs0.2%1.611.61
count_triplets566.56 μs568.98 μs0.4%1.021.02
find_doublets527.29 μs532.53 μs1.0%3.083.08
Thrust::sort379.35 μs379.62 μs0.1%7.327.32
find_triplets171.94 μs170.65 μs-0.8%1.311.31
estimate_track_params146.32 μs146.24 μs-0.1%2.682.68
build_tracks124.95 μs125.25 μs0.2%3.713.71
select_seeds58.68 μs58.82 μs0.2%1.341.34
populate_grid23.98 μs24.05 μs0.3%1.221.22
count_grid_capacities22.13 μs22.16 μs0.1%1.221.22
remove_duplicates23.49 μs20.00 μs-14.8%26.1125.65
fill_sorted_measurements19.77 μs19.74 μs-0.1%1.131.13
update_triplet_weights14.78 μs14.85 μs0.5%1.271.27
apply_interaction13.86 μs13.91 μs0.4%6.726.70
fill_finding_propagation_sort_keys8.82 μs8.82 μs-0.0%7.657.66
form_spacepoints8.30 μs8.30 μs-0.0%1.481.48
reduce_triplet_counts5.63 μs5.67 μs0.6%3.093.08
unknown5.07 μs5.08 μs0.2%4.264.27
fill_finding_duplicate_removal_sort_keys1.57 μs1.57 μs-0.2%38.0238.04
Total13.32 ms13.32 ms0.0%2.992.98

Important

All metrics in this report are given as reciprocal throughput, not as wallclock runtime.

Note

This is an automated message produced upon the explicit request of a human being.

@stephenswat stephenswat merged commit dce8e5f into acts-project:main Feb 24, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda Changes related to CUDA performance Performance-relevant changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants