forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the HCAL 'gpu' workflow use a GPU if available, and fall-back to…
… CPU otherwise
- Loading branch information
Showing
8 changed files
with
85 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA | ||
|
||
from RecoLocalCalo.HcalRecProducers.HBHEIsolatedNoiseReflagger_cfi import * | ||
#--- for Run 1 and Run 2 | ||
from RecoLocalCalo.HcalRecProducers.HBHEIsolatedNoiseReflagger_cfi import hbhereco as _phase0_hbhereco | ||
hbhereco = SwitchProducerCUDA( | ||
cpu = _phase0_hbhereco | ||
) | ||
hcalGlobalRecoTask = cms.Task(hbhereco) | ||
hcalGlobalRecoSequence = cms.Sequence(hcalGlobalRecoTask) | ||
|
||
hcalOnlyGlobalRecoTask = cms.Task() | ||
hcalOnlyGlobalRecoSequence = cms.Sequence(hcalOnlyGlobalRecoTask) | ||
|
||
#--- for Run 3 and later | ||
from Configuration.Eras.Modifier_run3_HB_cff import run3_HB | ||
|
||
from RecoLocalCalo.HcalRecProducers.HBHEPhase1Reconstructor_cfi import hbheprereco as _phase1_hbheprereco | ||
run3_HB.toReplaceWith(hbhereco, _phase1_hbheprereco) | ||
run3_HB.toReplaceWith(hbhereco.cpu, _phase1_hbheprereco) | ||
run3_HB.toReplaceWith(hcalOnlyGlobalRecoTask, cms.Task(hbhereco)) | ||
|
||
#--- for Run 3 on GPU | ||
from Configuration.ProcessModifiers.gpu_cff import gpu | ||
|
||
from RecoLocalCalo.HcalRecProducers.hcalCPURecHitsProducer_cfi import hcalCPURecHitsProducer as _hcalCPURecHitsProducer | ||
gpu.toReplaceWith(hbhereco, _hcalCPURecHitsProducer.clone( | ||
recHitsM0LabelIn = "hbheRecHitProducerGPU", | ||
recHitsM0LabelOut = "", | ||
recHitsLegacyLabelOut = "" | ||
)) | ||
from RecoLocalCalo.HcalRecProducers.hcalCPURecHitsProducer_cfi import hcalCPURecHitsProducer as _hbherecoFromCUDA | ||
(run3_HB & gpu).toModify(hbhereco, | ||
cuda = _hbherecoFromCUDA.clone( | ||
produceSoA = False | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters