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 pattern recognition in Pixels by implementing a 5 sigma compatibility window in TkPixelMeasurementDet #18408
Conversation
A new Pull Request was created by @VinInn (Vincenzo Innocente) for master. It involves the following packages: RecoLocalTracker/SiPixelClusterizer @perrotta, @cmsbuild, @slava77, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
910_pre2 perf report
and
|
this PR
and
|
@cmsbuild , please test |
The tests are being triggered in jenkins. |
-1 Tested at: 4aec9c5 You can see the results of the tests here: I found follow errors while testing this PR Failed tests: RelVals
When I ran the RelVals I found an error in the following worklfows: runTheMatrix-results/4.22_RunCosmics2011A+RunCosmics2011A+RECOCOSD+ALCACOSD+SKIMCOSD+HARVESTDC/step2_RunCosmics2011A+RunCosmics2011A+RECOCOSD+ALCACOSD+SKIMCOSD+HARVESTDC.log |
Comparison not run due to runTheMatrix errors (RelVals and Igprof tests were also skipped) |
@cmsbuild please test the last one was a file read error, possibly transient |
The tests are being triggered in jenkins. |
yl = 5.f*std::sqrt(yl); | ||
|
||
// do not apply for iteration not cutting on propagation | ||
if (est.maxSagitta() <0 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably squeeze cpu a bit more if you compute x1 and y1 above only if (est.maxSagitta() >= 0 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the compiler will take care AND est.maxSagitta() <0 is NOT the main use case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my own education: how can the compiler know that "if (est.maxSagitta() <0 )" it can avoid making all computations from L38 to L48?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L38 and L39 most probably will be invoked anyhow as they are not inlined and may have side effects: this is true.
the rest is fully inlined and the minimum one can expect from a compiler is to optimize conditional assignment....
in any case: est.maxSagitta() <0 is "unlikely".
fabs(sqrt(1.3 * 1.3 + 1.9 * 1.9 * jetZOverRho * jetZOverRho)); | ||
if (expSizeY < 1) expSizeY = 1.; | ||
float expSizeX = 1.5; | ||
std::sqrt((1.3f*1.3f) + (1.9f*1.9f) * jetZOverRho*jetZOverRho); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::sqrt(1.69f+ 3.61f* jetZOverRhojetZOverRho); \ std::sqrt((1.3f1.3f) + (1.9f1.9f) * jetZOverRhojetZOverRho);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not understand the comment: as I sais this class needs anyhow a major cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the compiler takes care of proper folding constants...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right...
@VinInn I'm fine with this PR now: some little regression still visible, as expected, but all macroscopic effects potentially affecting physics performance have disappeared with the latest tunes. As a result of that tuning, improvements in cpu and perf do not seem as relevant as before: anyhow, some little cpu reduction is still visible for a few modules. |
Pull request #18408 was updated. @perrotta, @cmsbuild, @slava77, @davidlange6 can you please check and sign again. |
@cmsbuild, please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
+1 |
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 requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar |
Comparison is ready Comparison Summary:
|
+1 |
implement a 5 sigma compatibility window in TkPixelMeasurementDet
(once cluster has been sorted in x)
produces a speed up of 10% in pattern recognition (for instance initialStepTrackCandidates)
for PU50
expect negligible regressions
The usual suspects: electron, photon, muon, cosmics are left unchanged
see #14467 #12846 for what can happen in messing with those...