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

Fix HLT customization for alpaka PF #43999

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions HLTrigger/Configuration/python/customizeHLTforAlpaka.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,10 @@ def customizeHLTforAlpakaParticleFlowClustering(process):

process.hltPFRecHitSoAProducerHCALCPUSerial = makeSerialClone(process.hltPFRecHitSoAProducerHCAL)


process.hltLegacyPFRecHitProducer = cms.EDProducer("LegacyPFRecHitProducer",
src = cms.InputTag("hltPFRecHitSoAProducerHCAL")
)

process.hltLegacyPFRecHitProducerCPUSerial = process.hltLegacyPFRecHitProducer.clone(
src = cms.InputTag("hltPFRecHitSoAProducerHCALCPUSerial")
)

process.hltPFClusterParamsESProducer = cms.ESProducer("PFClusterParamsESProducer@alpaka",
seedFinder = cms.PSet(
nNeighbours = cms.int32(4),
Expand Down Expand Up @@ -204,6 +199,7 @@ def customizeHLTforAlpakaParticleFlowClustering(process):
PFRecHitsLabelIn = cms.InputTag("hltPFRecHitSoAProducerHCAL")
)


#Same as default except change the clusterSource
process.hltParticleFlowClusterHCAL = cms.EDProducer("PFMultiDepthClusterProducer",
clustersSource = cms.InputTag("hltLegacyPFClusterProducer"),
Expand All @@ -217,19 +213,17 @@ def customizeHLTforAlpakaParticleFlowClustering(process):
process.HLTPFHcalRecHits = cms.Sequence(
process.hltHBHERecHitToSoA+
process.hltPFRecHitSoAProducerHCAL+
process.hltPFRecHitSoAProducerHCALCPUSerial+
process.hltLegacyPFRecHitProducer+
process.hltLegacyPFRecHitProducerCPUSerial
process.hltLegacyPFRecHitProducer
)

process.HLTPFHcalClustering = cms.Sequence(
process.HLTPFHcalRecHits+
process.hltPFClusterSoAProducer+
process.hltPFClusterSoAProducerCPUSerial+
process.hltLegacyPFClusterProducer+
process.hltParticleFlowClusterHCAL
)


#Some Sequences contain all the modules of process.HLTPFHcalClustering Sequence instead of the Sequence itself
#find these Sequences and replace all the modules with the Sequence
def replaceItemsInSequence(process, itemsToReplace, replacingSequence):
Expand All @@ -249,6 +243,21 @@ def replaceItemsInSequence(process, itemsToReplace, replacingSequence):
itemsList = [process.hltParticleFlowRecHitHBHE, process.hltParticleFlowClusterHBHE,process.hltParticleFlowClusterHCAL]
process = replaceItemsInSequence(process, itemsList, process.HLTPFHcalClustering)

process.HLTPFClusterHBHECPUSerial = cms.Sequence(process.hltHBHERecHitToSoA+process.hltPFRecHitSoAProducerHCALCPUSerial+process.hltPFClusterSoAProducerCPUSerial)

# Add CPUSerial sequences to DQM_HcalReconstruction_v6 Path
dqmHcalRecoPathName = "DQM_HcalReconstruction_v6"
dqmHcalPath= getattr(process, dqmHcalRecoPathName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like this getattr() call is causing workflow failures in GPU IB, see #44046

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess something like this

dqmPixelRecoPathName = None
for pathName in process.paths_():
if pathName.startswith('DQM_PixelReconstruction_v'):
dqmPixelRecoPathName = pathName
break
if dqmPixelRecoPathName == None:
return process

is needed.
@waredjeb FYI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for providing the fix with #44048
should I update #44000 with the same fix?

Copy link
Contributor

Choose a reason for hiding this comment

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

should I update #44000 with the same fix?

yes, please

dqmHcalRecoPathIndex = dqmHcalPath.index(process.hltHcalConsumerGPU) + 1
dqmHcalPath.insert(dqmHcalRecoPathIndex , process.HLTPFClusterHBHECPUSerial)

# modify EventContent of DQMGPUvsCPU stream
if hasattr(process, 'hltOutputDQMGPUvsCPU'):
process.hltOutputDQMGPUvsCPU.outputCommands.extend([
'keep *_hltPFClusterSoAProducer_*_*',
'keep *_hltPFClusterSoAProducerCPUSerial_*_*',
])

return process

## Pixel HLT in Alpaka
Expand Down