Skip to content

Commit

Permalink
Merge pull request #37062 from makortel/processAcceleratorCUDA
Browse files Browse the repository at this point in the history
Add 'CUDAService' category also when CUDA is disabled, but only if it does not exist yet
  • Loading branch information
cmsbuild committed Feb 25, 2022
2 parents a74e430 + c02ab88 commit 141b02e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion HeterogeneousCore/CUDACore/python/ProcessAcceleratorCUDA.py
Expand Up @@ -19,9 +19,11 @@ def apply(self, process, accelerators):
from HeterogeneousCore.CUDAServices.CUDAService_cfi import CUDAService
process.add_(CUDAService)

if not hasattr(process.MessageLogger, "CUDAService"):
process.MessageLogger.CUDAService = cms.untracked.PSet()

if self._label in accelerators:
process.CUDAService.enabled = True
process.MessageLogger.CUDAService = cms.untracked.PSet()
else:
process.CUDAService.enabled = False

Expand Down

0 comments on commit 141b02e

Please sign in to comment.