-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Spedup HCAL Digitization #40634
Spedup HCAL Digitization #40634
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40634/33929
|
A new Pull Request was created by @VinInn (Vincenzo Innocente) for master. It involves the following packages:
@malbouis, @civanch, @yuanchao, @mdhildreth, @cmsbuild, @saumyaphor4252, @ggovi, @tvami, @ChrisMisan, @francescobrivio can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
type hcal, performance-improvement |
please test |
-1 Failed Tests: RelVals-INPUT RelVals-INPUT
Comparison SummarySummary:
|
Hi @kpedro88, |
I can speed up HcalSiPMHitResponse::addPEnoise by a factor 4x using a custom poisson generator |
|
given also that the same mean is used repeatedly, perhaps that special handling of a poisson distro belongs in addPENoise itself? It looks like that for small lambdas, the most expensive computation is exp(-lambda) - then its just a single uniform random number per value. |
@davidlange6 : this is what I've already done in #40636. (factor 4 in speed as it throws just one random number and compute exp once per call (one can even avoid that easily) I would prefer NOT to change random number sequence here to avoid divergences and regression that may require more validation. |
In practice, I don't see how to avoid changing the random number sequence here even if some logic was moved into the random number generator itself.... make a separate PR for it? |
In practice, I don't see how to avoid changing the random number sequence here even if some logic was moved into the random number generator itself.... make a separate PR for it?
once this is merged. yes.
|
please abort |
I rebased changing the master.now is clean |
@cmsbuild , please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2f6ac1/30749/summary.html Comparison SummarySummary:
|
+1
|
@civanch the last update is quite simple: I think you can re-sign, unless you have doubts about it |
+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 will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
Speed up HcalSiPMHitResponse::makeSiPMSignal by a factor 3.5
Verified using debug statement that result (signal) is the same!
Some more speed-up could be obtained using single precision float everywhere and trying to vectorize some loops.
current bottleneck is CLHEP::RandPoissonQ::poissonDeviateSmall
igprof
before
http://innocent.web.cern.ch/innocent/perfResults/igprof-navigator/digiDebug1T_ori_CMSSW_13_0_X_2023-01-26-2300_slc7_amd64_gcc11/24
after (i.e. this PR)
http://innocent.web.cern.ch/innocent/perfResults/igprof-navigator/digiDebug1T_hcal4_CMSSW_13_0_X_2023-01-26-2300_slc7_amd64_gcc11/69