CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ProcessAcceleratorROCm.ProcessAcceleratorROCm Class Reference
Inheritance diagram for ProcessAcceleratorROCm.ProcessAcceleratorROCm:

Public Member Functions

def __init__ (self)
 
def apply (self, process, accelerators)
 
def enabledLabels (self)
 
def labels (self)
 

Private Attributes

 _label
 

Detailed Description

Definition at line 7 of file ProcessAcceleratorROCm.py.

Constructor & Destructor Documentation

◆ __init__()

def ProcessAcceleratorROCm.ProcessAcceleratorROCm.__init__ (   self)

Definition at line 8 of file ProcessAcceleratorROCm.py.

8  def __init__(self):
9  super(ProcessAcceleratorROCm, self).__init__()
10  self._label = "gpu-amd"
11 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ apply()

def ProcessAcceleratorROCm.ProcessAcceleratorROCm.apply (   self,
  process,
  accelerators 
)

Definition at line 22 of file ProcessAcceleratorROCm.py.

References ProcessAcceleratorCUDA.ProcessAcceleratorCUDA._label, ProcessAcceleratorROCm.ProcessAcceleratorROCm._label, and LHECOMWeightProducer._label.

Referenced by heavyIonTools.ConfigureHeavyIons.__call__(), coreTools.RunOnData.__call__(), trackTools.MakeAODTrackCandidates.__call__(), runJetUncertainties.RunJetUncertainties.__call__(), metTools.AddMETCollection.__call__(), heavyIonTools.ProductionDefaults.__call__(), cmsswVersionTools.PickRelValInputFiles.__call__(), coreTools.RemoveMCMatching.__call__(), trackTools.MakePATTrackCandidates.__call__(), trigTools.SwitchOnTrigger.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__call__(), heavyIonTools.SelectionDefaults.__call__(), heavyIonTools.DisbaleMonteCarloDeps.__call__(), trigTools.SwitchOnTriggerStandAlone.__call__(), tauTools.AddTauCollection.__call__(), trackTools.MakeTrackCandidates.__call__(), trigTools.SwitchOnTriggerMatching.__call__(), trigTools.SwitchOnTriggerMatchingStandAlone.__call__(), trigTools.SwitchOnTriggerMatchEmbedding.__call__(), jetTools.AddJetCollection.__call__(), jetTools.SwitchJetCollection.__call__(), jetTools.UpdateJetCollection.__call__(), jetTools.AddJetID.__call__(), and jetTools.SetTagInfos.__call__().

22  def apply(self, process, accelerators):
23 
24  if self._label in accelerators:
25  # Ensure that the ROCmService is loaded
26  if not hasattr(process, "ROCmService"):
27  from HeterogeneousCore.ROCmServices.ROCmService_cfi import ROCmService
28  process.add_(ROCmService)
29 
30  # Propagate the ROCmService messages through the MessageLogger
31  if not hasattr(process.MessageLogger, "ROCmService"):
32  process.MessageLogger.ROCmService = cms.untracked.PSet()
33 
34  else:
35  # Make sure the ROCmService is not loaded
36  if hasattr(process, "ROCmService"):
37  del process.ROCmService
38 
39  # Drop the ROCmService messages from the MessageLogger
40  if hasattr(process.MessageLogger, "ROCmService"):
41  del process.MessageLogger.ROCmService
42 
43 
44 # Ensure this module is kept in the configuration when dumping it
45 cms.specialImportRegistry.registerSpecialImportForType(ProcessAcceleratorROCm, "from HeterogeneousCore.ROCmCore.ProcessAcceleratorROCm import ProcessAcceleratorROCm")
46 
Vec apply(Vec v, F f)
Definition: ExtVec.h:81

◆ enabledLabels()

def ProcessAcceleratorROCm.ProcessAcceleratorROCm.enabledLabels (   self)

Definition at line 15 of file ProcessAcceleratorROCm.py.

References ProcessAcceleratorCUDA.ProcessAcceleratorCUDA.labels(), ProcessAcceleratorROCm.ProcessAcceleratorROCm.labels(), CollectionCombiner< Collection >.labels, confdb.HLTProcess.labels, trigger::HLTPrescaleTable.labels(), ecaldqm::binning::AxisSpecs.labels, Config.ProcessAccelerator.labels(), Config.ProcessAcceleratorTest.labels(), Config.ProcessAcceleratorTest2.labels(), and svgfig.Ticks.labels.

15  def enabledLabels(self):
16  # Check if ROCm is available, and if the system has at least one usable device.
17  # These should be checked on each worker node, because it depends both
18  # on the architecture and on the actual hardware present in the machine.
19  status = PlatformStatus(os.waitstatus_to_exitcode(os.system("rocmIsEnabled")))
20  return self.labels() if status == PlatformStatus.Success else []
21 

◆ labels()

def ProcessAcceleratorROCm.ProcessAcceleratorROCm.labels (   self)

Member Data Documentation

◆ _label