MCPcopy
hub / github.com/hpcaitech/ColossalAI / check_alpha_beta

Function check_alpha_beta

tests/test_device/test_alpha_beta.py:9–15  ·  view source on GitHub ↗
(rank, world_size, port, physical_devices)

Source from the content-addressed store, hash-verified

7
8
9def check_alpha_beta(rank, world_size, port, physical_devices):
10 disable_existing_loggers()
11 launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
12 profiler = AlphaBetaProfiler(physical_devices)
13 ab_dict = profiler.profile_ab()
14 for _, (alpha, beta) in ab_dict.items():
15 assert alpha > 0 and alpha < 1e-4 and beta > 0 and beta < 1e-10
16
17
18@pytest.mark.skip(reason="Skip because assertion fails for CI devices")

Callers

nothing calls this directly

Calls 4

profile_abMethod · 0.95
disable_existing_loggersFunction · 0.90
launchFunction · 0.90
AlphaBetaProfilerClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…