[Feature Request]: allow to specify which gpu to use
As far as I could see, there is no such option. To clarify, this is useful when running a script on a machine with more than one GPU, having a flag such as `--gpu 1` or `--device cuda:1` would be of great help!

Thanks for all the work!
diff --git a/espnet/bin/lm_train.py b/espnet/bin/lm_train.py
index 724b9e3cd..efe99d4b6 100755
--- a/espnet/bin/lm_train.py
+++ b/espnet/bin/lm_train.py
@@ -149,6 +149,7 @@ def main(cmd_args):
                 ngpu = 0
             else:
                 ngpu = len(p.stderr.decode().split('\\n')) - 1
+        args.ngpu = ngpu
     else:
         ngpu = args.ngpu
     logging.info(f"ngpu: {ngpu}")
diff --git a/espnet/bin/mt_train.py b/espnet/bin/mt_train.py
index 5ab84d9dd..5ee8234b0 100755
--- a/espnet/bin/mt_train.py
+++ b/espnet/bin/mt_train.py
@@ -239,6 +239,7 @@ def main(cmd_args):
                 ngpu = 0
             else:
                 ngpu = len(p.stderr.decode().split('\\n')) - 1
+        args.ngpu = ngpu
     else:
         if is_torch_1_2_plus and args.ngpu != 1:
             logging.debug("There are some bugs with multi-GPU processing in PyTorch 1.2+" +
diff --git a/espnet/bin/st_train.py b/espnet/bin/st_train.py
index c348da045..81e1adf40 100755
--- a/espnet/bin/st_train.py
+++ b/espnet/bin/st_train.py
@@ -275,6 +275,7 @@ def main(cmd_args):
                 ngpu = 0
             else:
                 ngpu = len(p.stderr.decode().split('\\n')) - 1
+        args.ngpu = ngpu
     else:
         if is_torch_1_2_plus and args.ngpu != 1:
             logging.debug("There are some bugs with multi-GPU processing in PyTorch 1.2+" +
diff --git a/espnet/bin/tts_train.py b/espnet/bin/tts_train.py
index d03663ff3..ce25f98bf 100755
--- a/espnet/bin/tts_train.py
+++ b/espnet/bin/tts_train.py
@@ -178,6 +178,7 @@ def main(cmd_args):
                 ngpu = 0
             else:
                 ngpu = len(p.stderr.decode().split('\\n')) - 1
+        args.ngpu = ngpu
     else:
         ngpu = args.ngpu
     logging.info(f"ngpu: {ngpu}")
['espnet/bin/lm_train.py', 'espnet/bin/st_train.py', 'espnet/bin/mt_train.py', 'espnet/bin/tts_train.py']