File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
paddlespeech/t2s/exps/transformer_tts Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -8,5 +8,5 @@ python3 ${BIN_DIR}/train.py \
8
8
--dev-metadata=dump/dev/norm/metadata.jsonl \
9
9
--config=${config_path} \
10
10
--output-dir=${train_output_path} \
11
- --ngpu=2 \
11
+ --ngpu=1 \
12
12
--phones-dict=dump/phone_id_map.txt
Original file line number Diff line number Diff line change 3
3
set -e
4
4
source path.sh
5
5
6
- gpus=0,1
6
+ gpus=0
7
7
stage=0
8
8
stop_stage=100
9
9
Original file line number Diff line number Diff line change 42
42
def train_sp (args , config ):
43
43
# decides device type and whether to run in parallel
44
44
# setup running environment correctly
45
- if (not paddle .is_compiled_with_cuda ()) or args .ngpu == 0 :
46
- paddle .set_device ("cpu" )
47
- else :
45
+ if paddle .is_compiled_with_cuda () and args .ngpu > 0 :
48
46
paddle .set_device ("gpu" )
47
+ elif paddle .is_compiled_with_npu () and args .ngpu > 0 :
48
+ paddle .set_device ("npu" )
49
+ else :
50
+ paddle .set_device ("cpu" )
49
51
world_size = paddle .distributed .get_world_size ()
50
52
if world_size > 1 :
51
53
paddle .distributed .init_parallel_env ()
You can’t perform that action at this time.
0 commit comments