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

GPU2CPU for clusters and RecHIts #18

Merged
merged 13 commits into from
Mar 1, 2018

Conversation

VinInn
Copy link

@VinInn VinInn commented Feb 22, 2018

to test it add to your configuration

process.siPixelDigis = cms.EDProducer("SiPixelRawToDigiGPU",
    CablingMapLabel = cms.string(''),
    ConvertADCtoElectrons = cms.bool(False),
    ErrorList = cms.vint32(29),
    IncludeErrors = cms.bool(True),
    InputLabel = cms.InputTag("rawDataCollector"),
    Regions = cms.PSet(

    ),
    Timing = cms.untracked.bool(False),
    UsePhase1 = cms.bool(True),
    UsePilotBlade = cms.bool(False),
    UseQualityInfo = cms.bool(False),
    UserErrorList = cms.vint32(40)
)

process.siPixelRecHitsPreSplitting = cms.EDProducer("SiPixelRecHitGPU",
    src = cms.InputTag("siPixelDigis"),  
    CPE = cms.string('PixelCPEFast'),
    VerboseLevel = cms.untracked.int32(0),
)

from FWCore.ParameterSet.MassReplace import massReplaceInputTag
massReplaceInputTag(process, 'siPixelClustersPreSplitting', 'siPixelDigis')

to ensure fair comparison, on CPU add

process.siPixelClustersPreSplitting.payloadType = 'HLT'

for data remember to change GT to

process.GlobalTag = GlobalTag(process.GlobalTag, '100X_dataRun2_asv2plusPixelGainfromHLT_v1', '')

printouts and asserts can be cleaned up later on

@VinInn
Copy link
Author

VinInn commented Feb 22, 2018

still issues. after few events I got

Assertion `fd && k!=ij' failed.

even if the number of clusters is correct

investigating....

@VinInn
Copy link
Author

VinInn commented Feb 22, 2018

changed the asserts in couts
2 events in 200 were affected. for the time being we go like this....

@VinInn
Copy link
Author

VinInn commented Feb 22, 2018

problem understood: it is due to clusters larger than 255 pixels: on CPU we truncate at 255, on GPU there is no truncation (as there is no copy of digis).
Will leave with it unless it creates havoc in the comparison

@fwyzard
Copy link

fwyzard commented Feb 28, 2018

@VinInn can you confirm that these blocks

should be dropped altogether ?

In fact, could I ask you to clean up the code from the debugging stuff before making the PRs ?

@cmsbot
Copy link

cmsbot commented Feb 28, 2018

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

It involves the following packages:

EventFilter/SiPixelRawToDigi
RecoLocalTracker/SiPixelRecHits

@cmsbot, @fwyzard can you please review it and eventually sign? Thanks.

cms-bot commands are listed here

@VinInn
Copy link
Author

VinInn commented Feb 28, 2018

should we really remove all "debug" code or just ifdefit?
(similar code, with ifdefs, exists in production code)

@fwyzard
Copy link

fwyzard commented Feb 28, 2018

At the very least you should remove cout messages from the destructor of the static objects that are used only for debugging, and now litter every single CMSSW-based command.

As for what is in production: IMHO there should be a single (at most per-package) flag used to #ifdef debug messages - and even that should be allowed only if the standard workflows actually exercise building and running with it defined; as things are now there are way too many packages that cannot be compiled with whatever debug flag they use being set, because that part of the code broke ages ago and was never fixed.

@fwyzard
Copy link

fwyzard commented Feb 28, 2018

As for these messages, I've cleaned them up via #21

@cmsbot
Copy link

cmsbot commented Feb 28, 2018

Pull request #18 was updated. @cmsbot, @fwyzard can you please check and sign again.

1 similar comment
@cmsbot
Copy link

cmsbot commented Feb 28, 2018

Pull request #18 was updated. @cmsbot, @fwyzard can you please check and sign again.

@cmsbot
Copy link

cmsbot commented Feb 28, 2018

Pull request #18 was updated. @cmsbot, @fwyzard can you please check and sign again.

1 similar comment
@cmsbot
Copy link

cmsbot commented Feb 28, 2018

Pull request #18 was updated. @cmsbot, @fwyzard can you please check and sign again.

@VinInn
Copy link
Author

VinInn commented Feb 28, 2018

all cout are "gone"
including those of #21

@fwyzard
Copy link

fwyzard commented Feb 28, 2018

Thanks, I'll give it a try after integrating #19 and #20.

Running with the HEAD right now generates ~400MB log files for 1k events...

@makortel
Copy link

makortel commented Mar 1, 2018

@VinInn

10824.8 crashes while my own config works..

Does it crash on cms-patatrack:CMSSW_10_1_X_Patatrack or on this branch?

(for 10824.8 I took the customization from #13 which I though was the latest merged one)

this is because process.siPixelRecHitsPreSplitting.src != cms.InputTag("siPixelDigis"),

actually it is missing the whole

from FWCore.ParameterSet.MassReplace import massReplaceInputTag
massReplaceInputTag(process, 'siPixelClustersPreSplitting', 'siPixelDigis')
adding it to the end of step3_RAW2DIGI_RECO_VALIDATION.py
it works...

Are all these additions from this PR? I can make a PR on top of yours adding them (and hope that the manual version of massReplaceInputTag does not touch too many packages...)

@VinInn
Copy link
Author

VinInn commented Mar 1, 2018 via email

@fwyzard
Copy link

fwyzard commented Mar 1, 2018

@VinInn , here are the comparison plots for 1k Z->mumu events without pileup.

  • reference is the pixel-only workflow from 10.1.0-pre1
  • 10824.5 is the pixel-only workflow on the CPU from Patatrack + this PR + the changes mentioned here
  • 10824.5 is the pixel-only workflow on the GPU from Patatrack + this PR + the changes mentioned here

Do the differences agree with what you expect ?

@VinInn
Copy link
Author

VinInn commented Mar 1, 2018

Do the differences agree with what you expect?
yes, very very similar to what I obtained with ttbar
of course here the pt>50 GeV is more populated and interesting....

@fwyzard
Copy link

fwyzard commented Mar 1, 2018

OK, I think I managed to put the necessary customisation to use these changes in the gpu modifier.
I'll merge this, and make a PR with that.

@fwyzard fwyzard merged commit 7e91c29 into cms-patatrack:CMSSW_10_1_X_Patatrack Mar 1, 2018
@fwyzard
Copy link

fwyzard commented Mar 1, 2018

Done in #31 .

fwyzard pushed a commit that referenced this pull request May 23, 2020
…ms (L1Trigger/TrackFindingTMTT) (cms-sw#29381)

* create separate PRs for the two L1TK packages

* Improved KF efficiency at high eta

* Moved MC data files to cms-data

* Removed old file

* Removed KF HLS to put instead in external library

* Ran scram b code-format

* Delete KF4ParamsComb.h.bak

* Delete KF4ParamsCombIV.bak

* Delete KF4ParamsCombV2.bak

* Delete KF5ParamsComb.h.bak

* Delete KF4ParamsComb.cc.bak

* Delete KF4ParamsCombIV.bak

* Delete KF4ParamsCombV2.bak

* Delete KF5ParamsComb.cc.bak

* L1 tk integration tmtt pre5 (#7)

* Added CMS code style fixes

* Removed old file

* Reapplied stub b code-format

* All code review changes (#13)

* Fix clang errors (#14)

* fixed clang error

* directory for MC txt files

* Fixed clang warnings + minor simplifications (#15)

* tweak

* tweak

* Fixed clang warnings and small simplifications

* Fixed clang warnings and small simplifications

* All remaining review comments addressed (#16)

* Replaced vector size with empty function

* Simplified DegradeBend and StubWindowSuggest

* Fixed more review comments

* More review comments

* code reformat

* Ran exhaustive clang tidy

* Added library to BuildFile.xml (#17)

* Deleted TrackFindingTMT/data/README (#18)

* Added library to BuildFile.xml (This was already done yesterday. Not sure why it appears again)

* README file in data directory deleted

* Fix review comments (#20)

Co-authored-by: Louise Skinnari <louise.skinnari@cern.ch>
fwyzard pushed a commit that referenced this pull request Oct 8, 2020
fwyzard pushed a commit that referenced this pull request Oct 19, 2020
fwyzard pushed a commit that referenced this pull request Oct 20, 2020
fwyzard pushed a commit that referenced this pull request Oct 23, 2020
fwyzard pushed a commit that referenced this pull request Nov 6, 2020
fwyzard pushed a commit that referenced this pull request Nov 16, 2020
fwyzard pushed a commit that referenced this pull request Dec 25, 2020
fwyzard pushed a commit that referenced this pull request Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants