From 189b51d42bd29032091f1e29ae5585eb52c0af57 Mon Sep 17 00:00:00 2001
From: 嘉渊 <wangjiaming.wjm@alibaba-inc.com>
Date: 星期一, 24 四月 2023 18:58:37 +0800
Subject: [PATCH] update
---
funasr/bin/train.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/funasr/bin/train.py b/funasr/bin/train.py
index 474e857..7a9986c 100755
--- a/funasr/bin/train.py
+++ b/funasr/bin/train.py
@@ -77,6 +77,12 @@
help="Whether to use the find_unused_parameters in "
"torch.nn.parallel.DistributedDataParallel ",
)
+ parser.add_argument(
+ "--gpu_id",
+ type=int,
+ default=0,
+ help="local gpu id.",
+ )
# cudnn related
parser.add_argument(
@@ -399,6 +405,7 @@
torch.backends.cudnn.deterministic = args.cudnn_deterministic
# ddp init
+ os.environ['CUDA_VISIBLE_DEVICES'] = str(args.gpu_id)
args.distributed = args.dist_world_size > 1
distributed_option = build_distributed(args)
--
Gitblit v1.9.1