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 Cellular Automaton implementation #18002

Merged
merged 8 commits into from Mar 30, 2017
Merged

Conversation

VinInn
Copy link
Contributor

@VinInn VinInn commented Mar 20, 2017

Most purely technical changes that produces no regression and speedup CA by about a factor 2
We took the opportunity to fix a small imperfection in the use of the radius the now is w/r/t the beam spot. The effect is mostly to sharpen the pt cut. This change produces minor regressions.

Timing for PU200 ttbar phase2

900
grep TimeRe seedCA.log | cut -c 35-120 | sort -n -r | grep StepHit | head -n2
     0.363026  initialStepHitQuadruplets
     0.067059  initialStepHitDoublets
this PR
grep TimeRe seedCAVN7.log | cut -c 35-120 | sort -n -r | grep StepHit | head -n2
     0.199053  initialStepHitQuadruplets
     0.058190  initialStepHitDoublets

Timing at PU50 PhaseI

900
grep TimeRe caOri.log | cut -c 35-120 | sort -n -r | grep QuadStepHit | head -n4
     0.139890  lowPtQuadStepHitQuadruplets
     0.072600  detachedQuadStepHitQuadruplets
     0.012884  lowPtQuadStepHitDoublets
     0.009104  detachedQuadStepHitDoublets

This PR
grep TimeRe caVecet3.log  | cut -c 35-120 | sort -n -r | grep QuadStepHit | head -n4
     0.094063  lowPtQuadStepHitQuadruplets
     0.045189  detachedQuadStepHitQuadruplets
     0.012195  lowPtQuadStepHitDoublets
     0.008520  detachedQuadStepHitDoublets

MTV for ttbar PU0
http://innocent.home.cern.ch/innocent/RelVal/vectCA3/plots_highPurity/effandfake1.pdf
where blue is 900, red is technical only and black is this PR

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

RecoPixelVertexing/PixelTriplets
RecoTracker/TkHitPairs

@perrotta, @cmsbuild, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@ghellwig, @makortel, @felicepantaleo, @GiacomoSguazzoni, @rovere, @VinInn, @mschrode, @gpetruc, @ebrondol, @dgulhan this is something you requested to watch as well.
@Muzaffar, @davidlange6, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@VinInn
Copy link
Contributor Author

VinInn commented Mar 20, 2017

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 20, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/18576/console Started: 2017/03/20 21:36

@cmsbuild
Copy link
Contributor

-1

Tested at: 8f311a0

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-18002/18576/summary.html

I found follow errors while testing this PR

Failed tests: RelVals AddOn

  • RelVals:

When I ran the RelVals I found an error in the following worklfows:
10042.0 step2

runTheMatrix-results/10042.0_ZMM_13+ZMM_13TeV_TuneCUETP8M1_2017_GenSimFull+DigiFull_2017+RecoFull_2017+ALCAFull_2017+HARVESTFull_2017/step2_ZMM_13+ZMM_13TeV_TuneCUETP8M1_2017_GenSimFull+DigiFull_2017+RecoFull_2017+ALCAFull_2017+HARVESTFull_2017.log

10824.0 step2
runTheMatrix-results/10824.0_TTbar_13+TTbar_13TeV_TuneCUETP8M1_2018_GenSimFull+DigiFull_2018+RecoFull_2018+ALCAFull_2018+HARVESTFull_2018/step2_TTbar_13+TTbar_13TeV_TuneCUETP8M1_2018_GenSimFull+DigiFull_2018+RecoFull_2018+ALCAFull_2018+HARVESTFull_2018.log

  • AddOn:

I found errors in the following addon tests:

@cmsbuild
Copy link
Contributor

Comparison not run due to runTheMatrix errors (RelVals and Igprof tests were also skipped)

@VinInn
Copy link
Contributor Author

VinInn commented Mar 21, 2017

I hardly believe that this PR is the cause of the test failure
Would have been much more useful to have a list of the failed AddOn

@davidlange6
Copy link
Contributor

davidlange6 commented Mar 21, 2017 via email

@VinInn
Copy link
Contributor Author

VinInn commented Mar 21, 2017

Interesting, as I have run on three different datasets and never crashed

@makortel
Copy link
Contributor

The segfault is in HLT, could there be some special case that is not treated properly now?

@VinInn
Copy link
Contributor Author

VinInn commented Mar 21, 2017

maybe HLT takes a different path? (there is code that is copy/paste four times...)
Will known soon

@cmsbuild
Copy link
Contributor

Pull request #18002 was updated. @perrotta, @cmsbuild, @slava77, @davidlange6 can you please check and sign again.

@VinInn
Copy link
Contributor Author

VinInn commented Mar 21, 2017

Not obvious what is doing in HLT, we need to check in details.
It does not seem to do what pretended by design (building a single CA for all regions).
For next PR: for the time being just reproduce previous behavior...

@VinInn
Copy link
Contributor Author

VinInn commented Mar 21, 2017

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 21, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/18586/console Started: 2017/03/21 14:01


CACell(const HitDoublets* doublets, int doubletId, const int innerHitId, const int outerHitId) :
theDoublets(doublets), theDoubletId(doubletId)
,theInnerR(doublets->rv(doubletId, HitDoublets::inner))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is different that original (now w/r/t/ beamspot)

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

@slava77
Copy link
Contributor

slava77 commented Mar 30, 2017

+1

for #18002 80b67be

  • code change is in line with the description; affecting 2017/2018 setups now where CA is enabled
  • jenkins tests pass and show small differences in 2017/2018 workflows
  • local test with more events confirm little change in MTV plots and essentially no effect on downstream quantities
  • speedup is evident, the target reference workflow 2017 ttbar PU35 (10224 ) shows overall less than 1% speedup with significant decrease in CA modules (consistent with what was posted in the PR description)
step2:
2.18 ms/ev ->         0.80 ms/ev hltIter2PFlowPixelHitTriplets
36.89 ms/ev ->        21.37 ms/ev hltPixelTracksHitQuadruplets
10.01 ms/ev ->         5.91 ms/ev hltIter1PFlowPixelHitQuadruplets

step3:
75.90 ms/ev ->        48.32 ms/ev detachedQuadStepHitQuadruplets
51.65 ms/ev ->        33.70 ms/ev initialStepHitQuadruplets
159.75 ms/ev ->       107.67 ms/ev lowPtQuadStepHitQuadruplets
49.14 ms/ev ->        34.04 ms/ev detachedTripletStepHitTriplets
51.97 ms/ev ->        36.43 ms/ev initialStepHitQuadrupletsPreSplitting
103.96 ms/ev ->        77.96 ms/ev lowPtTripletStepHitTriplets
32.08 ms/ev ->        24.19 ms/ev highPtTripletStepHitTriplets
Total in reco: total: 15817 -> 15762	-0.4%
   *Step* modules: 7416 -> 7308        -1.5%

@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 requires discussion in the ORP meeting before it's merged. @Muzaffar, @davidlange6, @smuzaffar

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit fa37d50 into cms-sw:master Mar 30, 2017
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

5 participants