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

EG Pixel Match Speed updates #22427

Merged
merged 1 commit into from Mar 7, 2018
Merged

Conversation

Sam-Harper
Copy link
Contributor

Dear All,

Calculuate the B-field at a point is expensive and this function needlessly does it twice because the GlobalTrajectoryParameters also calculates the magnetic field when its created:

https://github.com/Sam-Harper/cmssw/blob/3b6bd6fd98d97088bf612c71ae5e81c6d24b32e5/TrackingTools/TrajectoryParametrization/src/GlobalTrajectoryParameters.cc#L35-L37

This class already has an option to pass the already computed value into its constructor, therefore I fixed the function to do this. From tests, this trivial and safe change saved another 1.5% CPU at the HLT.

-0.281609 -0.08% 0.79 ms/ev -> 0.60 ms/ev hltEgammaElectronPixelSeedsUnseeded
-0.227384 -1.40% 16.88 ms/ev -> 13.43 ms/ev hltEgammaElectronPixelSeeds

@Martin-Grunewald

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2018

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2018

A new Pull Request was created by @Sam-Harper for master.

It involves the following packages:

RecoEgamma/EgammaElectronAlgos

@perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@jainshilpi, @varuns23, @lgray this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@Martin-Grunewald
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/26453/console Started: 2018/03/02 18:35

@@ -48,7 +49,7 @@ FreeTrajectoryState FTSFromVertexToPointFactory::get( MagneticField const & magF
auto pyNew = -sa*pxOld + ca*pyOld;
GlobalVector pNew(pxNew, pyNew, pz);

GlobalTrajectoryParameters gp(xmeas, pNew, charge, & magField);
GlobalTrajectoryParameters gp(xmeas, pNew, charge, & magField, std::move(magFieldAtPoint));
Copy link
Contributor

Choose a reason for hiding this comment

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

is move really needed at this point?
Did you see a time improvement here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no its not needed, I can back it out, I just figured lets send it a && and if the code can ever deal with it in the future it'll pick it up. Its not costly? Do not have a strong opinon

Copy link
Contributor

Choose a reason for hiding this comment

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

fine to leave it here.
IIUC, the GlobalVector does not have a move constructor. So the move here likely does nothing and prevents potential future use of magFieldAtPoint below this line.
OTOH, everything is inlined and the story of copying likely doesn't matter.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2018

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2018

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-22427/26453/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 29
  • DQMHistoTests: Total histograms compared: 2479021
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2478844
  • DQMHistoTests: Total skipped: 176
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.950000000106 KiB( 23 files compared)
  • Checked 118 log files, 9 edm output root files, 29 DQM output files

@slava77
Copy link
Contributor

slava77 commented Mar 6, 2018

+1

for #22427 3b6bd6f

  • somewhat technical update to reduce unnecessary computation
  • jenkins tests pass and comparisons with the baseline show no differences

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 6, 2018

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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

fabiocos commented Mar 7, 2018

+1

@cmsbuild cmsbuild merged commit 040b18e into cms-sw:master Mar 7, 2018
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