MCPcopy
hub / github.com/horovod/horovod / test

Function test

test/integration/test_stall.py:8–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def test():
9 signal.alarm(45)
10 with env(HOROVOD_STALL_CHECK_TIME_SECONDS="2",
11 HOROVOD_STALL_SHUTDOWN_TIME_SECONDS="5"):
12 hvd.init()
13 tensor = torch.IntTensor([[1, 2], [3, 4]])
14 if hvd.rank() != 0:
15 time.sleep(10 * hvd.rank());
16 try:
17 summed = hvd.allreduce(tensor, average=False)
18 except:
19 pass
20 finally:
21 hvd.shutdown()
22
23
24if __name__ == "__main__":

Callers 3

test_stall.pyFile · 0.70
test_run_controllerMethod · 0.50

Calls 5

envFunction · 0.90
initMethod · 0.45
rankMethod · 0.45
sleepMethod · 0.45
shutdownMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…