1 import FWCore.ParameterSet.Config
as cms
7 super(ProcessAcceleratorCUDA,self).
__init__()
12 enabled = (os.system(
"cudaIsEnabled") == 0)
17 def apply(self, process, accelerators):
18 if not hasattr(process,
"CUDAService"):
19 from HeterogeneousCore.CUDAServices.CUDAService_cfi
import CUDAService
20 process.add_(CUDAService)
22 if not hasattr(process.MessageLogger,
"CUDAService"):
23 process.MessageLogger.CUDAService = cms.untracked.PSet()
25 if self.
_label in accelerators:
26 process.CUDAService.enabled =
True
28 process.CUDAService.enabled =
False
30 cms.specialImportRegistry.registerSpecialImportForType(ProcessAcceleratorCUDA,
"from HeterogeneousCore.CUDACore.ProcessAcceleratorCUDA import ProcessAcceleratorCUDA")