MCPcopy Create free account
hub / github.com/THUDM/GLM / print_separator

Function print_separator

mpu/tests/commons.py:75–82  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

73
74
75def print_separator(message):
76 torch.distributed.barrier()
77 filler_len = (78 - len(message)) // 2
78 filler = '-' * filler_len
79 string = '\n' + filler + ' {} '.format(message) + filler
80 if torch.distributed.get_rank() == 0:
81 print(string, flush=True)
82 torch.distributed.barrier()

Callers 5

test_layers.pyFile · 0.90
test_initialize.pyFile · 0.90
test_random.pyFile · 0.90
test_data.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected