Skip to content

Commit

Permalink
Alpaka Port - Configs
Browse files Browse the repository at this point in the history
Co-authored-by: Adriano Di Florio <[email protected]>
Co-authored-by: Breno Orzari <[email protected]>
Co-authored-by: Dimitris Papagiannis <[email protected]>
  • Loading branch information
4 people committed Nov 15, 2023
1 parent b8e3f2c commit 8a98af3
Show file tree
Hide file tree
Showing 7 changed files with 612 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import FWCore.ParameterSet.Config as cms

# This modifier chain is for turning on DQM modules used for alpaka device/host validation for pixels

alpakaValidationPixel = cms.Modifier()

11 changes: 11 additions & 0 deletions Configuration/ProcessModifiers/python/alpakaValidation_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import FWCore.ParameterSet.Config as cms

from Configuration.ProcessModifiers.alpaka_cff import *
from Configuration.ProcessModifiers.alpakaValidationPixel_cff import *

# This modifier chain is for turning on DQM modules used for alpaka device/host validation

alpakaValidation = cms.ModifierChain(
alpaka,
alpakaValidationPixel
)
5 changes: 5 additions & 0 deletions Configuration/ProcessModifiers/python/alpaka_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FWCore.ParameterSet.Config as cms

# This modifier is for enabling alpaka modules

alpaka = cms.Modifier()
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ def setup_(self, step, stepName, stepDict, k, properties):
# - HLT on CPU
# - Pixel-only reconstruction on CPU, with DQM and validation
# - harvesting

upgradeWFs['PatatrackPixelOnlyCPU'] = PatatrackWorkflow(
digi = {
# the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
Expand Down Expand Up @@ -1503,6 +1504,53 @@ def setup_(self, step, stepName, stepDict, k, properties):
offset = 0.597,
)


#Alpaka workflows

upgradeWFs['PatatrackPixelOnlyAlpaka'] = PatatrackWorkflow(
digi = {
'--procModifiers': 'alpaka'
},
reco = {
'-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
'--procModifiers': 'alpaka'
},
harvest = {
'-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
},
suffix = 'Patatrack_PixelOnlyAlpaka',
offset = 0.55,
)

upgradeWFs['PatatrackPixelOnlyAlpakaProfiling'] = PatatrackWorkflow(
digi = {
'--procModifiers': 'alpaka'
},
reco = {
'-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly',
'--procModifiers': 'alpaka',
'--customise' : 'RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly'
},
harvest = None,
suffix = 'Patatrack_PixelOnlyAlpaka_Profiling',
offset = 0.554,
)

upgradeWFs['PatatrackPixelOnlyAlpakaValidation'] = PatatrackWorkflow(
digi = {
# the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
},
reco = {
'-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
'--procModifiers': 'alpakaValidation'
},
harvest = {
'-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
},
suffix = 'Patatrack_PixelOnlyAlpakaValidation',
offset = 0.557,
)

# end of Patatrack workflows

class UpgradeWorkflow_ProdLike(UpgradeWorkflow):
Expand Down
8 changes: 7 additions & 1 deletion Configuration/StandardSequences/python/Services_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@
def _addProcessAccelerators(process):
process.load("Configuration.StandardSequences.Accelerators_cff")

def _addProcessAcceleratorsAlpaka(process):
process.load("HeterogeneousCore.AlpakaCore.ProcessAcceleratorAlpaka_cfi")

from Configuration.ProcessModifiers.gpu_cff import gpu
from Configuration.ProcessModifiers.pixelNtupletFit_cff import pixelNtupletFit
modifyConfigurationStandardSequencesServicesAddProcessAccelerators_ = (gpu | pixelNtupletFit).makeProcessModifier(_addProcessAccelerators)
from Configuration.ProcessModifiers.alpaka_cff import alpaka

modifyConfigurationStandardSequencesServicesAddProcessAccelerators_ = (gpu | pixelNtupletFit | alpaka).makeProcessModifier(_addProcessAccelerators)
modifyConfigurationStandardSequencesServicesAddProcessAcceleratorsAlpaka_ = alpaka.makeProcessModifier(_addProcessAcceleratorsAlpaka)

# load TritonService when SONIC workflow is enabled
def _addTritonService(process):
Expand Down
Loading

0 comments on commit 8a98af3

Please sign in to comment.