MCPcopy Create free account
hub / github.com/RenderKit/oidn / start_workers

Function start_workers

training/util.py:94–99  ·  view source on GitHub ↗
(cfg, worker_fn)

Source from the content-addressed store, hash-verified

92
93# Starts worker processes
94def start_workers(cfg, worker_fn):
95 if cfg.num_devices > 1:
96 # Spawn a worker process for each device
97 mp.spawn(worker_fn, args=(cfg,), nprocs=cfg.num_devices)
98 else:
99 worker_fn(0, cfg)
100
101# Initializes a worker process and returns whether running in distributed mode
102def init_worker(rank, cfg):

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected