Skip to content

Commit

Permalink
Add a new Accelerators_cff to collect all 'standard' ProcessAccelerators
Browse files Browse the repository at this point in the history
Thanks to Andrea Bocci for the suggestion.
  • Loading branch information
makortel committed Feb 16, 2022
1 parent 023bf0e commit fc821ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Configuration/StandardSequences/python/Accelerators_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import FWCore.ParameterSet.Config as cms

# This fragment is intended to collect all ProcessAccelerator objects
# used in production

from HeterogeneousCore.CUDACore.ProcessAcceleratorCUDA_cfi import ProcessAcceleratorCUDA
9 changes: 5 additions & 4 deletions Configuration/StandardSequences/python/Services_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
# DQM store service
from DQMServices.Core.DQMStore_cfi import *

# load CUDA services when the "gpu" or "pixelNtupletFit" modifiers are enabled
def _addCUDAServices(process):
process.load("HeterogeneousCore.CUDACore.ProcessAcceleratorCUDA_cfi")
# load ProcessAccelerators (that set the e.g. the necessary CUDA
# stuff) when the "gpu" or "pixelNtupletFit" modifiers are enabled
def _addProcessAccelerators(process):
process.load("Configuration.StandardSequences.Accelerators_cff")

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

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

0 comments on commit fc821ee

Please sign in to comment.