FunCodec icon indicating copy to clipboard operation
FunCodec copied to clipboard

Stage 1 can only be run on one gpu card 0

Open Beilong-Tang opened this issue 1 year ago • 1 comments

When i run stage 1

bash encoding_decoding.sh --stage 1 --batch_size 16 --num_workers 4 --gpu_devices "0" \
  --model_dir exp/${model_name} --bit_width 16000 \
  --wav_scp input_wav.scp  --out_dir outputs/codecs/

It seems that the gpu_devices can only be 0. Other number or array than 0 will give a cuda ordinal error.

Beilong-Tang avatar May 27 '24 09:05 Beilong-Tang

It seems that by removing the os.environ["CUDA_VISIBLE_DEVICES"] = gpuid line in the scripts will solve the problem. There is a conflict while specifying cuda when using os.environ["CUDA_VISIBLE_DEVICES"] = gpuid and torch.cuda.set_device(int(gpuid)) at the same time if cuda is not cuda:0.

ZhengRachel avatar Jun 06 '24 03:06 ZhengRachel