From fc821ee64cdecaca6c5f86f31fdd19b9cb575942 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Mon, 14 Feb 2022 16:01:06 +0100 Subject: [PATCH] Add a new Accelerators_cff to collect all 'standard' ProcessAccelerators Thanks to Andrea Bocci for the suggestion. --- .../StandardSequences/python/Accelerators_cff.py | 6 ++++++ Configuration/StandardSequences/python/Services_cff.py | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 Configuration/StandardSequences/python/Accelerators_cff.py diff --git a/Configuration/StandardSequences/python/Accelerators_cff.py b/Configuration/StandardSequences/python/Accelerators_cff.py new file mode 100644 index 0000000000000..aeef6ea5f367b --- /dev/null +++ b/Configuration/StandardSequences/python/Accelerators_cff.py @@ -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 diff --git a/Configuration/StandardSequences/python/Services_cff.py b/Configuration/StandardSequences/python/Services_cff.py index 3925df5f9ed41..c8c0b1e63b226 100644 --- a/Configuration/StandardSequences/python/Services_cff.py +++ b/Configuration/StandardSequences/python/Services_cff.py @@ -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):