mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-16 14:41:53 +00:00
[misc] refactor launch API and tensor constructor (#5666)
* [misc] remove config arg from initialize * [misc] remove old tensor contrusctor * [plugin] add npu support for ddp * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [devops] fix doc test ci * [test] fix test launch * [doc] update launch doc --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -231,13 +231,13 @@ def run_bert_3d_test(test_config):
|
||||
|
||||
def check_bert(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_bert_test()
|
||||
|
||||
|
||||
def check_bert_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_bert_3d_test()
|
||||
|
||||
|
||||
|
@@ -99,7 +99,6 @@ def run_blip2_test(
|
||||
def check_blip2(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(
|
||||
config={},
|
||||
rank=rank,
|
||||
world_size=world_size,
|
||||
host="localhost",
|
||||
|
@@ -209,13 +209,13 @@ def run_bloom_3d_test(test_config):
|
||||
|
||||
def check_bloom(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_bloom_test()
|
||||
|
||||
|
||||
def check_bloom_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_bloom_3d_test()
|
||||
|
||||
|
||||
|
@@ -259,7 +259,6 @@ def run_chatglm_3d_test(test_config):
|
||||
def check_chatglm(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(
|
||||
config={},
|
||||
rank=rank,
|
||||
world_size=world_size,
|
||||
host="localhost",
|
||||
@@ -272,7 +271,6 @@ def check_chatglm(rank, world_size, port):
|
||||
def check_chatglm_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(
|
||||
config={},
|
||||
rank=rank,
|
||||
world_size=world_size,
|
||||
host="localhost",
|
||||
|
@@ -176,13 +176,13 @@ def run_falcon_3d_test(test_config):
|
||||
|
||||
def check_falcon(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_falcon_test()
|
||||
|
||||
|
||||
def check_falcon_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_falcon_3d_test()
|
||||
|
||||
|
||||
|
@@ -275,7 +275,6 @@ def run_gpt2_3d_test(test_config):
|
||||
def check_gpt2(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(
|
||||
config={},
|
||||
rank=rank,
|
||||
world_size=world_size,
|
||||
host="localhost",
|
||||
@@ -288,7 +287,6 @@ def check_gpt2(rank, world_size, port):
|
||||
def check_gpt2_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(
|
||||
config={},
|
||||
rank=rank,
|
||||
world_size=world_size,
|
||||
host="localhost",
|
||||
|
@@ -319,13 +319,13 @@ def run_llama_3d_test(test_config):
|
||||
|
||||
def check_llama(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_llama_test()
|
||||
|
||||
|
||||
def check_llama_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_llama_3d_test()
|
||||
|
||||
|
||||
|
@@ -170,7 +170,7 @@ def run_mistral_test(test_config):
|
||||
|
||||
def check_mistral(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_mistral_test()
|
||||
|
||||
|
||||
|
@@ -233,7 +233,6 @@ def run_opt_3d_test(test_config):
|
||||
def check_OPTModel(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(
|
||||
config={},
|
||||
rank=rank,
|
||||
world_size=world_size,
|
||||
host="localhost",
|
||||
@@ -246,7 +245,6 @@ def check_OPTModel(rank, world_size, port):
|
||||
def check_opt_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(
|
||||
config={},
|
||||
rank=rank,
|
||||
world_size=world_size,
|
||||
host="localhost",
|
||||
|
@@ -57,7 +57,7 @@ def run_sam_test(enable_fused_normalization, enable_tensor_parallelism, enable_f
|
||||
|
||||
def check_sam(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_sam_test()
|
||||
|
||||
|
||||
|
@@ -222,7 +222,6 @@ def run_t5_3d_test(test_config):
|
||||
def check_t5(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(
|
||||
config={},
|
||||
rank=rank,
|
||||
world_size=world_size,
|
||||
host="localhost",
|
||||
@@ -235,7 +234,6 @@ def check_t5(rank, world_size, port):
|
||||
def check_t5_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(
|
||||
config={},
|
||||
rank=rank,
|
||||
world_size=world_size,
|
||||
host="localhost",
|
||||
|
@@ -168,13 +168,13 @@ def run_vit_3d_test(test_config):
|
||||
|
||||
def check_vit(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_vit_test()
|
||||
|
||||
|
||||
def check_vit_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_vit_3d_test()
|
||||
|
||||
|
||||
|
@@ -196,13 +196,13 @@ def run_whisper_3d_test(test_config):
|
||||
|
||||
def check_whisper(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_whisper_test()
|
||||
|
||||
|
||||
def check_whisper_3d(rank, world_size, port):
|
||||
disable_existing_loggers()
|
||||
colossalai.launch(config={}, rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
colossalai.launch(rank=rank, world_size=world_size, host="localhost", port=port, backend="nccl")
|
||||
run_whisper_3d_test()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user