1 import FWCore.ParameterSet.Config
as cms
4 have_gpu = (
"gpu-nvidia" in useAccelerators)
9 super(SwitchProducerCUDA,self).
__init__(
10 dict(cpu = cms.SwitchProducer.getCpu(),
14 cms.specialImportRegistry.registerSpecialImportForType(SwitchProducerCUDA,
"from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA")
16 if __name__ ==
"__main__":
23 pkl = pickle.dumps(sp)
24 unpkl = pickle.loads(pkl)
25 self.assertEqual(unpkl.cpu.type_(),
"Foo")
26 self.assertEqual(unpkl.cuda.type_(),
"Bar")