MCPcopy Create free account
hub / github.com/Rivendile/Muri / init_node

Method init_node

simulator/node.py:33–45  ·  view source on GitHub ↗
(self, num_gpu=0, num_cpu=0, mem=0)

Source from the content-addressed store, hash-verified

31 util.print_fn(' Node[%d] has %d gpus, %d cpus, %d G memory' % (id, num_gpu, num_cpu, mem))
32
33 def init_node(self, num_gpu=0, num_cpu=0, mem=0):
34 if num_gpu != 0:
35 self.num_gpu = num_gpu
36 self.free_gpus = num_gpu
37 if num_cpu != 0:
38 self.num_cpu = num_cpu
39 self.free_cpus = num_cpu
40 if mem != 0:
41 self.mem = mem
42 self.free_mem = mem
43
44 self.add_gpus(self.num_gpu)
45 self.add_cpus(self.num_gpu)
46
47
48 ''' GPU '''

Callers 1

empty_infraMethod · 0.45

Calls 2

add_gpusMethod · 0.95
add_cpusMethod · 0.95

Tested by

no test coverage detected