Skip to content

Conversation

stephenswat
Copy link
Member

This PR implements a cut that requires a seed to be the best seed for at least $n$ of its constituent spacepoints, which mirrors the cut that is used in ACTS. This cut is a specialisation of the cut in #1082, implemented in a way that should allow it to run faster.

@stephenswat stephenswat added the feature New feature or request label Jul 28, 2025
@stephenswat
Copy link
Member Author

Depends on #1097.

@stephenswat
Copy link
Member Author

I discussed this with @andiwand and I found out that the cut that ACTS implements isn't actually quite this, but rather a greedy algorithm that updates after every step. That means that the ACTS implementation is essentially impossible to efficiently reproduce on GPU.

@stephenswat stephenswat force-pushed the feat/best_for_n_cut branch 3 times, most recently from 9111114 to 6d9afa3 Compare August 7, 2025 09:37
@stephenswat
Copy link
Member Author

This now depends on #1113; if weights are strictly positive we can add a relative minimum weight to recover the efficiencies.

@stephenswat stephenswat changed the title Implement a best-for-n-spacepoints cut on seeds Implement a spacepoint weight cut on seeds Aug 7, 2025
@stephenswat stephenswat force-pushed the feat/best_for_n_cut branch from 6d9afa3 to 8d0d1a5 Compare August 8, 2025 12:19
This commit uses the PDF of a half-Gaussian distribution to determine
the weight of the impact factor in the track finding. This changes makes
it so that weights are strictly positive and negates the "cut-off"
effect caused by the confirmation weight.
This PR implements a cut that requires a seed to be the best seed for at
least $n$ of its constituent spacepoints, which mirrors the cut that is
used in ACTS. This cut is a specialisation of the cut in acts-project#1082,
implemented in a way that should allow it to run faster.
@stephenswat stephenswat force-pushed the feat/best_for_n_cut branch from 8d0d1a5 to 640ef09 Compare August 8, 2025 13:01
Copy link

sonarqubecloud bot commented Aug 8, 2025

@stephenswat
Copy link
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 --use-detray-detector=on --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 336240 to 264849 (-21.2%)


Track finding performance

Total number of found tracks went from 153828 to 126058 (-18.1%)








Note

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

@stephenswat
Copy link
Member Author

Performance summary

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

Graphical

Tabular

Kernel a2dbda9 640ef09 Delta
fit_forward 32.08 ms 24.04 ms -25.1%
propagate_to_next_surface 28.66 ms 18.84 ms -34.3%
fit_backward 13.53 ms 9.68 ms -28.4%
count_triplets 2.06 ms 2.06 ms 0.1%
find_tracks 2.69 ms 2.00 ms -25.6%
count_doublets 1.01 ms 1.00 ms -0.2%
ccl_kernel 871.35 μs 871.86 μs 0.1%
find_doublets 801.36 μs 795.18 μs -0.8%
find_triplets 571.92 μs 580.58 μs 1.5%
Thrust::sort 457.09 μs 441.24 μs -3.5%
fit_prelude 197.19 μs 138.39 μs -29.8%
select_seeds 102.54 μs 125.56 μs 22.5%
remove_duplicates 170.60 μs 122.82 μs -28.0%
collect_highest_weight_per_spacepoint 47.34 μs
build_tracks 54.78 μs 39.64 μs -27.6%
apply_interaction 42.24 μs 30.79 μs -27.1%
update_triplet_weights 29.87 μs 29.74 μs -0.4%
populate_grid 23.88 μs 23.84 μs -0.2%
estimate_track_params 38.07 μs 23.23 μs -39.0%
count_grid_capacities 22.59 μs 22.60 μs 0.0%
unknown 20.48 μs 20.42 μs -0.3%
fill_finding_propagation_sort_keys 26.01 μs 18.64 μs -28.3%
form_spacepoints 12.47 μs 12.53 μs 0.5%
fill_finding_duplicate_removal_sort_keys 10.78 μs 8.33 μs -22.7%
reduce_triplet_counts 6.83 μs 6.86 μs 0.4%
make_barcode_sequence 1.01 μs 1.01 μs -0.3%
fill_fitting_sort_keys 1.15 μs 900.02 ns -21.6%
fill_prefix_sum 171.94 ns 171.95 ns 0.0%
Total 83.49 ms 60.99 ms -26.9%

Important

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

Warning

At least one kernel incurred a significant performance regression.

Note

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant