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

Speedup strip digitization #40618

Merged
merged 7 commits into from Feb 15, 2023
Merged

Speedup strip digitization #40618

merged 7 commits into from Feb 15, 2023

Conversation

VinInn
Copy link
Contributor

@VinInn VinInn commented Jan 26, 2023

Speed up of Strip digitization

a)
ZeroSuppressor done in two loops: one compares adc with thresholds, the second performs the algo logic.
(it fixes also a defect in the previous implementation (fix done ONLY for the digitizer version))
speed up x2
b) remove maps and various copies in PreMixingSiStripWorker
c) optimize and make consistent math in single precision

igprof
original
http://innocent.web.cern.ch/innocent/perfResults/igprof-navigator/digiDebug1T_ori_CMSSW_13_0_X_2023-01-24-1100_slc7_amd64_gcc11/24

this PR

http://innocent.web.cern.ch/innocent/perfResults/igprof-navigator/digiDebug1T_speedStrip5_CMSSW_13_0_X_2023-01-24-1100_slc7_amd64_gcc11/26

purely technical, regression expected due to the bug fix.

I'm under the impression that using a single-precision random number generator may speed up all those gaussian noise generators by a large amount.
I think that this would require a dedicated "project".

adcPrev2 = in[i - 2].adc();
thePrev2FEDlowThresh = static_cast<int16_t>(
threshold.getData(strip - 2, detThRange).getLth() * noise.getNoiseFast(strip - 2, detNoiseRange) + 0.5);
ldata.statPrev2 = stat[i - 2];
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the old logic below was wrong in case say adcNext <= adcPrev but prev is below and next is above

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40618/33891

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @VinInn (Vincenzo Innocente) for master.

It involves the following packages:

  • RecoLocalTracker/SiStripZeroSuppression (reconstruction)
  • SimTracker/SiStripDigitizer (simulation)

@cmsbuild, @civanch, @mandrenguyen, @clacaputo, @mdhildreth can you please review it and eventually sign? Thanks.
@echabert, @VourMa, @swertz, @missirol, @GiacomoSguazzoni, @yduhm, @robervalwalsh, @JanFSchulte, @rovere, @VinInn, @alesaggio, @prolay, @gpetruc, @felicepantaleo, @mtosi, @gbenelli, @mmusich, @threus, @dgulhan this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@civanch
Copy link
Contributor

civanch commented Jan 26, 2023

please test

@mandrenguyen
Copy link
Contributor

@civanch Should we enable the profiling?

@civanch
Copy link
Contributor

civanch commented Jan 26, 2023

@mandrenguyen , we establish CPU/memory/profiling of top of some IB, we are doing this for pre-releases. Vincenzo made CPU check in unit test with the factor 2 for this method, what will be summary effect we do may try to measure privately or if we ask Natascha for her standard analysis of performance.

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals-INPUT AddOn
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-267794/30191/summary.html
COMMIT: 51a04f3
CMSSW: CMSSW_13_0_X_2023-01-25-2300/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40618/30191/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

  • 10424.010424.0_TTbar_13+2017Design/step2_TTbar_13+2017Design.log
  • 11224.011224.0_TTbar_13+2018Design/step2_TTbar_13+2018Design.log
  • 11224.611224.6_TTbar_13+2018Design_heCollapse/step2_TTbar_13+2018Design_heCollapse.log
Expand to see more relval errors ...

AddOn Tests

[hlt_mc_GRun:1] cmsDriver.py TTbar_13TeV_TuneCUETP8M1_cfi -s GEN,SIM,DIGI,L1,DIGI2RAW --mc --scenario=pp -n 10 --conditions auto:run3_mc_GRun --relval 9000,50 --datatier "GEN-SIM-RAW" --eventcontent RAWSIM --customise=HLTrigger/Configuration/CustomConfigs.L1T --era Run3 --fileout file:RelVal_Raw_GRun_MC.root : FAILED - elapsed time: 267 sec (ended on Thu Jan 26 14:39:05 2023) - exit: 34304
----- Begin Fatal Exception 26-Jan-2023 14:39:53 CET-----------------------
An exception of category 'FileOpenError' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing input source of type PoolSource
   [2] Calling RootInputFileSequence::initTheFile()
   Additional Info:
      [a] Input file file:RelVal_Raw_GRun_MC.root could not be opened.
      [b] Fatal Root Error: @SUB=TStorageFactoryFile::Init
file RelVal_Raw_GRun_MC.root probably not closed, trying to recover

----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 26-Jan-2023 14:41:25 CET-----------------------
An exception of category 'FileOpenError' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing input source of type PoolSource
   [2] Calling RootInputFileSequence::initTheFile()
   Additional Info:
      [a] Input file file:RelVal_Raw_GRun_MC.root could not be opened.
      [b] Fatal Root Error: @SUB=TStorageFactoryFile::Init
file RelVal_Raw_GRun_MC.root probably not closed, trying to recover

----- End Fatal Exception -------------------------------------------------
Expand to see more addon errors ...

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 87 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3555495
  • DQMHistoTests: Total failures: 7304
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3548169
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.309 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 7.3 ): 0.309 KiB SiStrip/MechanicalView
  • Checked 211 log files, 162 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@VinInn
Copy link
Contributor Author

VinInn commented Feb 14, 2023

Is there anything blocking integration (and/or further review)?

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40618/34179

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

Pull request #40618 was updated. @civanch, @mandrenguyen, @clacaputo, @mdhildreth can you please check and sign again.

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-267794/30624/summary.html
COMMIT: d5c93fc
CMSSW: CMSSW_13_1_X_2023-02-14-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40618/30624/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

The relvals timed out after 4 hours.

Comparison Summary

Summary:

  • You potentially removed 12 lines from the logs
  • Reco comparison results: 248 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3555972
  • DQMHistoTests: Total failures: 9256
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3546694
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.309 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 7.3 ): 0.309 KiB SiStrip/MechanicalView
  • Checked 213 log files, 164 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@VinInn
Copy link
Contributor Author

VinInn commented Feb 15, 2023

"The relvals timed out after 4 hours."
Shall I assume this is independent of this PR?

@mmusich
Copy link
Contributor

mmusich commented Feb 15, 2023

Shall I assume this is independent of this PR?

I've seen it plenty of times in other PRs, so I think at this stage it can be ignored.
@civanch feel free to review. Thanks

@civanch
Copy link
Contributor

civanch commented Feb 15, 2023

please test

@civanch
Copy link
Contributor

civanch commented Feb 15, 2023

Such timeouts happens and I do not know other solution than resubmit the test.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-267794/30643/summary.html
COMMIT: d5c93fc
CMSSW: CMSSW_13_1_X_2023-02-14-2300/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40618/30643/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 32 lines to the logs
  • Reco comparison results: 254 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3556272
  • DQMHistoTests: Total failures: 9256
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3546994
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.309 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 7.3 ): 0.309 KiB SiStrip/MechanicalView
  • Checked 213 log files, 164 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@civanch
Copy link
Contributor

civanch commented Feb 15, 2023

+1

some differences in comparisons are expected.

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

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)

@mmusich
Copy link
Contributor

mmusich commented Feb 15, 2023

release-notes: expected minor regressions from fix of ZeroSuppression algorithm

@perrotta
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 3aa77af into cms-sw:master Feb 15, 2023
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.

None yet

7 participants