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

Speed-up seed/dup. cleaning mkFit #37122

Merged
merged 7 commits into from
Mar 9, 2022

Conversation

leonardogiannini
Copy link
Contributor

@leonardogiannini leonardogiannini commented Mar 2, 2022

PR description:

The seed cleaning algorithm (used in initial, high pT triplet, detached quad, and triplet) and the duplicate cleaning used in the pixelLess iteration are updated to reduce the processing time, while the physics is unchanged.

  • the seed cleaning is updated from an N^2 comparison of all the pairs to a comparison of the tracks that can be approximately
    compatible for removal only. The tracks are binned in phi and eta and for each track, the comparison is made only inside compatible bins

  • the duplicate cleaning consisted of a nested loop comparing hits. The new algorithm uses 2 simple loops per track: 1 to map hits to tracks and the second to find all the tracks sharing hits with the one examined (similarly to TrajectoryCleanerBySharedHits)

The seed cleaning update is described here:
Jan 31 update

The duplicate cleaning is mentioned here (p.23):
Feb 14 update

PR validation:

The physics is validated with TTbar PU50, where blue is before PR and red is after PR

http://legianni.web.cern.ch/legianni/plots-PR37122/

CPU profiling with igprof can be found here

osschar and others added 7 commits March 2, 2022 12:13
This was broken as struct/union with raw unsigned construct in struct
binnor::B_pair got removed during CMSSW review process. 'raw' was
actually used for sorting but this never showd up as the templates did
not get instantianted, i.e., binnor was not used in cmssw.

Here we remove explicit bin1/2 variables with specified bit-size and
replace them with a single unsigned packed_value and provide
hand-written bit-shifting / masking for bin-data access.
…(template type X) to start with a clearer from_X_...
Remove commented-out demonstration code.
@cmsbuild cmsbuild added this to the CMSSW_12_3_X milestone Mar 2, 2022
@leonardogiannini leonardogiannini changed the title Speedup cleaning 12 3 x Speed-up seed/dup. cleaning mkFit Mar 2, 2022
@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37122/28645

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2022

A new Pull Request was created by @leonardogiannini for master.

It involves the following packages:

  • RecoTracker/MkFitCMS (reconstruction)
  • RecoTracker/MkFitCore (reconstruction)

@jpata, @cmsbuild, @clacaputo, @slava77 can you please review it and eventually sign? Thanks.
@makortel, @felicepantaleo, @GiacomoSguazzoni, @JanFSchulte, @rovere, @VinInn, @ebrondol, @gpetruc, @mmusich, @mtosi, @dgulhan this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@slava77
Copy link
Contributor

slava77 commented Mar 2, 2022

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 3, 2022

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8de885/22785/summary.html
COMMIT: 8cf58cd
CMSSW: CMSSW_12_3_X_2022-03-02-1100/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/37122/22785/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 5790 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3990927
  • DQMHistoTests: Total failures: 13337
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3977567
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 204 log files, 45 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@slava77
Copy link
Contributor

slava77 commented Mar 7, 2022

@cms-sw/reconstruction-l2
it would be nice to get this in pre6

@perrotta
Copy link
Contributor

perrotta commented Mar 7, 2022

urgent

@cms-sw/reconstruction-l2 it would be nice to get this in pre6

@cmsbuild cmsbuild added the urgent label Mar 7, 2022
@clacaputo
Copy link
Contributor

assign @cms-sw/tracking-pog-l2

@clacaputo
Copy link
Contributor

assign @cms-sw/tracking-pog-l2

Seems like the tag didn't work.
Concerning the PR, no comments on the code, but still checking the RECO differences in the test (although they seem minimal)
About the profiling, how many events did you use @leonardogiannini ?

@makortel
Copy link
Contributor

makortel commented Mar 7, 2022

assign @cms-sw/tracking-pog-l2

Seems like the tag didn't work

It would need to be without @cms-sw/, i.e. assign tracking-pog-l2.

@leonardogiannini
Copy link
Contributor Author

leonardogiannini commented Mar 7, 2022

assign @cms-sw/tracking-pog-l2

Seems like the tag didn't work. Concerning the PR, no comments on the code, but still checking the RECO differences in the test (although they seem minimal) About the profiling, how many events did you use @leonardogiannini ?

@clacaputo 100 evts with TTbar PU 50

@clacaputo
Copy link
Contributor

assign tracking-pog-l2

@clacaputo
Copy link
Contributor

+reconstruction

  • mkFit seed cleaning algorithm and the duplicate cleaning updated
  • reco changes observed, but minimal
  • processing time reduced

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2022

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@mmusich
Copy link
Contributor

mmusich commented Mar 8, 2022

assign tracking-pog

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2022

New categories assigned: tracking-pog

@mmusich,@mtosi,@vmariani you have been requested to review this Pull request/Issue and eventually sign? Thanks

Copy link
Contributor

@mmusich mmusich left a comment

Choose a reason for hiding this comment

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

not necessarily needing to be followed-up.

@@ -137,6 +137,12 @@ namespace mkfit {
std::vector<float> d0(ns);
int i1, i2; //for the sorting

axis_pow2_u1<float, unsigned short, 16, 8> ax_phi(-Const::PI, Const::PI);
axis<float, unsigned short, 8, 8> ax_eta(-3.0, 3.0, 30u);
binnor<unsigned int, decltype(ax_phi), decltype(ax_eta), 24, 8> phi_eta_binnor(ax_phi, ax_eta);
Copy link
Contributor

Choose a reason for hiding this comment

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

usual set of hard-coded constants.

continue;
int a = trk.getHitLyr(i);
int b = trk.getHitIdx(i);
hitMap.insert(std::make_pair(b * 1000 + a, i > 0 ? itrack : -itrack)); //negative for first hit in trk
Copy link
Contributor

Choose a reason for hiding this comment

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

what's 1000?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

a way to write layer and hit id in a single int.

Copy link
Contributor

Choose a reason for hiding this comment

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

I know, I commented already here: #36546 (comment), not sure if it's in the plans to document it.

@mmusich
Copy link
Contributor

mmusich commented Mar 8, 2022

+1

  • this update concerning speed-up of the seed cleaning algo has been agreed and discussed already couple of times at the tracking pog meeting: 1 2

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2022

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Mar 9, 2022

+1

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

Successfully merging this pull request may close these issues.

9 participants