CMS 3D CMS Logo

Functions | Variables
cudaPreallocate Namespace Reference

Functions

def main (opts)
 

Variables

 description
 
 help
 
 opts
 
 parser
 
 str
 
 type
 

Function Documentation

◆ main()

def cudaPreallocate.main (   opts)

Definition at line 8 of file cudaPreallocate.py.

8 def main(opts):
9  device = []
10  host = []
11 
12  device_re = re.compile("Device.*allocated new device block.*\((?P<bytes>\d+) bytes")
13  host_re = re.compile("Host.*allocated new host block.*\((?P<bytes>\d+) bytes")
14 
15  f = open(opts.file)
16  for line in f:
17  m = device_re.search(line)
18  if m:
19  device.append(m.group("bytes"))
20  continue
21  m = host_re.search(line)
22  if m:
23  host.append(m.group("bytes"))
24  f.close()
25 
26  print("process.CUDAService.allocator.devicePreallocate = cms.untracked.vuint32(%s)" % ",".join(device))
27  print("process.CUDAService.allocator.hostPreallocate = cms.untracked.vuint32(%s)" % ",".join(host))
28 

References join(), and edm.print().

Variable Documentation

◆ description

cudaPreallocate.description

Definition at line 30 of file cudaPreallocate.py.

◆ help

cudaPreallocate.help

Definition at line 36 of file cudaPreallocate.py.

◆ opts

cudaPreallocate.opts

Definition at line 37 of file cudaPreallocate.py.

◆ parser

cudaPreallocate.parser

Definition at line 30 of file cudaPreallocate.py.

◆ str

cudaPreallocate.str

Definition at line 36 of file cudaPreallocate.py.

◆ type

cudaPreallocate.type

Definition at line 36 of file cudaPreallocate.py.

join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
cudaPreallocate.main
def main(opts)
Definition: cudaPreallocate.py:8