()
| 6 | |
| 7 | |
| 8 | def 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 | |
| 24 | if __name__ == "__main__": |
no test coverage detected
searching dependent graphs…