[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:
Hongxin Liu
2023-09-19 14:20:26 +08:00
committed by GitHub
parent 3c6b831c26
commit 079bf3cb26
1268 changed files with 50037 additions and 38444 deletions

View File

@@ -13,7 +13,6 @@ from colossalai.testing import clear_cache_before_run, rerun_if_address_is_in_us
class MLP(torch.nn.Module):
def __init__(self, dim: int):
super().__init__()
self.linear1 = torch.nn.Linear(dim, dim)
@@ -29,12 +28,12 @@ class MLP(torch.nn.Module):
return x
CONFIG = dict(parallel=dict(tensor=dict(mode='1d', size=2)))
CONFIG = dict(parallel=dict(tensor=dict(mode="1d", size=2)))
def check_layer(rank, world_size, port):
disable_existing_loggers()
launch(config=CONFIG, rank=rank, world_size=world_size, host='localhost', port=port, backend='nccl')
launch(config=CONFIG, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
input_tensor = torch.rand(2, 16).cuda()
model = MLP(16).cuda()
symbolic_traced = symbolic_trace(model)
@@ -55,5 +54,5 @@ def test_1d():
spawn(check_layer, 2)
if __name__ == '__main__':
if __name__ == "__main__":
test_1d()