mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-04 10:34:41 +00:00
[misc] update pre-commit and run all files (#4752)
* [misc] update pre-commit * [misc] run pre-commit * [misc] remove useless configuration files * [misc] ignore cuda for clang-format
This commit is contained in:
@@ -8,7 +8,7 @@ from colossalai.testing import parameterize, rerun_if_address_is_in_use, spawn
|
||||
|
||||
def check_extract_alpha_beta(rank, world_size, port, physical_devices):
|
||||
disable_existing_loggers()
|
||||
launch(config={}, rank=rank, world_size=world_size, host='localhost', port=port, backend='nccl')
|
||||
launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
profiler = AlphaBetaProfiler(physical_devices)
|
||||
|
||||
mesh_alpha, mesh_beta = profiler.extract_alpha_beta_for_device_mesh()
|
||||
@@ -20,11 +20,11 @@ def check_extract_alpha_beta(rank, world_size, port, physical_devices):
|
||||
|
||||
@pytest.mark.skip(reason="Skip because assertion may fail for CI devices")
|
||||
@pytest.mark.dist
|
||||
@parameterize('physical_devices', [[0, 1, 2, 3], [0, 3]])
|
||||
@parameterize("physical_devices", [[0, 1, 2, 3], [0, 3]])
|
||||
@rerun_if_address_is_in_use()
|
||||
def test_profile_alpha_beta(physical_devices):
|
||||
spawn(check_extract_alpha_beta, 4, physical_devices=physical_devices)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
test_profile_alpha_beta()
|
||||
|
Reference in New Issue
Block a user