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

Update the HLT alpaka customisation [14.0.x] #44440

Merged
Merged
Changes from 1 commit
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
Prev Previous commit
Customise the GPU checks to use the AlpakaBackendFilter
Customise the Status_On{CPU|GPU} HLT paths and the
DQM_{Ecal|Hcal|Pixel}Reconstruction HLT paths to use the AlpakaBackendProducer
and AlpakaBackendFilter modules.
  • Loading branch information
fwyzard committed Mar 17, 2024
commit 8bae51b0dd0324ef0325ac0f60ccc712669452e8
36 changes: 33 additions & 3 deletions HLTrigger/Configuration/python/customizeHLTforAlpaka.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import FWCore.ParameterSet.Config as cms

from HeterogeneousCore.AlpakaCore.functions import *

from HLTrigger.Configuration.common import producers_by_type
from HLTrigger.Configuration.common import *

## PF HLT in Alpaka
def customizeHLTforAlpakaParticleFlowClustering(process):
@@ -270,6 +269,7 @@ def replaceItemsInSequence(process, seqNames, itemsToReplace, replacingSequence)

return process


## Pixel HLT in Alpaka
def customizeHLTforDQMGPUvsCPUPixel(process):
'''Ad-hoc changes to test HLT config containing only DQM_PixelReconstruction_v and DQMGPUvsCPU stream
@@ -387,6 +387,7 @@ def customizeHLTforDQMGPUvsCPUPixel(process):

return process


def customizeHLTforAlpakaPixelRecoLocal(process):
'''Customisation to introduce the Local Pixel Reconstruction in Alpaka
'''
@@ -629,6 +630,7 @@ def customizeHLTforAlpakaPixelRecoLocal(process):

return process


def customizeHLTforAlpakaPixelRecoTracking(process):
'''Customisation to introduce the Pixel-Track Reconstruction in Alpaka
'''
@@ -745,6 +747,7 @@ def customizeHLTforAlpakaPixelRecoTracking(process):

return process


def customizeHLTforAlpakaPixelRecoVertexing(process):
'''Customisation to introduce the Pixel-Vertex Reconstruction in Alpaka
'''
@@ -833,6 +836,7 @@ def customizeHLTforAlpakaPixelRecoVertexing(process):

return process


def customizeHLTforAlpakaPixelReco(process):
'''Customisation to introduce the Pixel Local+Track+Vertex Reconstruction in Alpaka
'''
@@ -843,6 +847,7 @@ def customizeHLTforAlpakaPixelReco(process):

return process


## ECAL HLT in Alpaka
def customizeHLTforAlpakaEcalLocalReco(process):

@@ -1051,10 +1056,35 @@ def customizeHLTforAlpakaEcalLocalReco(process):

return process

def customizeHLTforAlpaka(process):

def customizeHLTforAlpakaStatus(process):

if not hasattr(process, 'statusOnGPU'):
return process

process.hltBackend = cms.EDProducer('AlpakaBackendProducer@alpaka')

insert_modules_before(process, process.statusOnGPU, process.hltBackend)

del process.statusOnGPU

process.hltStatusOnGPUFilter = cms.EDFilter('AlpakaBackendFilter',
producer = cms.InputTag('hltBackend', 'backend'),
backends = cms.vstring('CudaAsync', 'ROCmAsync')
)

insert_modules_before(process, process.statusOnGPUFilter, process.hltStatusOnGPUFilter)
insert_modules_before(process, ~process.statusOnGPUFilter, ~process.hltStatusOnGPUFilter)

del process.statusOnGPUFilter

return process


def customizeHLTforAlpaka(process):
process.load('Configuration.StandardSequences.Accelerators_cff')

process = customizeHLTforAlpakaStatus(process)
process = customizeHLTforAlpakaPixelReco(process)
process = customizeHLTforAlpakaEcalLocalReco(process)
process = customizeHLTforAlpakaParticleFlowClustering(process)